R7 Serial: Send Data
The maximum packet size for an SBD MO is 340 bytes.
The maximum user-definable payload size is 336 bytes (WH
, WHNC
) or 321 bytes when also requesting GPS data (WHP
, WHNCP
)
When sending data using commands like WH
or WHP
, you must prepend a CRC-CCITT (XModem) checksum to the hex payload.
This checksum helps the receiving system detect accidental errors in transmission.
- Example input: ASCII string
"123456789"
- Expected checksum:
0x31C3
(in hex:31c3
) - You would send:
R7+WH=31c3<your-hex-data>\r
Need to compute it? You can use a Python snippet or an online tool that supports CRC-CCITT (XModem).
Transmit Hex Encoded Data
Serial Command | Function |
---|---|
R7+WH= | Sends user defined hexadecimal data. Hexadecimal data must be preceded by checksum. |
R7+WHP= | Sends user defined hexadecimal data and GPS position data. Hexadecimal data must be preceded by checksum. |
R7+WHNC= | Sends user defined hexadecimal data. No Checksum used. |
R7+WHNCP= | Sends user defined hexadecimal data and GPS position data. No Checksum used. |
Send Hex Data with Checksum
R7+WH=<checksum><hex payload>
This command instructs the device to send user-supplied data. The device will respond with a message ID, which can be used later to query status.
/* Transmit "Hello World" (Hex: 48656c6c6f20576f726c64, Checksum: 992a)
R7+WH=992a48656c6c6f20576f726c64\r
/* Receive Response */
<Outbound MessageID>\r
OK\r
Send Hex + GPS with Checksum
R7+WHP=<checksum><hex payload>
This command instructs the device to send user-supplied data and GPS position data. The device will respond with a message ID, which can be used later to query status.
/* Transmit "Hello World" (Hex: 48656c6c6f20576f726c64, Checksum: 992a)
R7+WHP=992a48656c6c6f20576f726c64\r
/* Receive Response */
<Outbound MessageID>\r
OK\r
Send Hex Data (No Checksum)
R7+WHNC=<hex payload>
This command instructs the device to send user-supplied data. The device will respond with a message ID, which can be used later to query status.
/* Transmit "Hello World" (Hex: 48656c6c6f20576f726c64)
R7+WHNC=48656c6c6f20576f726c64\r
/* Receive Response */
<Outbound MessageID>\r
OK\r
Send Hex + GPS (No Checksum)
R7+WHNCP=<hex payload>
This command instructs the device to send user-supplied data and GPS position data. The device will respond with a message ID, which can be used later to query status.
/* Transmit "Hello World" (Hex: 48656c6c6f20576f726c64)
R7+WHNCP=48656c6c6f20576f726c64\r
/* Receive Response */
<Outbound MessageID>\r
OK\r
Transmit Binary Encoded Data
Serial Command | Function |
---|---|
R7+WB= | Sends user defined binary data with checksum. |
R7+WBP= | Sends user defined binary data with checksum and GPS position data. |
R7+WBNC= | Sends user defined binary data. |
R7+WBNCP= | Sends user defined binary data and GPS position data. |
Send Binary Data with Checksum
R7+WB=<length>
This command instructs the device to send user-supplied data. The device will respond with a message ID, which can be used later to query status.
/* Prepare device to receive binary data */
/* Length = byte size of binary payload */
R7+WB=[length]\r
/* Receive response */
OK\r
/* Device is now listening for binary data */
<binary data>\r
/* Receive response */
<Outbound MessageID>\r
OK\r
Send Binary + GPS with Checksum
R7+WBP=<length>
This command instructs the device to send user-supplied data and GPS position data. The device will respond with a message ID, which can be used later to query status.
/* Prepare device to receive binary data */
/* Length = byte size of binary payload */
R7+WBP=[length]\r
/* Receive response */
OK\r
/* Device is now listening for binary data */
<binary data>\r
/* Receive response */
<Outbound MessageID>\r
OK\r
Send Binary Data (No Checksum)
R7+WBNC=<length>
This command instructs the device to send user-supplied data. The device will respond with a message ID, which can be used later to query status.
/* Prepare device to receive binary data */
/* Length = byte size of binary payload */
R7+WBNC=[length]\r
/* Receive response */
OK\r
/* Device is now listening for binary data */
<binary data>\r
/* Receive response */
<Outbound MessageID>\r
OK\r
Send Binary + GPS (No Checksum)
R7+WBNCP=<length>
This command instructs the device to send user-supplied data. The device will respond with a message ID, which can be used later to query status.
/* Prepare device to receive binary data */
/* Length = byte size of binary payload */
R7+WBNCP=[length]\r
/* Receive response */
OK\r
/* Device is now listening for binary data */
<binary data>\r
/* Receive response */
<Outbound message ID>\r
OK\r
Additional Commands
Assign a Custom Outbound Message ID
R7+[WH|WHNC|WHP|WHNCP|WB|WBNC|WBP|WBNCP],ID=n
Allows you to set a custom Outbound Message ID, used in combination with send hex or binary data commands.
This ID is not transmitted over the Iridium network — it is stored locally and used only for device-side tracking and status queries.
/* Transmit "Hello World" (Hex: 48656c6c6f20576f726c64)*/
/* Set the Outbound Message ID to '1234' */
R7+WHNCP=48656c6c6f20576f726c64,ID=1234\r
/* Receive response */
1234\r
OK\r
/* Prepare device to receive binary data */
/* Length = byte size of binary payload */
R7+WB=[length],ID=1234\r
/* Receive response */
1234\r
OK\r
/* Device is now listening for binary data */
<binary data>\r
/* Receive response */
1234\r
OK\r
Check Outbound Message Status
R7+STAT=n
This command requests the transmission status of a specific outbound message. The device will respond with a status number.
/* Check message status */
R7+STAT=<Outbound Message ID>\r
/* Receive response */
<Status #>\r
OK\r
Response | Meaning |
---|---|
0 | Message not sent |
1 | Message sent |
Error Messages
Error Type | Description |
---|---|
ERROR 0 | Data format error - eg. - Non-hex payload - Incorrect checksum provided - Binary payload timeout |
ERROR 1 | Device deactivated - will not be seen as device is unable to respond in deactivated state |
ERROR 2 | This error type will be returned in response to any R7+WH.. or R7+WB.. message commands if the database is full. |
ERROR 3 | This error will be returned to indicate rejection of a message command when the submitted ID is a duplicate of one already in the DB and not yet sent. |