Transmit binary data
Here's how to transmit binary data from your RockBLOCK
Line endings
Note that RockBLOCK expects commands to be terminated with a carriage return (\r) character. This is hex 0x0D.
Using a line-feed (\n) hex 0x0A character will not work!
With your RockBLOCK connected to a suitable power supply, check that your serial communications are established (default 19200, 8N1) and issue the commands:
/* Issue AT command */
AT\r
/* Receive response */
OK\r
/* Turn off Flow Control */
AT&K0\r
/* Receive response */
OK\r
/* Define binary message length in MO buffer not including the mandatory 2 Byte checksum*/
AT+SBDWB=[<SBD Message Length>]\r
/* Receive response */
READY\r
/* Stream binary message and 2 byte checksum.*/
<Binary Message>+<Checksum>\r
/* Receive Response */
<Status>\r
OK\r
/* Initiate an Extended SBD Session */
AT+SBDIX\r
/* Receive response */
+SBDIX: <MO status>, <MOMSN>, <MT status>, <MTMSN>, <MT length>, <MT queued>\r
/* See SBDIX Key for information on each parameter */
Check SBDWB status
Before initiating an SBD session, make sure your SBDWB status is 0.
SBDWB Key
<Status>
0 - SBD message successfully written to the ISU.
1 - SBD message write timeout. An insufficient number of bytes were transferred to ISU during
the transfer period of 60 seconds.
2 - SBD message checksum sent from DTE does not match the checksum calculated at the ISU.
3 - SBD message size is not correct. The maximum mobile originated SBD message length is 340 bytes. The minimum mobile originated SBD message length is 1 byte.
SBDIX Key
The SBDIX command denotes the status of your sent, received and queued messages:
<MO status> - Any returned number with a value of 0 to 2 indicates your message has been successfully transmitted. Any number above 2 indicates that the message has not been successfully transmitted.
<MOMSN> - This number denotes the MO message number and cycles between 0 and 65535.
<MT status>
0 - No messages waiting to be received.
1 - New message successfully received.
2 - Error during mailbox check / message reception.<MTMSN> - This number denotes the MT message number and cycles between 0 and 65535.
<MT length> - The size (in bytes) of the MT message.
<MT queued> - The number of MT messages in the queue waiting to be downloaded.
An SBDIX response of 0,0,0,0,0,0 indicates that a message was transmitted successfully, that there were no MT messages downloaded during this SBD session and that no messages are waiting in the queue to be downloaded.
Further information on AT commands
Please refer to the Iridium ISU AT Command Reference for more information on the available AT commands.
After sending a message using SBDWB followed by a successful SBDIX, we recommend clearing the MO buffer with the command SBDD=0. If you don't clear the MO buffer, and also don't overwrite it with a new MO message, the modem will try to re-send this same message in the next transmission. Clearing the MO buffer is necessary if you're alternating between sending/not sending MO messages.
AT commands in this chapter
Updated over 3 years ago