Skip to content

Commit

Permalink
Fixes parsing of +CEDRXS for R510
Browse files Browse the repository at this point in the history
  • Loading branch information
technobly committed Mar 31, 2021
1 parent ba6c3f6 commit b6f9b3c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hal/network/ncp_client/sara/sara_ncp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1334,8 +1334,12 @@ int SaraNcpClient::initReady(ModemState state) {
resp = parser_.sendCommand("AT+CEDRXS?");
while (resp.hasNextLine()) {
unsigned act = 0;
r = resp.scanf("+CEDRXS: %u", &act);
if (r == 1) { // Ignore scanf() errors
unsigned eDRXCycle = 0;
unsigned pagingTimeWindow = 0;
// R410 disabled: +CEDRXS:
// R510 disabled: +CEDRXS: 4,"0000"
r = resp.scanf("+CEDRXS: %u,\"%d\",\"%d\"", &act, &eDRXCycle, &pagingTimeWindow);
if (r >= 1 && (eDRXCycle != 0 || pagingTimeWindow != 0)) { // Ignore scanf() errors
CHECK_TRUE(acts.append(act), SYSTEM_ERROR_NO_MEMORY);
}
}
Expand Down

0 comments on commit b6f9b3c

Please sign in to comment.