Cloud connectivity, a fundamental part of the majority of the Internet of Things (IoT) projects, is intertwined with expertise in embedded systems and software integration. That’s why MCU suppliers are working closely with cloud service providers to develop integrated hardware and software solutions that enable IoT developers to establish an edge-to-cloud connection using out-of-the-box solutions quickly and efficiently.
These collaborations take out most of the complexities in cloud-connected IoT deployments and thus significantly lower the barrier to entry for IoT solutions deployment. IoT developers, for instance, can connect development boards supplied by MCU vendors to cloud services like Google’s Cloud IoT Core and Amazon’s AWS IoT Core with a single click.
Anatomy of cloud connection
But how does an IoT-to-cloud connection actually work? For a start, like every communication cannel, the link between an IoT device and the cloud service is established via wired or wireless communication networks such as Ethernet and Wi-Fi. Next, there are two common transport- and application-layer protocols that help facilitate communication between an IoT device and a cloud service.
At the transport-layer level, the device-to-cloud communication usually takes place either via Transmission Control Protocol (TCP) or User Datagram Protocol (UDP). Here, it’s important to note that though TCP takes more network overhead, it’s favored in IoT applications for its reliability. UDP, on the other hand, is more suitable for applications like video streaming that can afford some data packet loss.
Next, at the application-layer level, Hyper Text Transfer Protocol (HTTP) is the common standard to send connection requests and return responses for TCP-based communications. Message Queuing Telemetry Transport (MQTT) is another application-layer protocol; it’s lightweight with a small code footprint and is becoming popular in resource-constrained IoT devices.
The role of APIs
It’s a two-way data communication over the Internet between a device and a remote service. An IoT device establishes a connection with the Internet Protocol (IP) network and is subsequently hooked to the cloud. Here, support from MCU vendors ranges from the hardware level to the API stacks to facilitate IoT-to-cloud development.
The APIs are well defined, and they include open-source client libraries, example codes, and protocol stacks. Then there are third-party tools that make these APIs easier to use and deploy. So, all developers need to learn is how to use IoT device interfaces effectively; embedded designers who know how to use or leverage IoT device APIs are now in high demand.
Take the example of how MCU suppliers are integrating software platforms like Amazon FreeRTOS into their microcontroller offerings (Figure 2). Amazon FreeRTOS is an open-source real-time operating system (RTOS) for microcontrollers that includes kernel and software libraries to connect small, low-power MCUs to Amazon’s cloud service AWS IoT Core.
The FreeRTOS-enabled microcontrollers can directly connect to a cloud service like AWS IoT Core, or they can connect to a local edge device such as AWS Greengrass and sustain the communications even if the IoT device loses connection to the cloud.