Skip to content

Commit

Permalink
Fix #176: on EV_JOINING, call client methods to re-initialize session
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed Jul 5, 2021
1 parent b426d43 commit f79de92
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib/arduino_lorawan_begin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,18 @@ void Arduino_LoRaWAN::StandardEventProcessor(
case EV_BEACON_TRACKED:
break;
case EV_JOINING:
{
// Set data rate and transmit power, based on regional considerations.
// Allows regions to change the channel mask (which otherwise will
// be reset to the region default -- possibly not what you want).
this->NetBeginRegionInit();

// Update the session info
this->SaveSessionInfo();

// save everything else of interest.
this->SaveSessionState();
}
break;

case EV_JOINED:
Expand Down

0 comments on commit f79de92

Please sign in to comment.