Get started with BLE BLE reference
Digi XBee3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
75
XBee API BLEService
You can configure the XBee through the BLE interface using API frame requests and responses. The
API frame format through Bluetooth is equivalent to setting AP=1 and transmitting the frames over
the UART or SPI interface. API frames can be executed over Bluetooth regardless of the AP setting.
The BLE interface allows these frames:
n BLE Unlock API - 0x2C
n BLEUnlock Response - 0xAC
n AT Command - 0x08
This API reference assumes that you are familiar with Bluetooth and GATT services. The specifications
for Bluetooth are an open standard and can be found at the following links:
n Bluetooth Core Specifications: https://www.bluetooth.com/specifications/bluetooth-core-
specification
n Bluetooth GATT: https://www.bluetooth.com/specifications/gatt/generic-attributes-overview
The XBee API GATT Service contains two characteristics: the API Request characteristic and the API
Response characteristic. The UUIDs for the service and its characteristics are listed in the table
below.
Characteristic UUID
APIService UUID 53da53b9-0447-425a-b9ea-9837505eb59a
APIRequest Characteristic UUID
7dddca00-3e05-4651-9254-44074792c590
API Response Characteristic UUID
f9279ee9-2cd0-410c-81cc-adf11e4e5aea
API Request characteristic
UUID: 7dddca00-3e05-4651-9254-44074792c590
Permissions: Writeable
XBee API frames are broken into chunks and transmitted sequentially to the request characteristic
using write operations. Valid frames will then be processed and the result will be returned through
indications on the response characteristic.
API frames do not need to be written completely in a single write operation to the request
characteristic. In fact, Bluetooth limits the size of a written value to 3 bytes smaller than the
configured MTU (Maximum Transmission Unit), which defaults to 23, meaning that by default, you can
only write 20 bytes at a time.
You must bond with the XBee in order to write to this characteristic. If you do not bond before writing,
you will receive errors when attempting to write.
After connecting and bonding, you must send a valid Bluetooth Unlock API Frame in order to
authenticate the connection. If the Bluetooth Unlock API Frame has not been executed, all other API
frames will be silently ignored and not processed.
API Response characteristic
UUID: f9279ee9-2cd0-410c-81cc-adf11e4e5aea
Permissions: Readable, Indicate