Skip to content

Commit c2e549b

Browse files
committed
Merge branch 'feature/ble_combined_adv_scan' into 'master'
bluetooth: added example `ble_adv_scan_combined' for combined scanning and advertising Closes BT-843 and BT-867 See merge request espressif/esp-idf!6661
2 parents c27bd40 + 6dbb993 commit c2e549b

File tree

15 files changed

+771
-89
lines changed

15 files changed

+771
-89
lines changed

examples/bluetooth/hci/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,14 @@ See the [README.md](./controller_hci_uart/README.md) file in the example [contro
1717
Demonstrates interaction with controller though virtual HCI layer. In this example, simple BLE advertising is done.
1818

1919
See the [README.md](./controller_vhci_ble_adv/README.md) file in the example [controller_vhci_ble_adv](./controller_vhci_ble_adv).
20+
21+
## ble_adv_scan_combined
22+
23+
Demonstrates interaction with controller. In this example, BLE advertising and scanning is done. Also scanned advertising reports are parsed and displayed.
24+
25+
See the [README.md](./ble_adv_scan_combined/README.md) file in the example [ble_adv_scan_combined](./ble_adv_scan_combined).
26+
27+
28+
## hci_common_component
29+
30+
This is separate component adding functionalities for HCI Layer. Since this component is just used by HCI examples, it is not placed in global components.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# The following lines of boilerplate have to be in your project's
2+
# CMakeLists in this exact order for cmake to work correctly
3+
cmake_minimum_required(VERSION 3.5)
4+
5+
# This example uses an extra component for common functions for Bluetooth HCI layer.
6+
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/hci/hci_common_component)
7+
8+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
9+
project(ble_adv_scan)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
3+
# project subdirectory.
4+
#
5+
6+
PROJECT_NAME := ble_adv_scan
7+
8+
EXTRA_COMPONENT_DIRS = $(IDF_PATH)/examples/bluetooth/hci/hci_common_component
9+
10+
include $(IDF_PATH)/make/project.mk
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
| Supported Targets | ESP32 |
2+
| ----------------- | ----- |
3+
4+
ESP-IDF Combined Bluetooth advertising and scanning
5+
===================================================
6+
7+
This is a Bluetooth advertising and scanning demo with virtual HCI interface. Send Reset, ADV_PARAM, ADV_DATA and HCI_ADV_ENABLE command for BLE advertising. And SET_EVENT_MASK, SCAN_PARAMS and SCAN_START commands for BLE scanning. Scanned advertising reports from other devices are also displayed.
8+
9+
In this example no host is used. But some of the functionalities of a host are implemented.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
idf_component_register(SRCS "app_bt.c"
2+
INCLUDE_DIRS ".")

0 commit comments

Comments
 (0)