> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hologram.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Send and receive SMS via mmcli

> Learn how to test end-to-end SMS on a Linux device with a Hologram SIM using ModemManager (`mmcli`) on a Linux device such as a Raspberry Pi. Send a message to your device, confirm the device received it, send a reply, and verify delivery.

## Requirements

* A Linux device with a cellular modem and an active Hologram SIM.
* ModemManager installed, which provides the `mmcli` command.
* Access to your [Hologram dashboard](https://dashboard.hologram.io) for the SIM you are testing.
* Permission to run `sudo` on the device, which is required to create, send, and delete messages.

## Verify the modem is connected

Before testing SMS, confirm the modem is attached and connected on LTE:

```bash theme={null}
mmcli -m any
```

Check the following fields in the output:

* **Status > state**: should be `connected` or `enabled`
* **Status > access tech**: should be `lte` (in regions that still support 2G or 3G, `gsm-umts` or others may also work)
* **3GPP > operator name**: should be `Hologram` or the actual mobile network operator
* **3GPP > registration**: should be `roaming` or `home`
* **3GPP EPS > ue mode of operation**: should be `csps-2` (combined CS/PS, which is required for SMS)
* **3GPP > packet service state**: should be `attached`

<Frame>
  <img src="https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/mmcli-modem-status.png?fit=max&auto=format&n=OA3G80WGnCSnvCpD&q=85&s=cc9e6bc63588f191ed56c20d808bf506" alt="mmcli output showing modem status, access technology, and 3GPP registration fields" width="809" height="806" data-path="images/communication/mmcli-modem-status.png" />
</Frame>

<Warning>
  If `ue mode of operation` is not `csps-2`, SMS may not work. Check your modem's UE mode configuration.
</Warning>

## Send an SMS message to the device from your dashboard

<Steps>
  <Step title="Send a test message">
    In your dashboard, navigate to the SIM and use the **Manage SIM** menu to **[Send message to SIM](/dashboard/sim-actions/send-messages-to-sims)** and send a test message to the SIM.
  </Step>

  <Step title="Confirm the events in Event history">
    After sending, open the **[Events tab](/dashboard/sims/sim-details-events-tab)** for the SIM to view event history. You should see two events:

    1. The message sent to the device, "**To SIM**". In the example below, the message body is `g2-sms-20260623` with an event type of **[Inbound SMS](/guides/cloud-and-tools/event-types-and-tags#outbound-sms)** (`_SMS_DT_` event tag).
    2. A delivery confirmation sent back to Hologram, "**From SIM**". In the example below, the message body is `SMS` with an event type of **[Inbound SMS delivered](/guides/cloud-and-tools/event-types-and-tags#sms-delivered)** (`_SMS_DT_DELIVERED_` event tag).

    <Frame>
      <img src="https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/dashboard-send-sms-event-history.png?fit=max&auto=format&n=OA3G80WGnCSnvCpD&q=85&s=da5383587580e65b25a352f334553cf4" alt="Dashboard Event History showing To SIM and From SIM events for the test message" width="564" height="134" data-path="images/communication/dashboard-send-sms-event-history.png" />
    </Frame>
  </Step>
</Steps>

## Verify the message was received by the device

List the messages stored on the modem:

```bash theme={null}
mmcli -m any --messaging-list-sms
```

Inspect a received message by its index:

```bash theme={null}
mmcli -s 12
```

Messages from Hologram arrive from the number assigned to the **Hologram short or long code**.  The `text` field contains the message body you entered.

<Frame>
  <img src="https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/mmcli-received-sms.png?fit=max&auto=format&n=OA3G80WGnCSnvCpD&q=85&s=e5de786f771429b085b89e82b1f796f6" alt="mmcli output showing the contents of a received SMS, including number and text fields" width="454" height="213" data-path="images/communication/mmcli-received-sms.png" />
</Frame>

## Create and send an SMS message from the device

<Warning>
  **Important:** The destination must be a valid Hologram short or long code, not an arbitrary number. **Use the number from the received SMS**, visible in the `number` field of `mmcli -s <index>`.
</Warning>

<Steps>
  <Step title="Create the message in modem memory">
    ```bash theme={null}
    sudo mmcli -m any --messaging-create-sms="number=+80112,text=g2-sms-reply-20260623"
    ```
  </Step>

  <Step title="Verify, send, and confirm">
    Verify the message was created, send it, then confirm it was sent:

    ```bash theme={null}
    mmcli -s 13
    sudo mmcli -s 13 --send
    mmcli -s 13
    ```

    After sending, `state` changes from `submit` to `sent` and a `message reference` number is present.

    <Frame>
      <img src="https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/mmcli-send-sms.png?fit=max&auto=format&n=OA3G80WGnCSnvCpD&q=85&s=7f97e588a9cbb165855d05fa6d9d718c" alt="mmcli output showing a created SMS transitioning from submit to sent state with a message reference" width="705" height="366" data-path="images/communication/mmcli-send-sms.png" />
    </Frame>
  </Step>
</Steps>

## Verify the message was received by the SIM

In your dashboard, open the **[Events tab](/dashboard/sims/sim-details-events-tab)** for the SIM to view event history. You should see a new event tagged **[Outbound SMS](/guides/cloud-and-tools/event-types-and-tags#outbound-sms)** (`_SMS_DO_` event tag) with the message body matching what you sent.

<Frame>
  <img src="https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/dashboard-outbound-sms-event.png?fit=max&auto=format&n=OA3G80WGnCSnvCpD&q=85&s=e86ddd29dcc67b244704f7fd12497949" alt="Dashboard Event History showing an Outbound SMS event with the message body sent from the device" width="568" height="142" data-path="images/communication/dashboard-outbound-sms-event.png" />
</Frame>

## Delete messages to free up modem memory (optional)

List the current messages:

```bash theme={null}
mmcli -m any --messaging-list-sms
```

Delete a specific message by its index:

```bash theme={null}
sudo mmcli -m any --messaging-delete-sms=7
```

<Frame>
  <img src="https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/mmcli-delete-sms.png?fit=max&auto=format&n=OA3G80WGnCSnvCpD&q=85&s=0c2e26c499a85feadda480e4e87e5faf" alt="mmcli output confirming an SMS was deleted from modem memory by index" width="417" height="146" data-path="images/communication/mmcli-delete-sms.png" />
</Frame>

To delete multiple messages in a loop:

```bash theme={null}
for i in 7 8 9 10 11 12 13; do
  sudo mmcli -m any --messaging-delete-sms=$i
done
```

<Danger>
  **Danger:** Do not use `mmcli -s <index> --delete`. This syntax is broken in newer versions of ModemManager and returns `error: no actions specified`. Always use `--messaging-delete-sms=<index>` on the modem (`-m`) instead.
</Danger>
