Application protocols

You can use raw application protocols like User Datagram Protocol (UDP) or Transmission Control Protocol (TCP) for communications, or you can add additional overhead but also get the benefits by using application protocols like Constrained Application Protocol (CoAP), Lightweight M2M (LWM2M), Message Queueing Telemetry Transport (MQTT) or Hypertext Transfer Protocol Secure (HTTPS). Check which protocols are supported by your cloud providers to narrow down your options.

nRF9160 supports UDPs (CoAP and LWM2M) and TCPs (MQTT and HTTPS). In some cases, TCPs can cause issues if you are using Narrowband Internet of Things (NB-IoT) because it is not required for NB-IoT to support TCP according to the 3GPP specification. If you need to use TCP, it is important to check your NB-IoT network by field testing or asking the carrier for that specific network about support.

MQTT is a widely supported protocol by cloud vendors and is already used by many IoT applications. Unfortunately, it is not a very power-efficient protocol because of the added overhead. HTTPS is a well-established standard but is not the most suitable protocol for a low-power device because of its large overhead. However, it is an effective protocol for Firmware-Over-The-Air (FOTA) updates.

The UDP based protocols are preferred when it comes to optimized power consumption, and the current lack of support by some cloud vendors is slowly but surely getting addressed. LwM2M has gained attention lately because it is specifically designed to reduce power and data usage on low-power devices. It is a popular protocol used for device management alongside CoAP to handle other data communication.

For possible data protocols, you should consider if you can optimize the data sent over the network by switching data protocols. For example, using CBOR instead of JSON reduces the amount of data that is sent, but this is dependent on the cloud site having support for it.

See our webinar on Cloud connectivity and protocols for the Internet of Things for more information on data protocols and transport protocols that you should consider in your designs.

Some considerations when selecting application protocols are: