Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.89 KB

Bluetooth.md

File metadata and controls

26 lines (18 loc) · 1.89 KB

Bluetooth Gateway

What is this?

The Bluetooth feature of the Azure IoT PaaD application allows you to read data from Bluetooth Low Energy (BLE) devices around your phone and send it as telemetry to your Azure IoT Central application or an Azure IoT Hub.

How it works

  1. Once connected to Azure IoT, select the Bluetooth tab from the bottom tab bar.
  2. The app will start scanning for BLE devices nearby. Once they are found, they will show in the list.
  3. Tapping on a device will bring you to a detail view where you can see the data read from the device. Every time this data updates, it will be sent as a telemetry message.
    • For most devices, the only data read will be the RSSI (signal strength). See below to learn how to read specific data from your own BLE sensor by implementing the provided interface for your device.

Implementing devices

Note: Currently, the PaaD application supports reading data from BLE advertisements only. It does not support the BLE connection mechanism, nor reading/writing data to/from BLE characteristics or services.

Implementation structure

  • All relevant code can be found in src/bluetooth
  • BleDevice.ts contains the interface that must be implemented in order to read specific data from a given device's BLE advertisement. Refer to the inline documentation for the purpose of each method.
  • Once your device model is implemented, it needs to be added to the DeviceModels set in BleManger.ts.