> For the complete documentation index, see [llms.txt](https://docs.eseye.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eseye.com/modules/cinterion-r-els61-wireless-module/mqtt-at-commands/emq-publish-a-message-to-singletopic.md).

# EMQ – publish a message to singletopic

Publish a message to the system `singlepubtopic`. `singlepubtopic` is a predefined topic for single-subscription systems, where the host is not expected to register a publish topic with `+EMQPUBOPEN`. The publish topic (`singlepubtopic`) and QoS (`singlepubtopicqos`) are defined in the configuration file. For more information, see the \[MQTT] section, [Using the Cinterion® ELS61 Wireless Module configuration file](https://docs.eseye.com/modules/cinterion-r-els61-wireless-module/using-the-cinterion-els61-wireless-module-configuration-file.md). The index is not required.

| Type      | Syntax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Returned Result                                                                                                                                                                                                              |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Test**  | `AT+EMQ=?`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `OK`                                                                                                                                                                                                                         |
| **Read**  | `AT+EMQ?`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | <p><code>OK</code></p><p>or</p><p><code>ERROR</code></p>                                                                                                                                                                     |
| **Write** | <p><code>AT+EMQ=\<pubdata></code></p><p>where</p><p><code>\<pubdata></code> – is the published message. The maximum payload length is 1000 characters. All characters must be printable.</p><p>AnyNet SMARTconnect™ handles <code>\<pubdata></code> as ASCII-hex if it contains an even number of valid ASCII-hex characters (<code>0</code>-<code>9</code>, <code>a</code>-<code>f</code>, <code>A</code>-<code>F</code>). ASCII-hex is converted to binary for transmission.</p><p>AnyNet SMARTconnect™ handles all other data as text. For text messages, <code>\</code> (escape characters) are removed.</p> | <p><code>OK</code> – command result</p><p><code>SEND OK</code> – subsequent URC that is sent when publish occurs. This will not happen immediately if AnyNet SMARTconnect™ is offline.</p><p>or</p><p><code>ERROR</code></p> |

#### Example

```
AT+EMQ="{\"BatteryPower\": \"Low\"}"
OK

SEND OK
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eseye.com/modules/cinterion-r-els61-wireless-module/mqtt-at-commands/emq-publish-a-message-to-singletopic.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
