Exosite

February 9, 2016

Embedded IoT Protocols Guide: Transport Protocols

By Exosite · 2 min read · From the team

Following the internet protocol, the next layer in the stack is the transport layer. This layer is important to consider when creating your IoT strategy because it provides the common features that all higher-level protocols need. This prevents the need to re-implement these features over and over in each application protocol. Below is a brief explanation of the User Datagram Protocol (UDP) and the Transmission Control Protocol (TCP), and an explanation of the trade-offs between them when selecting between application protocols that leverage them.

UDP

UDP is the most basic transport protocol and provides just two features on top of IP. The first is data integrity that, through the use of check-sums, ensures that the received data is the same as the data that was sent. The second is application muxing that, through the use of port numbers, allows the network stack to direct individual packets back to the application, or subsystem in an IoT product deployment, that requested them.

This relative lack of features makes UDP incredibly simple to implement on top of IP, adding basically no hardware requirements to the application. However, it does lack some features that IoT applications are very likely to need, which the higher-level protocols will need to make up for.

TCP

TCP is UDP’s big brother. At a high level, it provides reliable delivery of streams of data. It ensures that data is delivered exactly as it was sent and in the order it was sent. It also automatically re-requests any data that was lost or corrupted in transport, in addition to many more subtle features.

A TCP stack is much more complicated than UDP to implement and will require more hardware resources to use. However, this burden is often acceptable, as many applications will require some of the features that TCP provides. With the increasing availability of more powerful hardware at lower costs, the burden of TCP’s additional features not being required in a particular application is becoming less of a factor. There are even hardware network interfaces that include a full TCP stack, offloading all of the transport-level requirements from host devices.