Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
mringwal committed Oct 31, 2017
2 parents 594831b + 4bdbd75 commit a8bf470ad2dc8c4b69648cd57d7cc743858b69ba
Showing with 1,799 additions and 564 deletions.
  1. +11 −12 chipset/README.md
  2. +12 −8 example/Makefile.inc
  3. +86 −32 example/a2dp_sink_demo.c
  4. +12 −20 example/a2dp_source_demo.c
  5. +130 −0 example/dut_mode_classic.c
  6. +1 −0 example/hog_keyboard_demo.c
  7. +1 −0 example/hog_mouse_demo.c
  8. +3 −3 example/panu_demo.c
  9. +9 −4 platform/freertos/btstack_run_loop_freertos.c
  10. +2 −7 platform/freertos/btstack_uart_block_freertos.c
  11. +248 −0 platform/posix/btstack_tlv_posix.c
  12. +67 −0 platform/posix/btstack_tlv_posix.h
  13. +23 −12 platform/posix/btstack_uart_block_posix.c
  14. +3 −0 port/esp32/.gitignore
  15. +52 −8 port/esp32/components/btstack/main.c
  16. +3 −0 port/esp32/template/sdkconfig
  17. +8 −7 port/libusb/.gitignore
  18. +21 −13 port/posix-h4/.gitignore
  19. +21 −3 port/posix-h5/.gitignore
  20. +20 −6 port/stm32-f4discovery-cc256x/create_examples.py
  21. +2 −2 port/stm32-f4discovery-cc256x/eclipse-template/ldscripts/mem.ld
  22. +3 −0 port/stm32-f4discovery-cc256x/src/port.c
  23. +1 −1 src/ble/att_db_util.c
  24. +10 −4 src/ble/gatt-service/hids_device.c
  25. +32 −70 src/ble/le_device_db_tlv.c
  26. +9 −2 src/ble/sm.c
  27. +94 −35 src/btstack_defines.h
  28. +260 −118 src/btstack_event.h
  29. +1 −1 src/btstack_uart_block.h
  30. +2 −1 src/classic/a2dp_sink.c
  31. +28 −25 src/classic/avdtp.c
  32. +27 −2 src/classic/avrcp.h
  33. +226 −116 src/classic/avrcp_controller.c
  34. +62 −20 src/classic/avrcp_target.c
  35. +25 −0 src/hci_cmd.c
  36. +4 −2 src/hci_cmd.h
  37. +17 −1 src/hci_transport_h5.c
  38. +1 −0 test/Makefile
  39. +1 −1 test/att_db/le_counter.h
  40. +28 −23 test/avrcp/avrcp_controller_test.c
  41. +1 −1 test/flash_tlv/tlv_le_test.c
  42. +2 −0 test/tlv_posix/.gitignore
  43. +47 −0 test/tlv_posix/Makefile
  44. +164 −0 test/tlv_posix/tlv_test.c
  45. +11 −4 tool/compile_gatt.py
  46. +8 −0 tool/create_packet_log.py
