Announcing support for Bluetooth Low Energy in Amazon FreeRTOS

Today, AWS announced general availability for Bluetooth Low Energy support in Amazon FreeRTOS. This release simplifies your development process to securely connect Amazon FreeRTOS devices using Bluetooth Low Energy to AWS IoT Core via Android and iOS devices. It also makes it easier to remotely update firmware on Amazon FreeRTOS devices using Bluetooth Low Energy.

Millions of devices rely on Bluetooth Low Energy connectivity, including fitness trackers, headsets, smaller, battery-operated sensors, and much more. Most of these devices can benefit from connecting to AWS IoT.

Currently, to add Bluetooth Low Energy connectivity to applications running Amazon FreeRTOS, you must first select the microcontrollers and the compatible Bluetooth Low Energy stacks. You then integrate Amazon FreeRTOS libraries to corresponding software development kits (SDKs). Finally, you code and test the pairing process with mobile devices.

After Bluetooth Low Energy devices deploy, you may find it complex to monitor, manage, or update firmware on these devices, especially with the challenges associated with the handling incompatible communication protocols and unique device management requirements.

Bluetooth Low Energy support in Amazon FreeRTOS enables you to use the standard Generic Access Profile (GAP) and Generic Attributes (GATT) profiles through a universal application programming interface (API) layer, shown as Bluetooth Low Energy Management Library in the following diagram.

Taking advantage of this functionality, you can create Bluetooth Low Energy applications that are portable across Amazon FreeRTOS-qualified devices. You can then integrate companion Android/iOS SDKs with AWS IoT Core functionality. This support simplifies your development process by eliminating the need to port code yourself, or code and test against mobile SDKs.

Amazon FreeRTOS Architecture with Bluetooth Low Energy Management Library

According to the Bluetooth Low Energy specifications, GAP defines how Bluetooth Low Energy devices broadcast availability and communicate with each other. After the device connects, GATT describes how data transfers.

Amazon FreeRTOS Bluetooth Low Energy supports the Bluetooth Low Energy Secure Connections pairing mechanism (in addition to Just WorksTM), giving you confidence that your Bluetooth Low Energy devices are connecting to a trusted entity. Bluetooth Low Energy support in Amazon FreeRTOS also makes it easy for you to monitor, manage, and update firmware on the Bluetooth Low Energy devices. Handle all your firmware needs through the authenticated Android/iOS device using the over-the-air (OTA) update functionality in AWS IoT Device Management. You can learn more on performing OTA updates using Bluetooth Low Energy here.

Amazon FreeRTOS Bluetooth Low Energy devices can also use other AWS services such as AWS IoT Device Shadows and AWS IoT Device Defender.

You can get started in three steps:

  1. Use Amazon FreeRTOS on your choice of hardware. To simplify and accelerate your development process, AWS provides prequalified devices that run optimally with Amazon FreeRTOS using the AWS Partner Device Catalog. Today, AWS launches three popular development boards qualified for Amazon FreeRTOS Bluetooth Low Energy:
  2. Download source code from the Amazon FreeRTOS console or the Amazon FreeRTOS GitHub repo. Download Android and iOS SDKs from GitHub, which also contains sample Android and iOS apps that you can build and deploy to your Bluetooth Low Energy device.
  3. Review the hardware-specific Getting Started section in the Amazon FreeRTOS User Guide.

How Bluetooth Low Energy in Amazon FreeRTOS works 

Fitness trackers are a good example of Bluetooth Low Energy devices. Fitness trackers collect sensor data, including body temperature, number of steps, and heart rate, sending the data to the cloud for performance insights or progress toward a goal. These fitness trackers connect locally to a mobile device over Bluetooth Low Energy, and the mobile phone acts as a proxy to connect to the cloud.

Running Amazon FreeRTOS on these devices helps publish sensor data and subscribe to MQTT topics over Bluetooth Low Energy through the mobile device. Also, the MQTT library helps your device securely communicate with the AWS IoT MQTT broker. The iOS and Android SDKs provide proxy libraries and a sample app to help you create your custom app using APIs that the SDKs expose. The mobile device uses Amazon Cognito for authenticating with AWS IoT, as shown in the following diagram. If you have your identity management system, you can use X.509 certificates for authentication.

Bluetooth Low Energy devices communicate with AWS IoT MQTT broker via Android and iOS devices

To update your trackers’ firmware for security patches or new features, you can use Amazon FreeRTOS over-the-air updates (OTA) over Bluetooth Low Energy. For more information, see OTA Tutorial. MQTT over Bluetooth Low Energy also enables you to access other AWS services such as AWS IoT Device Shadows and AWS IoT Device Defender.

Devices such as home appliances typically connect to the cloud over Wi-Fi because of their proximity to a local Wi-Fi access point. However, during first installation, technicians more easily and cheaply provision the Wi-Fi credentials of such appliances (that is, the SSID and password) using Bluetooth Low Energy. Technicians connect to the home appliance over Bluetooth Low Energy using a secure company app and push the Wi-Fi credentials to the appliance securely. The next time the appliance boots up, it already has the right credentials to connect to the local Wi-Fi access point.

The Amazon FreeRTOS Bluetooth Low Energy library includes a GATT service for configuring Wi-Fi networks and demo examples to help you get started. You can save multiple Wi-Fi configurations. You can re-prioritize, add, and delete saved networks. AWS pairs your device and mobile phone using Bluetooth Low Energy Secure Connections with Numeric Comparison. This process ensures secure data transfer. You can also create your own GATT services using the Bluetooth Low Energy management API.

For more information about using MQTT over Bluetooth Low Energy, Wi-Fi provisioning over Bluetooth Low Energy, and establishing your own GATT services, see Bluetooth Low Energy Demo Applications. You can download these demo applications from GitHub or the Amazon FreeRTOS console.

For more information on this release, refer to the blog – Announcing Amazon FreeRTOS 201906.00 Major.