README.md (eccd9dc93183e27a83cd82a74bd6b12dfd52ea9e) | README.md (c63d0213aecaddf9702f96b37fb80ca90bff17bb) |
---|---|
1# 2 3In this chapter, we first explain how Bluetooth chipsets are connected physically and then provide information about popular Bluetooth chipset and their use with BTstack. 4 5## HCI Interface 6 7The 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. 8 --- 31 unchanged lines hidden (view full) --- 40 41 * SCO data for Voice can either be transmitted via the HCI interface or via an explicit PCM/I2S interface on the chipset. Most chipsets default to the PCM/I2S interface. To use it via USB or for Wide-Band Speech in the Hands-Free Profile, the data needs to be delivered to the host MCU. Newer Bluetooth standards define a HCI command to configure the SCO routing, but it is not implemented in the chipsets we've tested so far. Instead, this is configured in a vendor-specific way as well. 42 43 * In addition, most vendors allow to patch or configure their chipsets at run time by sending custom commands to the chipset. Obviously, this is also vendor dependent. 44 45## Documentation and Support 46The level of developer documentation and support varies widely between the various Bluetooth chipset providers. 47 | 1# 2 3In this chapter, we first explain how Bluetooth chipsets are connected physically and then provide information about popular Bluetooth chipset and their use with BTstack. 4 5## HCI Interface 6 7The 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. 8 --- 31 unchanged lines hidden (view full) --- 40 41 * SCO data for Voice can either be transmitted via the HCI interface or via an explicit PCM/I2S interface on the chipset. Most chipsets default to the PCM/I2S interface. To use it via USB or for Wide-Band Speech in the Hands-Free Profile, the data needs to be delivered to the host MCU. Newer Bluetooth standards define a HCI command to configure the SCO routing, but it is not implemented in the chipsets we've tested so far. Instead, this is configured in a vendor-specific way as well. 42 43 * In addition, most vendors allow to patch or configure their chipsets at run time by sending custom commands to the chipset. Obviously, this is also vendor dependent. 44 45## Documentation and Support 46The level of developer documentation and support varies widely between the various Bluetooth chipset providers. 47 |
48From our experience, only Texas Instruments and EM Microelectronics provide all relevant information directly on their website. Nordic Semiconductor does not officially have Bluetooth chipsets with HCI interface, but their documentation on the nRF5 series is complete and very informative. TI and Nordic also provide excellent support via their respective web forum. | 48From our experience, only Texas Instruments and EM Microelectronics provide all relevant information directly on their website. 49Nordic Semiconductor does not officially have Bluetooth chipsets with HCI interface, but their documentation on the nRF5 series is complete and very informative. 50TI and Nordic also provide excellent support via their respective web forum. |
49 | 51 |
50Broadcom, whose Bluetooth + Wifi division has been acquired by the Cypress Semiconductor Corporation, provides developer documentation only to large customers as far as we know. It's possible to join their Community forum and download the WICED SDK. The WICED SDK is targeted at Wifi + Bluetooth Combo chipsets and contains the necessary chipset patch files. | 52Infineon acquired Cypress Semiconductor Corporation in 2020, which acquired the Bluetooth + Wifi division of Broadcom in 2016 provides 53support via their Community Forum. In addition, firmware updates (PatchRAM files) for Bluetooth + Wifi controllers 54are available via [Murata's Cypress GitHub](https://github.com/murata-wireless/cyw-bt-patch). |
51 52CSR, which has been acquired by Qualcomm, provides all relevant information on their Support website after signing an NDA. 53 54 55## Chipset Overview 56 57| Chipset | Type | HCI Transport | BD_ADDR (1) | SCO over HCI (2) | LE DLE | Multiple LE Roles (3) | Classic SC (4) | LE Addr Resolution | BTstack folder | Comment | 58|--------------------------------------|------------------|----------------|--------------|------------------|------------|-----------------------|-------------------|--------------------|----------------|--------------------------------------------------| 59| Atmel ATWILC3000 | LE | H4 | Yes | n.a | No | No | n.a. | Don't know | atwilc3000 | BLE Firmware size: 60 kB | 60| Broadcom UART | Dual mode | H4, H5 | Rarely | Partially (2) | No | Maybe (3) | 43438: Yes | | bcm | Max UART baudrate 2 mbps | 61| Broadcom USB Dongles | Dual mode | USB | Yes | Yes | No | No | BCM20702: No | | bcm | | 62| CSR UART | Dual mode | H4, H5, BCSP | Rarely | Partially (2) | No | No | CSR8811: No | | csr | | 63| CSR USB Dongles | Dual mode | USB | Mostly | Yes | No | No | CSR8510: No | | csr | | | 55 56CSR, which has been acquired by Qualcomm, provides all relevant information on their Support website after signing an NDA. 57 58 59## Chipset Overview 60 61| Chipset | Type | HCI Transport | BD_ADDR (1) | SCO over HCI (2) | LE DLE | Multiple LE Roles (3) | Classic SC (4) | LE Addr Resolution | BTstack folder | Comment | 62|--------------------------------------|------------------|----------------|--------------|------------------|------------|-----------------------|-------------------|--------------------|----------------|--------------------------------------------------| 63| Atmel ATWILC3000 | LE | H4 | Yes | n.a | No | No | n.a. | Don't know | atwilc3000 | BLE Firmware size: 60 kB | 64| Broadcom UART | Dual mode | H4, H5 | Rarely | Partially (2) | No | Maybe (3) | 43438: Yes | | bcm | Max UART baudrate 2 mbps | 65| Broadcom USB Dongles | Dual mode | USB | Yes | Yes | No | No | BCM20702: No | | bcm | | 66| CSR UART | Dual mode | H4, H5, BCSP | Rarely | Partially (2) | No | No | CSR8811: No | | csr | | 67| CSR USB Dongles | Dual mode | USB | Mostly | Yes | No | No | CSR8510: No | | csr | | |
64| Cypress CYW20704/7 | Dual mode | H4, H5, USB | Don't know | Partially (2) | Yes | Yes | Yes | Yes | bcm | | 65| Cypress CYW20819 | Dual mode | H4, H5, USB | Don't know | Partially (2) | Yes | Yes | Yes | Don't know | bcm | Keep CTS high during power cycle | 66| Cypress CYW43xxx | Dual mode + Wifi | H4, H5 | Don't know | Partially (2) | Don't know | On newer versions | On wewer versions | On newer versions | bcm | Bluetooth + Wifi Combo Controller | | 68| Infineon CYW207xx | Dual mode | H4, H5, USB | Don't know | Partially (2) | Yes | Yes | Yes | Yes | bcm | | 69| Infineon CYW208xx | Dual mode | H4, H5, USB | Don't know | Partially (2) | Yes | Yes | Yes | Don't know | bcm | Keep CTS high during power cycle | 70| Infineon CYW43xxx | Dual mode + Wifi | H4, H5 | Don't know | Partially (2) | Don't know | On newer versions | On wewer versions | On newer versions | bcm | Bluetooth + Wifi Combo Controller | |
67| Cypress PSoC 4 | LE | H4 | Don't know | n.a. | Yes | Don't know | n.a. | Don't know | | HCI Firmware part of PSoC Creator kits examples | 68| Dialog DA14531 | LE | H4 | No | n.a. | Yes | Yes | n.a. | Don't know | da145xx | Official HCI firmware included in BTstack | 69| Dialog DA14581 | LE | H4, SPI | No | n.a. | No | No | n.a. | Don't know | da145xx | Official HCI firmware included in BTstack | 70| Dialog DA14585 | LE | H4, SPI | No | n.a. | Yes | Yes | n.a. | Yes | da145xx | Official HCI firmware included in BTstack | 71| Dialog DA1469x | LE | H4, SPI | No | n.a. | Yes | Yes | n.a. | Yes | da145xx | HCI Firmware part of DA1469x SDK | 72| Espressif ESP32 | Dual mode + Wifi | VHCI, H4 | Yes | Yes | Yes | Yes | Yes | Don't know | | SoC with Bluetooth and Wifi | 73| Espressif ESP32-S3,C3 | LE + Wifi | VHCI, H4 | Yes | No | Yes | Yes | Yes | Yes | | SoC with Bluetooth and Wifi | 74| EM 9301 | LE | SPI, H4 | No | n.a. | No | No | n.a. | Don't know | em9301 | Custom HCI SPI implementation | 75| EM 9304 | LE | SPI, H4 | Yes | n.a. | Yes | Yes | n.a. | Don't know | em9301 | Custom HCI SPI implementation | | 71| Cypress PSoC 4 | LE | H4 | Don't know | n.a. | Yes | Don't know | n.a. | Don't know | | HCI Firmware part of PSoC Creator kits examples | 72| Dialog DA14531 | LE | H4 | No | n.a. | Yes | Yes | n.a. | Don't know | da145xx | Official HCI firmware included in BTstack | 73| Dialog DA14581 | LE | H4, SPI | No | n.a. | No | No | n.a. | Don't know | da145xx | Official HCI firmware included in BTstack | 74| Dialog DA14585 | LE | H4, SPI | No | n.a. | Yes | Yes | n.a. | Yes | da145xx | Official HCI firmware included in BTstack | 75| Dialog DA1469x | LE | H4, SPI | No | n.a. | Yes | Yes | n.a. | Yes | da145xx | HCI Firmware part of DA1469x SDK | 76| Espressif ESP32 | Dual mode + Wifi | VHCI, H4 | Yes | Yes | Yes | Yes | Yes | Don't know | | SoC with Bluetooth and Wifi | 77| Espressif ESP32-S3,C3 | LE + Wifi | VHCI, H4 | Yes | No | Yes | Yes | Yes | Yes | | SoC with Bluetooth and Wifi | 78| EM 9301 | LE | SPI, H4 | No | n.a. | No | No | n.a. | Don't know | em9301 | Custom HCI SPI implementation | 79| EM 9304 | LE | SPI, H4 | Yes | n.a. | Yes | Yes | n.a. | Don't know | em9301 | Custom HCI SPI implementation | |
80| EM 9305 | LE | SPI, H4 | Yes | n.a. | Yes | Yes | n.a. | Yes | em9301 | Custom HCI SPI implementation | |
|
76| Intel Dual Wireless 3165, 8260, 8265 | Dual mode | USB | Yes | Probably | Don't know | Don't know | Don't know | Don't know | intel | Firmware size: 400 kB | 77| Nordic nRF | LE | H4 | Fixed Random | n.a. | Yes | Yes | n.a. | Yes | | Requires HCI firmware | | 81| Intel Dual Wireless 3165, 8260, 8265 | Dual mode | USB | Yes | Probably | Don't know | Don't know | Don't know | Don't know | intel | Firmware size: 400 kB | 82| Nordic nRF | LE | H4 | Fixed Random | n.a. | Yes | Yes | n.a. | Yes | | Requires HCI firmware | |
83| NXP 88W8997 | Dual mode | H4 | Yes | Partially(2) | Yes | Yes | No | Yes | nxp | Requires initial firmware | |
|
78| STM STLC2500D | Classic | H4 | No | Don't know | n.a | n.a. | No | n.a. | stlc2500d | Custom deep sleep management not supported | 79| Renesas RX23W | LE | H4 | No | n.a. | Yes | Yes | n.a . | Don't know | | HCI Firmware part of BTTS | 80| Realtek RTL8822CS | Dual mode + Wifi | H5 | Yes | Yes | Don't know | Don't know | Don't know | Don't know | | Requires initial firmware + config | 81| Realtek USB Dongles | Dual mode + Wifi | USB | Yes | Yes | Don't know | Don't know | Don't know | Don't know | realtek | Requires initial firmware + config | 82| Toshiba TC35661 | Dual mode | H4 | No | No | No | No | No | No | tc3566 | Only -007/009 models provide full HCI. See below | 83| TI CC256x, WL183x | Dual mode | H4, H5, eHCILL | Yes | Yes | No | Yes for CC256XC | No | No | cc256x | Also WL185x, WL187x, and WL189x | 84 85**Notes**: --- 9 unchanged lines hidden (view full) --- 95The ATILC3000 Bluetooth/Wifi combo controller has been used with Linux on embedded devices by Atmel/Microchip. Drivers and documentation are available from a [GitHub repository](https://github.com/atwilc3000). The ATWILC3000 has a basic HCI implementation stored in ROM and requires a firmware image to be uploaded before it can be used. The BLE Controller is qualified as [QDID 99659](https://www.bluetooth.org/tpg/QLI_viewQDL.cfm?qid=36402). Please note: the BLE firmware is around 60 kB. It might need a separate Wifi firmware as well. 96 97**BD Addr** can be set with vendor-specific command although all chipsets have an official address stored. The BD_ADDR lookup results in "Newport Media Inc." which was [acquired by Atmel](http://www.atmel.com/about/news/release.aspx?reference=tcm:26-62532) in 2014. 98 99**Baud rate** can be set with a custom command. 100 101**BTstack integration**: *btstack_chipset_atwilc3000.c* contains the code to download the Bluetooth firmware image into the RAM of the ATWILC3000. After that, it can be normally used by BTstack. 102 | 84| STM STLC2500D | Classic | H4 | No | Don't know | n.a | n.a. | No | n.a. | stlc2500d | Custom deep sleep management not supported | 85| Renesas RX23W | LE | H4 | No | n.a. | Yes | Yes | n.a . | Don't know | | HCI Firmware part of BTTS | 86| Realtek RTL8822CS | Dual mode + Wifi | H5 | Yes | Yes | Don't know | Don't know | Don't know | Don't know | | Requires initial firmware + config | 87| Realtek USB Dongles | Dual mode + Wifi | USB | Yes | Yes | Don't know | Don't know | Don't know | Don't know | realtek | Requires initial firmware + config | 88| Toshiba TC35661 | Dual mode | H4 | No | No | No | No | No | No | tc3566 | Only -007/009 models provide full HCI. See below | 89| TI CC256x, WL183x | Dual mode | H4, H5, eHCILL | Yes | Yes | No | Yes for CC256XC | No | No | cc256x | Also WL185x, WL187x, and WL189x | 90 91**Notes**: --- 9 unchanged lines hidden (view full) --- 101The ATILC3000 Bluetooth/Wifi combo controller has been used with Linux on embedded devices by Atmel/Microchip. Drivers and documentation are available from a [GitHub repository](https://github.com/atwilc3000). The ATWILC3000 has a basic HCI implementation stored in ROM and requires a firmware image to be uploaded before it can be used. The BLE Controller is qualified as [QDID 99659](https://www.bluetooth.org/tpg/QLI_viewQDL.cfm?qid=36402). Please note: the BLE firmware is around 60 kB. It might need a separate Wifi firmware as well. 102 103**BD Addr** can be set with vendor-specific command although all chipsets have an official address stored. The BD_ADDR lookup results in "Newport Media Inc." which was [acquired by Atmel](http://www.atmel.com/about/news/release.aspx?reference=tcm:26-62532) in 2014. 104 105**Baud rate** can be set with a custom command. 106 107**BTstack integration**: *btstack_chipset_atwilc3000.c* contains the code to download the Bluetooth firmware image into the RAM of the ATWILC3000. After that, it can be normally used by BTstack. 108 |
103## Broadcom/Cypress Semiconductor | 109## Broadcom/Cypress/Infineon Semiconductor |
104 105Before the Broadcom Wifi+Bluetooth division was taken over by Cypress Semiconductor, it was not possible to buy Broadcom chipset in low quantities. Nevertheless, module manufacturers like Ampak created modules that contained Broadcom BCM chipsets (Bluetooth as well as Bluetooth+Wifi combos) that might already have been pre-tested for FCC and similar certifications. 106 107A popular example is the Ampak AP6212A module that contains an BCM 43438A1 and is used on the Raspberry Pi 3, the RedBear Duo, and the RedBear IoT pHAT for older Raspberry Pi models. 108 109The CYW20704 A2 controller supports both DLE as well as multiple LE roles and is available e.g. from [LairdTech](https://www.lairdtech.com/bt850-bt851-and-bt860-series-modules-adapter-dvks-0002) as UART module (BT860), USB module (BT850), and USB dongle. 110 111Interestingly, the CYW20704 exhibits the same UART flow control bug as the CC2564. You can add ENABLE_CYPRESS_BAUDRATE_CHANGE_FLOWCONTROL_BUG_WORKAROUND to activate a workaround and/or read the bug & workardound description in the TI section below. --- 20 unchanged lines hidden (view full) --- 132 133**Baud rate** can be set with custom command. The baud rate resets during the warm start after uploading the init script. So, the overall scheme is this: start at default baud rate, get local version info, send custom Broadcom baud rate change command, wait for response, set local UART to high baud rate, and then send init script. After sending the last command from the init script, reset the local UART. Finally, send custom baud rate change command, wait for response, and set local UART to high baud rate. 134 135**BTstack integration**: The common code for all Broadcom chipsets is provided by *btstack_chipset_bcm.c*. During the setup, *btstack_chipset_bcm_instance* function is used to get a *btstack_chipset_t* instance and passed to *hci_init* function. 136 137SCO Data can be routed over HCI for both USB dongles and UART connections, however BTstack does not support flow control for UART connections. HSP and HFP Narrow Band Speech is supported via I2C/PCM pins. Newer Controllers provide an 138mSBC codec that allows to use HSP/HFP incl. WBS over PCM/I2S with ENABLE_BCM_PCM_WBS. 139 | 110 111Before the Broadcom Wifi+Bluetooth division was taken over by Cypress Semiconductor, it was not possible to buy Broadcom chipset in low quantities. Nevertheless, module manufacturers like Ampak created modules that contained Broadcom BCM chipsets (Bluetooth as well as Bluetooth+Wifi combos) that might already have been pre-tested for FCC and similar certifications. 112 113A popular example is the Ampak AP6212A module that contains an BCM 43438A1 and is used on the Raspberry Pi 3, the RedBear Duo, and the RedBear IoT pHAT for older Raspberry Pi models. 114 115The CYW20704 A2 controller supports both DLE as well as multiple LE roles and is available e.g. from [LairdTech](https://www.lairdtech.com/bt850-bt851-and-bt860-series-modules-adapter-dvks-0002) as UART module (BT860), USB module (BT850), and USB dongle. 116 117Interestingly, the CYW20704 exhibits the same UART flow control bug as the CC2564. You can add ENABLE_CYPRESS_BAUDRATE_CHANGE_FLOWCONTROL_BUG_WORKAROUND to activate a workaround and/or read the bug & workardound description in the TI section below. --- 20 unchanged lines hidden (view full) --- 138 139**Baud rate** can be set with custom command. The baud rate resets during the warm start after uploading the init script. So, the overall scheme is this: start at default baud rate, get local version info, send custom Broadcom baud rate change command, wait for response, set local UART to high baud rate, and then send init script. After sending the last command from the init script, reset the local UART. Finally, send custom baud rate change command, wait for response, and set local UART to high baud rate. 140 141**BTstack integration**: The common code for all Broadcom chipsets is provided by *btstack_chipset_bcm.c*. During the setup, *btstack_chipset_bcm_instance* function is used to get a *btstack_chipset_t* instance and passed to *hci_init* function. 142 143SCO Data can be routed over HCI for both USB dongles and UART connections, however BTstack does not support flow control for UART connections. HSP and HFP Narrow Band Speech is supported via I2C/PCM pins. Newer Controllers provide an 144mSBC codec that allows to use HSP/HFP incl. WBS over PCM/I2S with ENABLE_BCM_PCM_WBS. 145 |
146 |
|
140## CSR / Qualcomm Incorporated 141 142CSR plc has been acquired by Qualcomm Incorporated in August 2015. 143 144Similar to Broadcom, the best source for documentation is the source code for blueZ. 145 146CSR USB dongles do not require special configuration and SCO data is routed over USB by default. 147 --- 106 unchanged lines hidden (view full) --- 254 255 * Upload the firmware 256 257 $ ./flash_nrf52_pca10040.sh 258 259 * For the nRF51 Dev Kit, use `make BOARD=nrf51_pca10028` and `./flash_nrf51_10028.sh` with the nRF51 kit. 260 * The nRF5 dev kit acts as an LE HCI Controller with H4 interface. 261 | 147## CSR / Qualcomm Incorporated 148 149CSR plc has been acquired by Qualcomm Incorporated in August 2015. 150 151Similar to Broadcom, the best source for documentation is the source code for blueZ. 152 153CSR USB dongles do not require special configuration and SCO data is routed over USB by default. 154 --- 106 unchanged lines hidden (view full) --- 261 262 * Upload the firmware 263 264 $ ./flash_nrf52_pca10040.sh 265 266 * For the nRF51 Dev Kit, use `make BOARD=nrf51_pca10028` and `./flash_nrf51_10028.sh` with the nRF51 kit. 267 * The nRF5 dev kit acts as an LE HCI Controller with H4 interface. 268 |
269 270## NXP Semiconductors 271NXP Semiconductors acquired the Bluetooth + Wifi division of Marvel in 2019 and continues their products with new names. 272As the Controllers contain no Bluetooth firmware, the firmware needs to be uploaded on start. 273BTstack supports firmware upload for older Controllers with bootloader version v1, like the NXP 88W8997. 274 275**BD ADDR** is stored in Controller. 276 277**SCO data** is routed over HCI by default but does not support flow control. 278 279**Baud rate** is currently kept at 115200 280 281**Init script** is required. 282 283**BTstack integration**: firmware update required and implemented by *btstack_chipset_nxp.c* See port/posix-h4-nxp for details on how to use it. 284 285 |
|
262## Realtek 263 264Realtek provides Dual-Mode Bluetooth Controllers with USB and UART (H4/H5) interfaces as well as combined Bluetooth/WiFi Controllers, which are also available as M.2 modules for laptops. 265They commonly require to download a patch and a configuration file. Patch and configuration file can be found as part of their Linux drivers. 266 267**BD ADDR** is stored in Controller. 268 269**SCO data** can either be routed over HCI with working flow control or over I2S/PCM. The 8822CS supports mSBC codec internally. --- 126 unchanged lines hidden --- | 286## Realtek 287 288Realtek provides Dual-Mode Bluetooth Controllers with USB and UART (H4/H5) interfaces as well as combined Bluetooth/WiFi Controllers, which are also available as M.2 modules for laptops. 289They commonly require to download a patch and a configuration file. Patch and configuration file can be found as part of their Linux drivers. 290 291**BD ADDR** is stored in Controller. 292 293**SCO data** can either be routed over HCI with working flow control or over I2S/PCM. The 8822CS supports mSBC codec internally. --- 126 unchanged lines hidden --- |