Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set region to unknown on startup #413

Merged
merged 5 commits into from
Apr 7, 2023
Merged

Conversation

madninja
Copy link
Member

@madninja madninja commented Apr 7, 2023

This sets the current/default region to a new “UNKNOWN” region to avoid invalid uplink packet reports, region parameters (and thus invalid downlinks) when the gateway can’t or has not received it’s asserted region from the config service yet.

It avoids sending packets with Unknown region information to the packet router since they can't really be responded to or handled.

A Maker can set the region to a known value at startup by using the GW_REGION environment variable. This may be useful for data only hotspots or to get faster initial uplinks at startup.

Fixes: #408

This sets the current/default region  to a new “UNKNOWN” region to avoid invalid uplink packet reports, region parameters (and thus invalid downlinks) when the gateway can’t or has not received it’s asserted region from the config service yet
README.md Outdated Show resolved Hide resolved
config/settings.toml Outdated Show resolved Hide resolved
Co-authored-by: Jeff Grunewald <jeff.grunewald@gmail.com>
@madninja
Copy link
Member Author

madninja commented Apr 7, 2023

@ke6jjj only caveat to #408 is that the unknown region is printed as "UNKNOWN" instead of null. E.g.

{
  "region": "UNKNOWN"
}

That ok?

@ke6jjj
Copy link

ke6jjj commented Apr 7, 2023

@ke6jjj only caveat to #408 is that the unknown region is printed as "UNKNOWN" instead of null. E.g.

Well, unfortunately no. The idea is to return a proper null for the API in question. For JSON that really would be null. We're looking for something consistent that Makers can program to.

@madninja
Copy link
Member Author

madninja commented Apr 7, 2023

@ke6jjj only caveat to #408 is that the unknown region is printed as "UNKNOWN" instead of null. E.g.

Well, unfortunately no. The idea is to return a proper null for the API in question. For JSON that really would be null. We're looking for something consistent that Makers can program to.

Fixed

@madninja madninja merged commit b0218dc into main Apr 7, 2023
@madninja madninja deleted the madninja/settings_none_region branch April 7, 2023 12:45
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Radio region should default to No-Region at Startup
3 participants