Bluetooth Low Energy Settings for Alexa Gadgets


This topic describes the settings that your gadget must use to communicate with an Echo device over Bluetooth Low Energy (BLE).

For a description of the pairing, connection, and reconnection communication flows that use these settings, see the following topics:

At the appropriate steps, the communication flows refer to this topic for the settings that the gadget must use to successfully complete the step.

For Alexa Gadgets Toolkit issues related to Bluetooth, see Bluetooth on the known issues page.

Advertisement packet for device discovery

When a user puts an Echo device into pairing mode, the Echo device scans for Bluetooth devices within range. For the Echo device to find the gadget over BLE, the gadget must broadcast advertisement (ADV) packets that contain the data shown in this section. Each byte is stored in little-endian order. The structure of the advertisement packet depends on whether the gadget is advertising for pairing or for reconnection.

For details on data format types that you can use for this packet, see Supplement to the Bluetooth Core Specification. If your gadget supports other BLE services, we recommend that you use the "Multiple ADV" feature.

For an example of an advertisement packet, see the sample code described in Bluetooth Low Energy Handshake Sample Code.

Advertisement packet for pairing

The advertisement packet for pairing has the following structure.

Byte offset Description Value
0 Length of the Flags AD Type. 0x02
1 The Flags AD Type identifier. 0x01
2 0x06 if the gadget supports BLE only. 0x1A if the gadget supports both BR/EDR and BLE. 0x06 is currently the only supported value.
3 Length of the list of 16-bit service class UUID AD type identifiers. 0x03
4 List of 16-bit service class UUID AD type identifiers. 0x03
5-6 16-bit UUID for Alexa. 0xFE03
7 Length of the Service Data AD Type (23 bytes) 0x17
8 Service Data AD Type identifier. 0x16
9-10 16-bit UUID for Alexa. 0xFE03
11-12 Vendor ID assigned by the Bluetooth SIG.

You can find a list of company IDs on the Bluetooth site. If your gadget does not have this, you can use 0x0171.

13 Reserved for future use. 0x00
14 Product category. 0xFF
15 Reserved for future use. 0x00
16 Bit 0: Pairing or reconnection mode.
Bit 1: Classic Bluetooth discoverability.
Bits 2 through 7: Reserved for future use.
Bit 0: Set to 1, which means the gadget is in pairing mode.
Bit 1: Set to 1 if Classic Bluetooth is discoverable. Otherwise, 0.
Bits 2 through 7: Set to 0x00.
17-30 Reserved for future use. 0x00

Advertisement packet for reconnection

The advertisement packet for reconnection has the following structure.

Byte offset Description Value
0 Length of the Flags AD Type. 0x02
1 The Flags AD Type identifier. 0x01
2 0x06 if the gadget supports BLE only. 0x1A if the gadget supports both BR/EDR and BLE. 0x06 is currently the only supported value.
3 Length of the Service Data AD Type (27 bytes) 0x1B
4 Service Data AD Type identifier. 0x16
5-6 16-bit UUID for Alexa. 0xFE03
7-8 Vendor ID assigned by the Bluetooth SIG.

You can find a list of company IDs on the Bluetooth site. If your gadget does not have this, you can use 0x0171.

9 Reserved for future use. 0x00
10 Product category. 0xFF
11 Reserved for future use. 0x00
12 Bit 0: Pairing or reconnection mode.
Bit 1: Classic Bluetooth discoverability.
Bits 2 through 7: Reserved for future use.
Bit 0: Set to 0, which means the gadget is in reconnection mode.
Bit 1: Set to 1 if Classic Bluetooth is discoverable. Otherwise, 0.
Bits 2 through 7: Set to 0x00.
13-30 Reserved for future use. 0x00

GATT settings

This section contains the Generic Attribute Profile (GATT) settings that the gadget must use for data communication for transmit (Tx) and receive (Rx). The Tx channel transmits data from an Echo device to a gadget. The Rx channel transmits data from a gadget to an Echo device. Also, to enable notifications from an Echo device, the gadget must support a descriptor on an Rx characteristic.

Description UUID UUID (16-bit) Permissions Properties
GATT service 0000FE03-0000-1000-8000-00805F9B34FB 0xFE03 ---- ----
Characteristic Tx F04EB177-3005-43A7-AC61-A390DDF83076 ---- Write (Encrypted) Write
Characteristic Rx 2BEEA05B-1879-4BB4-8A2F-72641F82420B ---- Read (Encrypted) Notify

Bluetooth addressing schemes

All gadgets that support BLE (either dual mode or LE only) should use the following addressing scheme for BLE advertisement.

Device type Preferred transport Address type Advertisement type
Dual mode LE (GATT) Resolvable private random Connectable
LE only LE (GATT) Resolvable private random Connectable

Protocol version packet

This section contains the format of the protocol version (PV) packet that the gadget must send the Echo device. The Echo device will not send any packets to the gadget until the Echo device receives the PV packet. The PV packet is 20 bytes long and each byte is stored in big-endian order.

For an example of a PV packet, see the sample code described in Bluetooth Low Energy Handshake Sample Code.

Length (bytes) Description Value
2 Protocol identifier. 0xFE03
1 Major version. 0x03
1 Minor version. 0x00
2

Maximum transmission unit (MTU). This value is the maximum length of the data packets that the gadget and the Echo device exchange over BLE.

In the PV packet, the gadget should specify the MTU value that the gadget and the Echo device negotiated during the GATT discovery phase. If the gadget and the Echo device were unable to negotiate the MTU prior to the PV packet, the gadget should set this value to zero. Maximum: 515

2 Maximum transactional data size. That is, the maximum size of data chunks that the gadget can send or receive. Depends on available buffer sizes
12 Reserved 0x00

Was this page helpful?

Last updated: Feb 14, 2022