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

helium_gateway info region outputs settings.toml or environment parameter which causes issues when freq/region changes #52

Closed
shawaj opened this issue May 29, 2023 · 0 comments · Fixed by #50

Comments

@shawaj
Copy link
Member

shawaj commented May 29, 2023

In this file https://github.com/NebraLtd/hm-gatewayrs/blob/main/gen-region.sh we use helium_gateway info region which outputs the region from the region config oracle service.

However, we have inadvertently misunderstood the functionality of this command as being the same as it was in pre-gateway-rs helium miner. This was not a problem with the old hm-miner container, as the region check command on the old miner only ever returned the asserted region plan, and never something configured in a settings file. Hence why this only started happening after the move to hm-gatewayrs container.

If there is a region set in the settings.toml file or using a GW_REGION environment variable this command will output the contents of the file/envvar until it gets the region directly from the config service. As we are running this check before we run the helium_gateway server at startup (and only once), this means that the region file never gets correctly updated with the correct frequency.

This is a problem in certain circumstances:

  • in situations like the change of frequency plan in Australia from AS923_1 to AU915 the gateway-rs will be running using the correct frequency plan, however the packet-forwarder will be using an incorrect config.
  • if a customer from one region plan area sells their miner to someone from another region plan area, it will not work correctly until a factory reset is performed.

The only way to fix this currently is a factory reset (it will never resolve itself otherwise).

The way to solve this is to periodicially run the region-checker script (that populates the region file at /var/pktfwd/region) and if an updated one is found then restart the packet-forwarder container.

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 a pull request may close this issue.

1 participant