mikalhart / IridiumSBD

Arduino library for RockBLOCK Iridium satellite modem (http://rock7mobile.com)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

internalMSSTMWorkaround() incorrectly interprets 9602 response

gizmoberg opened this issue · comments

The 9602 response to an AT-MSSTM call is either of the following:

Valid Response: "---MSSTM: XXXXXXXX" where XXXXXXXX is an eight---digit hexadecimal number.
Invalid Response: "---MSSTM: no network service"

Line 403 of IridiumSBD.cpp is tasked with determining whether the response was valid:

okToProceed = isdigit(msstmResponseBuf[0]);

This fails when the first digit of the 8 digit number is in the set [A-Fa-f]. Recommend changing this line to the following:

okToProceed = isxdigit(msstmResponseBuf[0]);

Great find, gizmoberg. Thanks!

Fixed with 1.04, per gizmoberg's suggestion.