Skip to content

Commit d8cb973

Browse files
committed
Introduced a delay after modem.begin() in the LoRaConnectionHandler
the delay let the chip to be correctly initialized before the connection attempt
1 parent 777537b commit d8cb973

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Arduino_LoRaConnectionHandler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ NetworkConnectionState LoRaConnectionHandler::update_handleInit() {
133133
execNetworkEventCallback(_on_error_event_callback, 0);
134134
Debug.print(DBG_ERROR, "Something went wrong; are you indoor? Move near a window, then reset and retry.");
135135
};
136+
//A delay is required between modem.begin(band) and modem.joinOTAA(appeui, appkey) in order to let the chip to be correctly initialized befor the connection attempt
137+
delay(100);
136138
Debug.print(DBG_INFO, "Connecting to the network");
137139
connectionTickTimeInterval = CHECK_INTERVAL_CONNECTING;
138140
return NetworkConnectionState::CONNECTING;

0 commit comments

Comments
 (0)