ImperialSpaceSociety / LoRaMac-node

Reference implementation and documentation of a LoRa network node.
Other
6 stars 1 forks source link

Verify that message for Helium network can be received overseas #455

Open MedadRufus opened 1 year ago

MedadRufus commented 1 year ago

Currently, all helium devices credentials are OTAA connected in the EU. Then the keys are cached. Will it still work in other geographical regions? US, Asia etc? The source code for helium router may be able to inform us: https://github.com/helium/router

MedadRufus commented 1 year ago

This issue on helium suggests that the backend handles all regions together: https://github.com/helium/helium-packet-router/issues/47

MedadRufus commented 1 year ago

Most obvious way to test this is:

  1. do an OTAA connection in the EU
  2. Travel to America, switch the frequency of the lora node to US frequencies and transmit packets. To pass, the packets must be received also in the US.

This test can be tested between any 2 regions. Travelling not mandatory - just need to do an OTAA connection in one region, store the long term keys, send a firmware image over to a friend in another region - it needs to connect with ABP + hard-coded keys and on the right local frequencies.

MedadRufus commented 1 year ago

Alternatively, do an OTAA connection from the air in every region of the world. This will simulate having a new device connecting for the first time in every region. The drawback is that OTAA is very hard to complete from the air, as it requires 2 way messaging with no packet loss(one from tracker to gateway and next transmission from gateway to tracker must be successful).

Arguably this is the safest way as backend systems would definately have been designed to handle this scenario - OTAA connecting and usage within the same region.

MedadRufus commented 1 year ago

Useful reference - how to simulate a virtual LoRaWAN device: https://docs.helium.com/use-the-network/run-a-network-server/debug-with-sniffer/

The virtual LoraWAN device repo is here: https://github.com/helium/virtual-lorawan-device When creating the virtual device, we have to define the region, as shown in this example: https://github.com/helium/virtual-lorawan-device/blob/8e4b498709acf046129cd0a0b953642c90e84cf4/README.md?plain=1#L50. It makes me think that the whole system needs to know the region to work. I trace the region parameter down to this repo: https://github.com/ivajloip/rust-lorawan.

MedadRufus commented 1 year ago

Acceptable solution:

  1. Register a virtual lorawan device in US region, then do a join and tx a few times. Then extract all abp keys.
  2. Load the abp keys into a real endnode, and tx in EU region on EU frequencies. It must be in ABP mode.
  3. Confirm that packets are received in EU.