Device data and configuration

Sending and receiving data is different for each cloud operator.

AWS

The data published by the device and the configuration options are described in detail in the state JSON schema file for AWS. See the state JSON document for an AWS example.

See AWS IoT Device Shadow service and MQTT topics for the implementation details for AWS.

Azure

The data published by the device and the configuration options are described in detail in the state JSON schema file for Azure. See the state JSON document for an Azure example.

See Azure IoT Shadow and topics for the implementation details for AWS.

Comparing state with messages

Most of the data is stored in the digital twin of the device. This is useful for a quick query of the last known data from the device. However, some data does not fit well into this model because of its ephemeral nature. For example, button pushes are sent as messages and are not stored in the digital twin. Button is a UI element and in the case of push buttons, there is no state, which could be restored on the device or a state that persists over a longer time.

The messages published by the device are described in detail in the messages JSON schema file. See the messages JSON document for an example message.

The neighboring cell measurement report is another piece of data that is not stored in the digital twin of the device. It is published through a separate topic, because depending on the cloud platform, its size can exceed the allowed size of the digital twin document. The neighboring cell measurement report published by the device is described in detail in the ncellmeas JSON schema file. See the ncellmeas JSON document for an example report.

A-GPS and P-GPS data

If supported through enabling nRF Cloud Location Services, the device can request A-GPS and P-GPS data through MQTT.

The A-GPS message published by the device is described in detail in the A-GPS JSON schema file. See the A-GPS request JSON document for an example request. The cloud publishes the requested types as binary to the <device Id>/agps topic. If the device requests ephemerides (type 2), this message is too large to combine with other types and will be published in a separate message.

The P-GPS message published by the device is described in the P-GPS request JSON schema file. See the P-GPS request JSON document for an example request. The cloud publishes a link to the data to the <device Id>/pgps topic in the format described in detail in the P-GPS response JSON schema file. See the P-GPS response JSON document for an example response. The device can then use HTTP or HTTPS to download the P-GPS data.

Batch data

The firmware may send data as batch, using the schema that is described in the JSON schema file. See the JSON document for an example batch message.

For sending batched data from the device, the topic <deviceId>/batch is used.