View
@@ -53,42 +53,39 @@ CSR, which has been acquired by Qualcomm, provides all relevant information on t
Chipset | Type | HCI Transport | BD_ADDR (1) | SCO over HCI (2) | LE DLE | Multiple LE Roles | BTstack folder | Comment
-------------------- |-----------| ---------------|--------------|------------------|--------|----------------------|----------------|---------
Atmel ATWILC3000 | Dual mode | H4 | Yes | Don't know | No | No | atwilc3000 | Firmware size: 270 kB
Atmel ATWILC3000 | LE (4) | H4 | Yes | Don't know | No | No | atwilc3000 | Firmware size: 270 kB
Broadcom UART | Dual mode | H4, H5 | Rarely | Probably (2) | No | Maybe (3) | bcm | Max UART baudrate 2 mbps
Broadcom USB Dongles | Dual mode | USB | Yes | Yes | No | No | bcm |
CSR UART | Dual mode | H4, H5, BCSP | Rarely | No (didn't work) | No | No | csr |
CSR USB Dongles | Dual mode | USB | Mostly | Yes | No | No | csr |
Dialog DA14581 | LE | H4, SPI | No | n.a. | No | No | da14581 | Official HCI firmware included in BTstack
Espressif ESP32 | Dual mode | VHCI | Yes | Probably | Yes | Yes | | SoC with Bluetooth and Wifi
EM 9301 | LE | SPI, H4 | No | n.a. | No | No | em9301 | Custom HCI SPI implementation
EM 9304 | LE | SPI, H4 | No | n.a. | Yes | Yes | em9301 | Custom HCI SPI implementation
EM 9304 | LE | SPI, H4 | Yes | n.a. | Yes | Yes | em9301 | Custom HCI SPI implementation
Nordic nRF | LE | H4 | Fixed Random | n.a. | Yes | Yes | | Requires HCI firmware
STM STLC2500D | Classic | H4 | No | No (didn't try) | n.a | n.a. | stlc2500d | Custom deep sleep management not supported
Toshiba TC35661 | Dual mode | H4 | No | No (didn't try) | No | No | tc3566 | HCI version not tested. See below
TI CC256x, WL183x | Dual mode | H4, H5, eHCILL | Yes | Yes | No | Yes for CC256XC | cc256x | Also WL185x, WL187x, and WL189x
esp32thing: 24:0A:C4:00:8B:C4
nina1: 18:FE:34:6D:1B:D2
nina2: 18:FE:34:6D:17:66
**Notes**:
1. BD_ADDR: Indciates if Bluetooth chipset compes with its own valid MAC Addess. Better Broadcom and CSR dongles usually come with a MAC address from the dongle manufacturer, but cheaper ones might come with identical addresses.
2. SCO over HCI: All Bluetooth Classic chipsets support SCO over HCI, for those that are marked with No, we either didn't try or didn't found enough information to configure it correctly.
3. Multiple LE Roles: Apple uses Broadcom Bluetooth+Wifi in their iOS devices and newer iOS versions support multiple concurrent LE roles,
so at least some Broadcom models support multiple concurrent LE roles.
4. Only BLE qualified - [https://www.bluetooth.org/tpg/QLI_viewQDL.cfm?qid=36402](QDID 99659).
## Atmel/Microchip
The 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. Please note: the Bluetooth firmware is 270 kB.
The 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. Only the BLE Controller is currently qualified as [https://www.bluetooth.org/tpg/QLI_viewQDL.cfm?qid=36402](QDID 99659). Please note: the Bluetooth firmware is 270 kB.
**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.
**Baud rate** can be set with a custom command.
**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.
## Broadcom
## Broadcom/Cypress Semiconductor
Before 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.
A 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.
@@ -113,9 +110,11 @@ BTstack supports uploading of the init script in two variants: using .hcd files
SCO Data can be routed over HCI for both USB dongles and UART connections, however BTstack does not provide any form of flow control for UART connections. HSP and HFP Narrow Band Speech is supported via I2C/PCM pins.
## CSR
## CSR / Qualcomm Incorporated
CSR plc has been acquired by Qualcomm Incorporated in August 2015.
Similar to Broadcom, the best source for documentation is the source code for blueZ.
Similar to Broadcom, the best source for documentation is the source code for blueZ.
CSR USB dongles do not require special configuration and SCO data is routed over USB by default.
@@ -156,7 +155,7 @@ In December 2016, EM released the new EM9304 that also features an HCI mode and
EM9304 is used by the 'stm32-l053r8-em9304' port in BTstack. The port.c file also contains an IRQ+DMA-driven implementation of the SPI H4 protocol specified in the [datasheet](http://www.emmicroelectronic.com/sites/default/files/public/products/datasheets/9304-ds_0.pdf).
**BD Addr** must be set during startup since it does not have a stored fix address.
**BD Addr** must be set during startup for EM9301 since it does not have a stored fix address. The EM9304 comes with an valid address stored in Flash/OTP.
**SCO data** is not supported since it is LE only.
@@ -222,7 +221,7 @@ STMicroelectronics offers the Bluetooth V2.1 + EDR chipset STLC2500D that suppor
## Texas Instruments CC256x series
The Texas Instruments CC256x series is currently in its fourth iteration and provides a Classic-only (CC2560), a Dual-mode (CC2564), and a Classic + ANT (CC2567) model. A variant of the Dual-mode chipset is also integrated into TI's WiLink 8 Wifi+Bluetooth combo modules of the WL183x, WL185x, WL187x, and WL189x series.
The Texas Instruments CC256x series is currently in its fourth iteration and provides a Classic-only (CC2560), a Dual-mode (CC2564), and a Classic + ANT (CC2567) model. A variant of the Dual-mode chipset is also integrated into TI's WiLink 8 Wifi+Bluetooth combo modules of the WL183x, WL185x, WL187x, and WL189x series. Some of the latter support ANT as well.
The CC256x chipset is connected via an UART connection and supports the H4, H5 (since third iteration), and eHCILL.
View
@@ -110,6 +110,7 @@ EXAMPLES = \
a2dp_sink_demo \
a2dp_source_demo \
ancs_client_demo \
dut_mode_classic \
gap_dedicated_bonding \
gap_inquiry \
gap_le_advertisements \
@@ -251,28 +252,31 @@ gap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} gap_le_advertisement
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hsp_hs_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hsp_hs.o hsp_hs_demo.c
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hsp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hsp_ag.o hsp_ag_demo.c
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hfp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hfp.o hfp_gsm_model.o hfp_ag.o hfp_ag_demo.c
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hfp_hf_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hfp.o hfp_hf.o hfp_hf_demo.c
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hid_keyboard_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstack_ring_buffer.o hid_device.o hid_keyboard_demo.o
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hid_mouse_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstack_ring_buffer.o hid_device.o hid_mouse_demo.o
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
a2dp_source_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_ENCODER_OBJ} ${SBC_DECODER_OBJ} ${AVDTP_OBJ} ${HXCMOD_PLAYER_OBJ} avrcp.o avrcp_target.o a2dp_source_demo.c
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
a2dp_sink_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_ENCODER_OBJ} ${SBC_DECODER_OBJ} ${AVDTP_OBJ} avrcp.o avrcp_controller.o a2dp_sink_demo.c
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
dut_mode_classic: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} dut_mode_classic.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
clean:
rm -f ${EXAMPLES} *_demo
Oops, something went wrong.

0 comments on commit a8bf470

Please sign in to comment.