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

If this->NetBegin() fails, shutdown the LMIC. #95

Open terrillmoore opened 5 years ago

terrillmoore commented 5 years ago

If provisioning style is kNone, this->NetBegin() will fail. But this leaves the LMIC enabled, so if the user tries to send, the LMIC will start trying to join (with invalid credentials). This is at least confusing and at worst mystifying.

We should call LMIC_shutdown() if NetBegin() fails. This should cause TXs to bounce.