mcci-catena / arduino-lorawan

User-friendly library for using arduino-lmic with The Things Network and other LoRaWAN® networks
MIT License
284 stars 54 forks source link

Arduino_LoRaWAN_*::NetBegin() functions don't call LMIC_setSession correctly #96

Closed terrillmoore closed 5 years ago

terrillmoore commented 5 years ago

Code review reveals that both Arduino_LoRaWAN_machineQ_base::NetBegin() and Arduino_LoRaWAN_ttn_base::NetBegin() call LMIC_setSession() with an incorect first parameter. It's annotated as /* port number */, and it's a constant value of 1. But that parameter is the NetID. Luckily this only matters for Class B in the LMIC; and we don't support that yet. But it should be fixed.