As of July 31st, 2023, this repository is deprecated. The contents of this repository will remain available but we will no longer provide updates nor accept new contributions and pull requests. We recommend instead that you start here for creating interactions between an Android device and AWS. For Bluetooth Low Energy APIs we recommend you start here.
Since the initial release of this package, several new Android versions have been released bringing with them enhanced security and usability. AWS Amplify has also released dozens of later versions of the AWS SDK with many new features and bug fixes.
The amazon-freertos-ble-android-sdk is being deprecated to remove an example built on outdated code.
Once the connection to the device is established, you get an AmazonFreeRTOSDevice object, and you can
use this object to do WiFi provisioning or Mqtt proxy.
WiFi Provisioning Service
Provision the WiFi credential on the FreeRTOS device through the app. It provides 4 functions:
ListNetwork
SaveNetwork
EditNetwork
DeleteNetwork
MQTT Proxy Service
The MQTT proxy service controls the MQTT proxy. It allows the device to send and receive MQTT messages
from the AWS IoT cloud through the phone, when this feature is enabled.
Announcement:
As of July 31st, 2023, this repository is deprecated. The contents of this repository will remain available but we will no longer provide updates nor accept new contributions and pull requests. We recommend instead that you start here for creating interactions between an Android device and AWS. For Bluetooth Low Energy APIs we recommend you start here.
Since the initial release of this package, several new Android versions have been released bringing with them enhanced security and usability. AWS Amplify has also released dozens of later versions of the AWS SDK with many new features and bug fixes.
The amazon-freertos-ble-android-sdk is being deprecated to remove an example built on outdated code.
Have more questions? Post them in the FreeRTOS forum.
FreeRTOS BLE Mobile SDK for Android
Introduction
Using the Android SDK for FreeRTOS Bluetooth Devices, you can create mobile applications that do the following:
Scan for and connect to nearby BLE devices running FreeRTOS
Perform WiFi provisioning of the FreeRTOS BLE devices after connecting to them ( Only supported for Espressif ESP32-DevKitC )
Act as a proxy for transmitting MQTT messages between a device running FreeRTOS and the AWS IoT cloud
System requirements
Android 6.0 (API level 23) or higher
Bluetooth 4.2 or higher
Android Studio
Setting Up the SDK
Option 1: install from maven In your app’s
)
build.gradlefile, add the following into dependencies block: (replace x.y.z withOption 2: Build the sdk locally. In your app’s
build.gradlefile, add the following into dependencies block:In project’s
settings.gradlefile, add ‘:amazonfreertossdk’AndroidManifest.xmlfile, add following permissions:In addition to adding location permissions, this is required by android to perform a successful BLE scan.
Contents
BLE Helper Functions
The SDK includes some functions that help you perform BLE operations with FreeRTOS devices:
Once the connection to the device is established, you get an AmazonFreeRTOSDevice object, and you can use this object to do WiFi provisioning or Mqtt proxy.
WiFi Provisioning Service
Provision the WiFi credential on the FreeRTOS device through the app. It provides 4 functions:
MQTT Proxy Service
The MQTT proxy service controls the MQTT proxy. It allows the device to send and receive MQTT messages from the AWS IoT cloud through the phone, when this feature is enabled.
You can find the API documentation for these functions in the docs directory of this repository and on github pages.
Demo Application
The SDK includes a demo application that demonstrates some of the main features of the SDK. You can find the demo in app.
License
This library is licensed under the Apache 2.0 License.