Skip to content

Commit 3c38c7b

Browse files
Merge pull request #223 from alexbn71/patch-1
Always sync baud on reset and after module reset
2 parents ab36f4d + eccecc8 commit 3c38c7b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/TheThingsNetwork.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,12 @@ void TheThingsNetwork::autoBaud()
401401

402402
void TheThingsNetwork::reset(bool adr)
403403
{
404-
if (!baudDetermined)
405-
{
406-
autoBaud();
407-
}
408-
404+
autoBaud();
409405
size_t length = readResponse(SYS_TABLE, SYS_RESET, buffer, sizeof(buffer));
410406

407+
autoBaud();
408+
length = readResponse(SYS_TABLE, SYS_TABLE, SYS_GET_VER, buffer, sizeof(buffer));
409+
411410
// buffer contains "RN2xx3[xx] x.x.x ...", splitting model from version
412411
char *model = strtok(buffer, " ");
413412
debugPrintIndex(SHOW_MODEL, model);

0 commit comments

Comments
 (0)