mikalhart / IridiumSBD

Arduino library for RockBLOCK Iridium satellite modem (http://rock7mobile.com)
132 stars 52 forks source link

getWaitingMessageCount returning wrong int #27

Closed infinitemind2 closed 5 years ago

infinitemind2 commented 5 years ago

I know there is a message waiting however the following return 0 int nummessages = modem.getWaitingMessageCount(); Serial.println("Message count from satellite: " + String(nummessages));

Diagnostic data stream...

AT+SBDIX Waiting for response OK

<< ..AT+SBDIX................ +SBDIX: 0, 0, 1, 1, 11, 0

OK SBDIX MO code: 0 SBDIX success! Message count from satellite: 0

mikalhart commented 5 years ago

@infinitemind2,

According to the guide at

http://www.rock7.com/downloads/IRDM_ISU_ATCommandReferenceMAN0009_Rev2.0_ATCOMM_Oct2012.pdf

the message count is the sixth number after the "+SBDIX:" in the return string.

From the docs: Command Response: +SBDIX:,,,,,

In your example, this is 0, so I think the Iridium system does not think there's a message waiting.