The device ID is the unique identifier for your device. For IP-based devices provisioned on nRF Cloud, this id must be unique across all other devices in our system. It must also be used as the MQTT client id if your device is using MQTT.
The recommended device ID format is a UUID. All nRF9160 SiPs have a factory generated UUID that can be used as the device ID. See the section below for details on how to obtain your nRF9160’s UUID. See also "Configuration options for device ID" for details on configuring the device ID in your application firmware.
Nordic hardware products like the nRF9160 DK or Thingy:91 ship with a device ID in the format of
nrf-[IMEI], for example,
nrf-351358811330130. The IMEI is printed on the product's label. However, you are not restricted to using the nrf- format. To change the device ID, your device will require new credentials and properly configured application firmware.
Bluetooth Low Energy devices are a little different. If using our iPhone gateway app, Bluetooth LE devices will show an id in UUID format. If using the Android gateway app, Bluetooth LE device ids are usually MAC addresses. These ids do not have to be globally unique because they are not provisioned in the cloud, but only connected to a gateway. Device ID's for Bluetooth LE gateways will have a UUID with a soft-gateway prefix
Requires modem firmware v1.3.x and later.
The nRF9160 contains a UUID which can be used as the nRF Cloud device ID (MQTT client ID).
The UUID is found in the device identity attestation token, which is a base64 encoded CBOR object. To request an attestation token issue the following AT command:
The UUID will be displayed in the script's output on the line starting with
The output of the
KEYGEN AT command can be similarly parsed using
modem_credentials_parser.py to display the UUID.
The UUID is also included in JSON Web Tokens (JWTs) generated by the modem. To generate a JWT, use the JWT AT command. Decode the base64 output and the UUID can be found in the payload's
"iss" claim after "nRF9160.".