Now that we can handle so many regions, it makes sense to add someAPIs:
Arduino_LoRaWAN::GetRegionString() should return the region name as a string: "as923", "us915", etc.
Arduino_LoRaWAN::GetRegion() should return the region index. Positive numbers 1..n should match the subsection within section 2 for the LoRaWAN regional spec.
Arduino_LoRaWAN::GetNetworkName() should return the configured network name
Arduino_LoRaWAN::GetCountryCode() should return the LMIC_COUNTRY_CODE.
Eventually we should have functions to map from region index to region name and vice versa. But that can wait until we switch to using function tables and allow support for multiple regions with a single codebase.
Now that we can handle so many regions, it makes sense to add someAPIs:
Arduino_LoRaWAN::GetRegionString()
should return the region name as a string: "as923", "us915", etc.Arduino_LoRaWAN::GetRegion()
should return the region index. Positive numbers 1..n should match the subsection within section 2 for the LoRaWAN regional spec.Arduino_LoRaWAN::GetNetworkName()
should return the configured network nameArduino_LoRaWAN::GetCountryCode()
should return the LMIC_COUNTRY_CODE.Eventually we should have functions to map from region index to region name and vice versa. But that can wait until we switch to using function tables and allow support for multiple regions with a single codebase.
This was originally https://github.com/mcci-catena/arduino-lmic/issues/32.