5cc5141371
Main changes: - Cleanups & refactoring to the native controller code - Support for cross-transport pairing from BR/EDR to LE - Fix potential deadlock in TX fiber when disconnecting - Initial skeleton for the Hands-Free Profile (HFP) - Fix to Resolvable Private Address (RPA) updates - Added flow control support to RFCOMM ---------------------------------------------------------------- Carles Cufi (21): Bluetooth: HCI: Fix the length of supported commands Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling Bluetooth: HCI: Add handle to LTK command complete events Bluetooth: HCI: Add handle to conn param update command complete Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling Bluetooth: Controller: Unify handling of async events Bluetooth: HCI: Fix and extend advertising report events Bluetooth: HCI: Add auth payload expiry event Bluetooth: Controller: Use hci.h for control event handling Bluetooth: HCI: Add read remote version info event Bluetooth: Controller: Use hci.h for data-control evt handling Bluetooth: Controller: Use hci.h for num complete Bluetooth: Controller: Remove HCI event definitions from hci.c Bluetooth: Controller: Use hci.h for ACL data Bluetooth: Controller: Clean up HCI macros Bluetooth: Controller: Implement LE_RAND command Bluetooth: Controller: Make HCI endianness-independent Bluetooth: Controller: Refactor HCI files Grzegorz Kolodziejczyk (3): Bluetooth: tester: Add support for L2CAP connect command Bluetooth: tester: Add support for L2CAP disconnect commands Bluetooth: tester: Add support for L2CAP listen command Itankar, Piyush T (1): Bluetooth: Init: Updated filiter options for test_20 Jaganath Kanakkassery (1): Bluetooth: RFCOMM: Implement RX flow control Johan Hedberg (2): Bluetooth: GATT: Fix potential bt_conn reference leak Bluetooth: Fix giving back pkts semaphore when disconnecting Luiz Augusto von Dentz (3): Bluetooth: ATT: Fix not handling error response properly Bluetooth: HCI: Fix updating RPA too early Bluetooth: eddystone: Fix byteorder of advertisement Mariusz Skamra (1): Bluetooth: tester: Add support for L2CAP send data command Sathish Narasimman (1): Bluetooth: HFP HF: Initialize Handsfree profile Sukumar Ghorai (1): Bluetooth: Pre-allocated RFCOMM Channels Szymon Janc (16): Bluetooth: SMP: Move smp_create_pdu function up in a file Bluetooth: SMP: Add initial code for BR/EDR support Bluetooth: SMP: Clear keys on timeout when running over BR/EDR Bluetooth: SMP: Support Pairing Request over BR/EDR Bluetooth: SMP: Support Pairing Failed over BR/EDR Bluetooth: SMP: Distribute local keys over BR/EDR Bluetooth: Add support for reading encryption key size for BR/EDR Bluetooth: SMP: Fix encryption key size check in BR/EDR pairing req Bluetooth: SMP: Support Pairing Response over BR/EDR Bluetooth: SMP: Allow to force BR/EDR without SC support Bluetooth: SMP: Add support for LTK derivation from LinkKey Bluetooth: SMP: Add support for sending Pairing Request over BR/EDR Bluetooth: SMP: Add support for Identity Information over BR/EDR Bluetooth: SMP: Add support for Signing Information over BR/EDR Bluetooth: SMP: Add helper for reporting BR/EDR pairing complete Bluetooth: SMP: Factor out BR/EDR encryption check to helper Vinayak Chettimada (4): Bluetooth: ATT: Remove unnecessary call to BT_ASSERT Bluetooth: log: Call _SysFatalErrorHandler in BT_ASSERT() Bluetooth: log: Include nanokernel.h to use BT_ASSERT() Bluetooth: Controller: Use BT_ASSERT instead of custom impl. drivers/bluetooth/controller/Makefile | 2 +- drivers/bluetooth/controller/hal/clock.c | 8 +- drivers/bluetooth/controller/hal/debug.h | 27 +- drivers/bluetooth/controller/hal/ecb.c | 2 +- drivers/bluetooth/controller/hal/radio.c | 2 +- drivers/bluetooth/controller/hal/rand.c | 2 +- drivers/bluetooth/controller/hal/rtc.c | 2 +- drivers/bluetooth/controller/hci/hci.c | 2380 +++++++----------- .../controller/{main.c => hci/hci_driver.c} | 23 +- .../controller/hci/{hci.h => hci_internal.h} | 14 +- drivers/bluetooth/controller/ll/ctrl.c | 332 +-- drivers/bluetooth/controller/ll/ticker.c | 3 +- include/bluetooth/hci.h | 56 +- include/bluetooth/hfp_hf.h | 61 + include/bluetooth/log.h | 17 +- include/bluetooth/rfcomm.h | 8 + net/bluetooth/Kconfig | 23 + net/bluetooth/Makefile | 2 + net/bluetooth/att.c | 4 +- net/bluetooth/conn.c | 45 +- net/bluetooth/gatt.c | 7 +- net/bluetooth/hci_core.c | 18 +- net/bluetooth/hci_core.h | 4 +- net/bluetooth/hfp_hf.c | 123 + net/bluetooth/hfp_internal.h | 43 + net/bluetooth/l2cap_br.c | 15 + net/bluetooth/l2cap_internal.h | 1 + net/bluetooth/rfcomm.c | 49 +- net/bluetooth/smp.c | 953 ++++++- samples/bluetooth/eddystone/src/main.c | 4 +- tests/bluetooth/init/testcase.ini | 7 +- tests/bluetooth/tester/src/bttester.h | 71 + tests/bluetooth/tester/src/l2cap.c | 306 +++ 33 files changed, 2785 insertions(+), 1829 deletions(-) rename drivers/bluetooth/controller/{main.c => hci/hci_driver.c} (94%) rename drivers/bluetooth/controller/hci/{hci.h => hci_internal.h} (68%) create mode 100644 include/bluetooth/hfp_hf.h create mode 100644 net/bluetooth/hfp_hf.c create mode 100644 net/bluetooth/hfp_internal.h Change-Id: I7bc41fb1c53c0f5128a1e4ab38815d19018b603f Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> |
||
---|---|---|
.. | ||
beacon | ||
btusb | ||
central | ||
central_hr | ||
eddystone | ||
gatt | ||
ipsp | ||
peripheral | ||
peripheral_csc | ||
peripheral_dis | ||
peripheral_esp | ||
peripheral_hids | ||
peripheral_hr | ||
peripheral_sc_only | ||
README |
README
Bluetooth subsystem = Building = Build samples $ make -C samples/bluetooth/<app> = Bluetooth Sample application = Host Bluetooth controller is connected to the second qemu serial line through a UNIX socket (qemu option -serial unix:/tmp/bt-server-bredr). This option is already added to qemu through QEMU_EXTRA_FLAGS in Makefile. On the host side BlueZ allows to "connect" Bluetooth controller through a so-called user channel. Use the btproxy tool for that: $ sudo tools/btproxy -u Listening on /tmp/bt-server-bredr Note that before calling btproxy make sure that Bluetooth controller is down. Now running qemu result connecting second serial line to 'bt-server-bredr' UNIX socket. When Bluetooth (CONFIG_BLUETOOTH) and Bluetooth HCI UART driver (CONFIG_BLUETOOTH_H4) are enabled, Bluetooth driver registers to the system. From now on Bluetooth might be used by the application. To run application in the qemu run: $ make qemu = Bluetooth sanity check = There is smoke test application in nanokernel and microkernel test directories which gets run in sanity check script: $ scripts/sanity_chk/sanitycheck [-P <platform>] To only run Bluetooth tests use the -t bluetooth switch: $ scripts/sanity_chk/sanitycheck -t bluetooth = Summary of available applications = beacon: A simple application demonstrating the BLE Broadcaster role functionality by advertising an Eddystone URL (the Zephyr website). central: Application demonstrating very basic BLE Central role functionality by scanning for other BLE devices and establishing a connection to the first one with a strong enough signal. central_hr: Similar to 'central', except that this application specifically looks for heart-rate monitors and reports the heart-rate readings once connected. eddystone: Application demostrating Eddystone Configuration Service: https://github.com/google/eddystone/tree/master/configuration-service gatt: Not an application, but a set of reusable modules for common GATT profiles & services. ipsp: Application demonstrating the IPSP (Internet Protocol Support Profile) Node role. IPSP is the Bluetooth profile that underneath utilizes 6LoWPAN, i.e. gives you IPv6 connectivity over BLE. peripheral: Application demonstrating the BLE Peripheral role. It has several well-known and vendor-specific GATT services that it exposes. peripheral_csc: Similar to 'peripheral', except that this application specifically exposes the CSC (Cycling Speed and Cadence) GATT Service. peripheral_dis: Similar to 'peripheral', except that this application specifically exposes the DIS (Device Information) GATT Service. peripheral_esp: Similar to 'peripheral', except that this application specifically exposes the ESP (Environmental Sensing Profile) GATT Service. peripheral_hr: Similar to 'peripheral', except that this application specifically exposes the HR (Heart Rate) GATT Service. Once a device connects it will generate dummy heart-rate values. peripheral_hids: Similar to 'peripheral', except that this application specifically exposes the HID GATT Service. The report map used is for a generic mouse.