> 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/smartconnect/at-command-reference/mqtt-at-commands/+emq-unsolicited-response-codes-urcs.md).

# +EMQ Unsolicited Response Codes (URCs)

When the MQTT broker publishes data to your thing, AnyNet SMARTconnect™ forwards the data through the AT command interface using an appropriate URC.

If the data buffer contains only printable characters, it is presented unmodified. This makes transfer of JSON and ASCII text transparent. If non-printable characters are contained in the buffer, the entire buffer is converted to ASCII-hex and sent within quotes.

<table><thead><tr><th width="260">URC</th><th>Description</th></tr></thead><tbody><tr><td><p><code>+EMQ: &#x3C;S>,&#x3C;len>\r\n&#x3C;data></code></p><p>or</p><p><code>+EMQ: &#x3C;id>,&#x3C;len>\r\n&#x3C;data></code></p></td><td><p>Indicates data received on a subscribed topic, where:</p><ul><li><code>S</code> is for <code>singletopic</code> only. Indicates data received on a single topic. For information about singletopic, see <a href="/smartconnect/at-command-reference/mqtt-at-commands/emq-publish-a-message-to-singletopic.md">EMQ – publish a message to singletopic</a>.</li><li><code>&#x3C;id></code> is the subscribed topic index number, not for singletopic use</li><li><code>&#x3C;len></code> is the length of the incoming data</li><li><p><code>&#x3C;data></code> is the received data in either ASCII-hex format or as text, depending on both the <code>urcautoformat</code> setting in the configuration file, and if <code>&#x3C;data></code> appears within quotes.</p><p>For example, if the <code>urcautoformat</code> setting = <code>1</code>, then:</p><ul><li><code>&#x3C;id>,&#x3C;len>\r\n"&#x3C;data>"</code> reports data in ASCII-hex format</li><li><code>&#x3C;id>,&#x3C;len>\r\n&#x3C;data></code> reports data in text format</li></ul><p>For more information, see <a href="/smartconnect/getting-started/using-the-anynet-smartconnect-tm-configuration-file.md">Using the AnyNet SMARTconnect™ configuration file</a>.</p></li></ul></td></tr><tr><td><p><code>+EMQPERSIST: &#x3C;len></code></p><p><code>&#x3C;JSON></code></p></td><td><p>Reports a message from the cloud service indicating something in the persistence service has changed.</p><p>For <code>simple</code> AWSSHADOW mode, only the <code>'{"state":{...'</code> parameters that have changed in the AWS delta are listed.</p><p>For example:</p><p><code>+EMQPERSIST: {"key1":"value1","key2":"value2"}</code></p><p>where <code>value1</code> and <code>value2</code> are any type of value, including strings, integers, decimals and negative numbers.</p><p>For <code>complete</code> AWSSHADOW mode, the entire JSON is listed.</p><p>For example:</p><p><code>+EMQPERSIST:{"version":186201,"timestamp":1573232068,"state":{"key1":"value1","key2":"value2"},"metadata":{"key1":{"timestamp":1573232068},"key2":{"timestamp":1573232068}}}</code></p><p>where <code>value1</code> and <code>value2</code> are numeric values, including decimals and negative numbers.</p></td></tr></tbody></table>


---

# 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/smartconnect/at-command-reference/mqtt-at-commands/+emq-unsolicited-response-codes-urcs.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.
