ImperialSpaceSociety/picotracker-Lora

make work on helium and TTN network

MedadRufus opened this issue · 3 comments

  • Create a profile struct for each network and country. It must be both abp and OTAA friendly.
  • Each struct should contain the credentials for each registered device
  • Consider saving OTAA data to eeprom, so that it does not have to rejoin.
  • explore saving to flash instead of eeprom, which has more space.

Consider using the last release on loramac-node for LoraWAN 1.0.3

Just commenting out LmHandlerJoin( ); in main.c will prevent it from rejoining each time. It will use NVM data if its available. Otherwise, it will join.
Since helium network only uses OTAA, then use NVM to store the otaa data for each region. At the very least, US, EU and CN. It takes around 1.3 kb of space though. Could be feasible to use EEPROM

Each struct for device credentials will contain the following info:

typedef struct
{
activation_type_t activation_type, // abp or Otaa
bool use_nvm, // to or not to use NVM for credential storage.
uint32_t nvm_location,  // Address of beginning of NVM data

}device_credentials_t