-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
I sometimes experience that the LoRa module(RN2483) does not send anything back after a sendBytes. The current implementation will wait forever until a return signal is send. This will result in deadlock unless a WDT is externally used. On many MCU's the WDT will have less than 8s count which is not always enough for a message to send.
arduino-device-lib/src/TheThingsNetwork.cpp
Lines 360 to 369 in 23c933f
size_t TheThingsNetwork::readLine(char *buffer, size_t size) | |
{ | |
size_t read = 0; | |
while (read == 0) | |
{ | |
read = modemStream->readBytesUntil('\n', buffer, size); | |
} | |
buffer[read - 1] = '\0'; // set \r to \0 | |
return read; | |
} |
I propose that a timeout is implemented to handle if there is no response from RN2483 within reasonable time.
Metadata
Metadata
Assignees
Labels
No labels