Skip to main content

Receive Data

This guide explains how to receive data using the RockBLOCK system. By making a simple HTTP POST to our web service, messages are queued on the satellite network, ready for the RockBLOCK to download at your command.

The Mailbox Check

For applications that primarily receive MT (Mobile Terminated) messages, the +SBDIX command is used to check for ASCII or Binary messages in the queue. This process involves sending a blank MO (Mobile Originated) message, incurring a small charge for each check.

🚧 Cost of Mailbox Check

  • RockBLOCK Credits: 1 per check
  • Cloudloop fixed charge: $0.02 per check (this cost may vary depending on your SBD Plan)
/* Modem Communication Check */
AT\r
/* Disable Flow Control */
AT&K0\r
/* Initiate an Extended SBD Session */
AT+SBDIX\r

Upon completion, the response +SBDIX: <MO status>, <MOMSN>, <MT status>, <MTMSN>, <MT length>, <MT queued> details the status of your MO and MT messages.

Receiving Messages

After a successful mailbox check, if MT messages are available, they need to be transferred to your controller one at a time using the +SBDRT or +SBDRB commands, depending on whether you are dealing with ASCII or binary data.

/* Execute Send/Receive */
AT+SBDIX\r
/* Transfer Received Message to Controller */
AT+SBDRT\r

Example of a successful message transfer

If the +SBDIX command results in +SBDIX: 0, 1, 1, 1, 6, 8, it indicates:

  • A blank MO message was successfully sent.
  • A new MT message (6 bytes long) was received.
  • There are 8 more MT messages in the queue.

Transfer the first (oldest) message with:

AT+SBDRT\r

The received message will follow, terminated by OK.

Handling Multiple Messages

To manage multiple MT messages, repeat the +SBDIX and +SBDRT/+SBDRB commands for each message. Remember, the RockBLOCK can only handle one message at a time.

Important Considerations

  • Line Endings: Commands must end with a carriage return (\r).
  • Signal Strength: It's impractical to check signal strength before each operation.

📘 Receiving Binary Data

Follow the same steps as ASCII data, replacing +SBDRT with +SBDRB for binary messages

Clearing the Queue with FLUSH_MT

❗️Only available for devices managed through CORE or RockBLOCK portals

If you are a Cloudloop user, or running your RockBLOCK through a 3rd party provider, this feature is not available

The FLUSH_MT command is a powerful tool used to clear all pending MT messages from your RockBLOCK's queue. This command is useful when you need to manage or reset the data flow. It's important to note that FLUSH_MT does not take immediate effect but is processed during the next SBD session. Here's a step-by-step explanation:

  1. Initial SBD Session: Check for messages and potentially send an MO message.

    AT+SBDIX\r
    +SBDIX: 0, 3, 1, 4, 3, 3\r
    OK\r

    This response indicates that there are currently three MT messages pending.

  2. Issue FLUSH_MT Command: Instruct the CORE or RockBLOCK Portal to clear the MT queue. The FLUSH_MT command is sent as an MO message.

    AT+SBDWT=FLUSH_MT\r
    OK\r
  3. Next SBD Session: The FLUSH_MT is now sent - the queue will be clear on the next +SBDIX session.

    AT+SBDIX\r
    +SBDIX: 0, 4, 1, 5, 3, 2\r
    OK\r
  4. Confirm Queue is Cleared: Perform another SBD session to ensure the queue is completely cleared.

    AT+SBDIX\r
    +SBDIX: 0, 5, 1, 8, 8, 0\r
    OK\r

    This response confirms that the MT message queue is now empty (MT queued = 0).

  5. Retrieve Last Message: If needed, retrieve the message labeled FLUSH_MT which indicates that the flush was executed.

    AT+SBDRT\r
    +SBDRT:\r
    FLUSH_MT\r
    OK\r

Important Considerations

  • Execution Delay: The FLUSH_MT command is executed in the cycle following its issuance. Plan your message management around this delay to avoid losing any important incoming data.
  • Charges: Each use of FLUSH_MT is treated as an MO message and will incur standard transmission charges.

AT Commands used in this section