> ## 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`

![mmcli output showing modem status, access technology, and 3GPP registration fields](https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/mmcli-modem-status.png?fit=max\&auto=format\&n=OA3G80WGnCSnvCpD\&q=85\&s=cc9e6bc63588f191ed56c20d808bf506)

> [!WARNING]
>
> If `ue mode of operation` is not `csps-2`, SMS may not work. Check your modem's UE mode configuration.

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

**1. Send a test message**

In your dashboard, navigate to the SIM and use the **Manage SIM** menu to **[Send message to SIM](https://docs.hologram.io/dashboard/sim-actions/send-messages-to-sims.md)** and send a test message to the SIM.

**2. Confirm the events in the SIM's history**

After sending, open the **[History tab](https://docs.hologram.io/dashboard/sims/sim-details-history-tab.md)** for the SIM. 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](https://docs.hologram.io/guides/cloud-and-tools/event-types-and-tags.md#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](https://docs.hologram.io/guides/cloud-and-tools/event-types-and-tags.md#sms-delivered)** (`_SMS_DT_DELIVERED_` event tag).

![Dashboard Event History showing To SIM and From SIM events for the test message](https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/dashboard-send-sms-event-history.png?fit=max\&auto=format\&n=OA3G80WGnCSnvCpD\&q=85\&s=da5383587580e65b25a352f334553cf4)

## 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.

![mmcli output showing the contents of a received SMS, including number and text fields](https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/mmcli-received-sms.png?fit=max\&auto=format\&n=OA3G80WGnCSnvCpD\&q=85\&s=e5de786f771429b085b89e82b1f796f6)

## 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>`.

**1. Create the message in modem memory**

```bash theme={null}
sudo mmcli -m any --messaging-create-sms="number=+80112,text=g2-sms-reply-20260623"
```

**2. 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.

![mmcli output showing a created SMS transitioning from submit to sent state with a message reference](https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/mmcli-send-sms.png?fit=max\&auto=format\&n=OA3G80WGnCSnvCpD\&q=85\&s=7f97e588a9cbb165855d05fa6d9d718c)

## Verify the message was received by the SIM

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

![Dashboard Event History showing an Outbound SMS event with the message body sent from the device](https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/dashboard-outbound-sms-event.png?fit=max\&auto=format\&n=OA3G80WGnCSnvCpD\&q=85\&s=e86ddd29dcc67b244704f7fd12497949)

## 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
```

![mmcli output confirming an SMS was deleted from modem memory by index](https://mintcdn.com/hologram-b29df2a6/OA3G80WGnCSnvCpD/images/communication/mmcli-delete-sms.png?fit=max\&auto=format\&n=OA3G80WGnCSnvCpD\&q=85\&s=0c2e26c499a85feadda480e4e87e5faf)

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
```

> [!CAUTION]
>
> **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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.