Skip to content
iOS SDK for Amazon FreeRTOS Bluetooth Devices
Branch: beta
Clone or download
Latest commit b7c06cd Apr 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
AmazonFreeRTOS.xcodeproj Swift 5 Apr 12, 2019
AmazonFreeRTOS.xcworkspace Swift 5 Apr 12, 2019
AmazonFreeRTOS
AmazonFreeRTOSTests Initial Commit Nov 27, 2018
Example/AmazonFreeRTOSDemo
docs
.gitignore Fix data empty crash Apr 2, 2019
AmazonFreeRTOS.podspec Swift 5 Apr 12, 2019
CODE_OF_CONDUCT.md Initial Commit Nov 27, 2018
CONTRIBUTING.md
LICENSE Initial Commit Nov 27, 2018
NOTICE Update NOTICE Apr 11, 2019
Podfile Swift 5 Apr 12, 2019
Podfile.lock
README.md Update listNetwork filter logic Feb 20, 2019

README.md

iOS SDK for Amazon FreeRTOS Bluetooth Devices

Introduction

Using the iOS SDK for Amazon FreeRTOS Bluetooth Devices, you can create mobile applications that do the following:

  • Scan for and connect to nearby BLE devices running Amazon FreeRTOS

  • Provision Wi-Fi networks for a BLE device running Amazon FreeRTOS

  • Act as a proxy for transmitting MQTT messages between a device running Amazon FreeRTOS and the AWS IoT cloud

Setting Up the SDK

To install the iOS SDK for Amazon FreeRTOS Bluetooth Devices

  1. Install CocoaPods:
$ gem install cocoapods
$ pod setup

Note

You might need to use sudo to install CocoaPods.

  1. Install the SDK with CocoaPods (In Podfile):

Older version of the freertos firmware use JSON encoding, please use:

pod 'AmazonFreeRTOS', :git => 'https://github.com/aws/amazon-freertos-ble-ios-sdk.git', :tag => '0.9.4'

Newer version of the freertos firmware use CBOR encoding, please use:

pod 'AmazonFreeRTOS', :git => 'https://github.com/aws/amazon-freertos-ble-ios-sdk.git'

Contents

All main functions are defined in AmazonFreeRTOSManager.swift. These functions include:

BLE Helper Functions

The SDK includes some functions that help you perform BLE operations with Amazon FreeRTOS devices:

startScanForPeripherals()
stopScanForPeripherals()
rescanForPeripherals()
connectPeripheral()
disconnectPeripheral()

Device Information Service

The device information service provides basic device-related information. Its functions include:

getAfrVersionOfPeripheral(_ peripheral: CBPeripheral)
getBrokerEndpointOfPeripheral(_ peripheral: CBPeripheral)
getMtuOfPeripheral(_ peripheral: CBPeripheral)

MQTT Proxy Service

The MQTT proxy service controls the MQTT proxy. Its functions include:

getMqttProxyControlOfPeripheral(_ peripheral: CBPeripheral)
updateMqttProxyControlOfPeripheral(_ peripheral: CBPeripheral, mqttProxyControl: MqttProxyControl)

Network Config Service

The network configuration service configures the Wi-Fi network of the Amazon FreeRTOS Device. Its functions include:

listNetworkOfPeripheral(_ peripheral: CBPeripheral, listNetworkReq: ListNetworkReq)
saveNetworkToPeripheral(_ peripheral: CBPeripheral, saveNetworkReq: SaveNetworkReq)
editNetworkOfPeripheral(_ peripheral: CBPeripheral, editNetworkReq: EditNetworkReq)
deleteNetworkFromPeripheral(_ peripheral: CBPeripheral, deleteNetworkReq: DeleteNetworkReq)

Demo Application

The SDK includes a demo application that demonstrates some of the main features of the SDK. You can find the demo in Example/AmazonFreeRTOSDemo.

License

This library is licensed under the Apache 2.0 License.

You can’t perform that action at this time.