README.md (65b6e0cdf79e922db850eaf5e25ee3501670d7a5) | README.md (daa2e90cf24e5bf3332f97f7b7b6cedf00b32a36) |
---|---|
1In this chapter, we first explain how Bluetooth chipsets are connected physically and then provide information about popular Bluetooth chipset and their use with BTstack. 2 3## HCI Interface 4 5The communication between a Host (a computer or an MCU) and a Host Controller (the actual Bluetooth chipset) follows the Host Controller Interface (HCI), see {@fig:HostChipsetConnection}. HCI defines how commands, events, asynchronous and synchronous data packets are exchanged. Asynchronous packets (ACL) are used for data transfer, while synchronous packets (SCO) are used for Voice with the Headset and the Hands-Free Profiles. 6 7{#fig:HostChipsetConnection} 8 --- 5 unchanged lines hidden (view full) --- 14For UART connections, different transport layer variants exist. 15 16### HCI H4 17The most common one is the official "UART Transport", also called H4. It requires hardware flow control via the CTS/RTS lines and assumes no errors on the UART lines. 18 19### HCI H5 20The "Three-Wire UART Transport", also called H5, makes use of the SLIP protocol to transmit a packet and can deal with packet loss and bit-errors by retransmission. While it is possible to use H5 really with "three wires" without hardware handshake, we recommend to use a full UART with hardware handshake. If your design lacks the hardware handshake, H5 is your only option. 21 | 1In this chapter, we first explain how Bluetooth chipsets are connected physically and then provide information about popular Bluetooth chipset and their use with BTstack. 2 3## HCI Interface 4 5The communication between a Host (a computer or an MCU) and a Host Controller (the actual Bluetooth chipset) follows the Host Controller Interface (HCI), see {@fig:HostChipsetConnection}. HCI defines how commands, events, asynchronous and synchronous data packets are exchanged. Asynchronous packets (ACL) are used for data transfer, while synchronous packets (SCO) are used for Voice with the Headset and the Hands-Free Profiles. 6 7{#fig:HostChipsetConnection} 8 --- 5 unchanged lines hidden (view full) --- 14For UART connections, different transport layer variants exist. 15 16### HCI H4 17The most common one is the official "UART Transport", also called H4. It requires hardware flow control via the CTS/RTS lines and assumes no errors on the UART lines. 18 19### HCI H5 20The "Three-Wire UART Transport", also called H5, makes use of the SLIP protocol to transmit a packet and can deal with packet loss and bit-errors by retransmission. While it is possible to use H5 really with "three wires" without hardware handshake, we recommend to use a full UART with hardware handshake. If your design lacks the hardware handshake, H5 is your only option. 21 |
22### BCSP 23The predecessor of H5. The main difference to H5 is that Even Parity is used for BCSP. To use BCSP with BTstack, you use the H5 transport and can call *hci_transport_h5_enable_bcsp_mode* 24 |
|
22### eHCILL 23Finally, Texas Instruments extended H4 to create the "eHCILL transport" layer that allows both sides to enter sleep mode without loosing synchronisation. While it is easier to implement than H5, it it is only supported by TI chipsets and cannot handle packet loss or bit-errors. 24 25### HCI Shortcomings 26 27Unfortunately, the HCI standard misses a few relevant details: 28 29 * For UART based connections, the initial baud rate isn't defined but most Bluetooth chipsets use 115200 baud. For better throughput, a higher baud rate is necessary, but there's no standard HCI command to change it. Instead, each vendor had to come up with their own set of vendor-specific commands. Sometimes, additional steps, e.g. doing a warm reset, are necessary to activate the baud rate change as well. --- 14 unchanged lines hidden (view full) --- 44CSR, which has been acquired by Qualcomm, provides all relevant information on their Support website after signing an NDA. 45 46## Chipset Overview 47 48Chipset | Type | HCI Transport | BD_ADDR (1) | SCO over HCI (2) | LE DLE | Multiple LE Roles | BTstack folder | Comment 49-------------------- |-----------| ---------------|--------------|------------------|--------|----------------------|----------------|--------- 50Broadcom UART | Dual mode | H4, H5 | Rarely | Probably (2) | No | Maybe (3) | bcm | Max UART baudrate 2 mbps 51Broadcom USB Dongles | Dual mode | USB | Yes | Yes | No | No | bcm | | 25### eHCILL 26Finally, Texas Instruments extended H4 to create the "eHCILL transport" layer that allows both sides to enter sleep mode without loosing synchronisation. While it is easier to implement than H5, it it is only supported by TI chipsets and cannot handle packet loss or bit-errors. 27 28### HCI Shortcomings 29 30Unfortunately, the HCI standard misses a few relevant details: 31 32 * For UART based connections, the initial baud rate isn't defined but most Bluetooth chipsets use 115200 baud. For better throughput, a higher baud rate is necessary, but there's no standard HCI command to change it. Instead, each vendor had to come up with their own set of vendor-specific commands. Sometimes, additional steps, e.g. doing a warm reset, are necessary to activate the baud rate change as well. --- 14 unchanged lines hidden (view full) --- 47CSR, which has been acquired by Qualcomm, provides all relevant information on their Support website after signing an NDA. 48 49## Chipset Overview 50 51Chipset | Type | HCI Transport | BD_ADDR (1) | SCO over HCI (2) | LE DLE | Multiple LE Roles | BTstack folder | Comment 52-------------------- |-----------| ---------------|--------------|------------------|--------|----------------------|----------------|--------- 53Broadcom UART | Dual mode | H4, H5 | Rarely | Probably (2) | No | Maybe (3) | bcm | Max UART baudrate 2 mbps 54Broadcom USB Dongles | Dual mode | USB | Yes | Yes | No | No | bcm | |
52CSR UART | Dual mode | H4, H5 | Rarely | No (didn't work) | No | No | csr | | 55CSR UART | Dual mode | H4, H5, BCSP | Rarely | No (didn't work) | No | No | csr | |
53CSR USB Dongles | Dual mode | USB | Mostly | Yes | No | No | csr | 54Dialog DA14581 | LE | H4, SPI | No | n.a. | No | No | da14581 | Official HCI firmware included in BTstack 55EM 9301 | LE | SPI | No | n.a. | No | No | em9301 | Custom HCI SPI implementation 56EM 9304 | LE | SPI, H4 | ? | n.a. | Yes | No | | Waiting for dev kit 57Nordic nRF | LE | H4 | Fixed Random | n.a. | Yes | Yes | | Requires custom HCI firmware 58STM STLC2500D | Classic | H4 | No | No (didn't try) | n.a | n.a. | stlc2500d | Custom deep sleep management not supported 59Toshiba TC35661 | Dual mode | H4 | No | No (didn't try) | No | No | tc3566 | HCI version not tested. See below 60TI CC256x, WL183x | Dual mode | H4, H5, eHCILL | Yes | Yes | No | Yes for CC256XC | cc256x | Also WL185x, WL187x, and WL189x --- 191 unchanged lines hidden --- | 56CSR USB Dongles | Dual mode | USB | Mostly | Yes | No | No | csr | 57Dialog DA14581 | LE | H4, SPI | No | n.a. | No | No | da14581 | Official HCI firmware included in BTstack 58EM 9301 | LE | SPI | No | n.a. | No | No | em9301 | Custom HCI SPI implementation 59EM 9304 | LE | SPI, H4 | ? | n.a. | Yes | No | | Waiting for dev kit 60Nordic nRF | LE | H4 | Fixed Random | n.a. | Yes | Yes | | Requires custom HCI firmware 61STM STLC2500D | Classic | H4 | No | No (didn't try) | n.a | n.a. | stlc2500d | Custom deep sleep management not supported 62Toshiba TC35661 | Dual mode | H4 | No | No (didn't try) | No | No | tc3566 | HCI version not tested. See below 63TI CC256x, WL183x | Dual mode | H4, H5, eHCILL | Yes | Yes | No | Yes for CC256XC | cc256x | Also WL185x, WL187x, and WL189x --- 191 unchanged lines hidden --- |