Bluetooth examples restructuring

The existing Bluetooth examples are split as:

1. examples/bluetooth/bluedroid - Bluedroid Host (BT + BLE) examples
   a. examples/bluetooth/bluedroid/classic_bt - Classic BT examples
   b. examples/bluetooth/bluedroid/ble - BLE examples
   c. examples/bluetooth/bluedroid/coex - Classic BT and BLE coex examples
   d. examples/bluetooth/bluedroid/hci - VHCI and HCI UART examples
      i. Rename ble_adv to controller_vhci_ble_adv and move it in hci folder
2. examples/bluetooth/nimble - NimBLE BLE Host + NimBLE Mesh examples
3. examples/bluetooth/esp_ble_mesh - ESP BLE Mesh examples
4. Update documentation references
This commit is contained in:
Hrishikesh Dhayagude 2019-07-01 19:21:57 +08:00 committed by Jiang Jiang Jian
parent f8d2188e93
commit cba69dd088
375 changed files with 78 additions and 65 deletions

View file

@ -11,9 +11,9 @@ Overview
Application Example Application Example
------------------- -------------------
Check :example:`bluetooth` folder in ESP-IDF examples, which contains the following application: Check :example:`bluetooth/bluedroid/hci` folder in ESP-IDF examples, which contains the following application:
* This is a BLE advertising demo with virtual HCI interface. Send Reset/ADV_PARAM/ADV_DATA/ADV_ENABLE HCI command for BLE advertising - :example:`bluetooth/ble_adv`. * This is a BLE advertising demo with virtual HCI interface. Send Reset/ADV_PARAM/ADV_DATA/ADV_ENABLE HCI command for BLE advertising - :example:`bluetooth/bluedroid/hci/controller_vhci_ble_adv`.
API Reference API Reference
------------- -------------

View file

@ -11,9 +11,9 @@ Overview
Application Example Application Example
------------------- -------------------
Check :example:`bluetooth` folder in ESP-IDF examples, which contains the following application: Check :example:`bluetooth/bluedroid/classic_bt` folder in ESP-IDF examples, which contains the following application:
* This is a A2DP sink client demo. This demo can be discovered and connected by A2DP source device and receive the audio stream from remote device - :example:`bluetooth/a2dp_sink` * This is a A2DP sink client demo. This demo can be discovered and connected by A2DP source device and receive the audio stream from remote device - :example:`bluetooth/bluedroid/classic_bt/a2dp_sink`
API Reference API Reference
------------- -------------

View file

@ -12,9 +12,9 @@ Use should concern these things:
Application Example Application Example
------------------- -------------------
Check :example:`bluetooth` folder in ESP-IDF examples, which contains the following application: Check :example:`bluetooth/bluedroid/ble` folder in ESP-IDF examples, which contains the following application:
* This is a BLUFI demo. This demo can set ESP32's wifi to softap/station/softap&station mode and config wifi connections - :example:`bluetooth/blufi` * This is the BLUFI demo. This demo can set ESP32's wifi to softap/station/softap&station mode and config wifi connections - :example:`bluetooth/bluedroid/ble/blufi`
API Reference API Reference
------------- -------------

View file

@ -11,17 +11,17 @@ Overview
Application Example Application Example
------------------- -------------------
Check :example:`bluetooth` folder in ESP-IDF examples, which contains the following demos and their tutorials: Check :example:`bluetooth/bluedroid/ble` folder in ESP-IDF examples, which contains the following demos and their tutorials:
* This is a SMP security client demo and its tutorial. This demo initiates its security parameters and acts as a GATT client, which can send a security request to the peer device and then complete the encryption procedure. * This is a SMP security client demo and its tutorial. This demo initiates its security parameters and acts as a GATT client, which can send a security request to the peer device and then complete the encryption procedure.
- :example:`bluetooth/gatt_security_client` - :example:`bluetooth/bluedroid/ble/gatt_security_client`
- :example_file:`GATT Security Client Example Walkthrough <bluetooth/gatt_security_client/tutorial/Gatt_Security_Client_Example_Walkthrough.md>` - :example_file:`GATT Security Client Example Walkthrough <bluetooth/bluedroid/ble/gatt_security_client/tutorial/Gatt_Security_Client_Example_Walkthrough.md>`
* This is a SMP security server demo and its tutorial. This demo initiates its security parameters and acts as a GATT server, which can send a pair request to the peer device and then complete the encryption procedure. * This is a SMP security server demo and its tutorial. This demo initiates its security parameters and acts as a GATT server, which can send a pair request to the peer device and then complete the encryption procedure.
- :example:`bluetooth/gatt_security_server` - :example:`bluetooth/bluedroid/ble/gatt_security_server`
- :example_file:`GATT Security Server Example Walkthrough <bluetooth/gatt_security_server/tutorial/Gatt_Security_Server_Example_Walkthrough.md>` - :example_file:`GATT Security Server Example Walkthrough <bluetooth/bluedroid/ble/gatt_security_server/tutorial/Gatt_Security_Server_Example_Walkthrough.md>`
API Reference API Reference
------------- -------------

View file

@ -11,21 +11,21 @@ Overview
Application Example Application Example
------------------- -------------------
Check :example:`bluetooth` folder in ESP-IDF examples, which contains the following demos and their tutorials: Check :example:`bluetooth/bluedroid/ble` folder in ESP-IDF examples, which contains the following demos and their tutorials:
* This is a GATT client demo and its tutorial. This demo can scan for devices, connect to the GATT server and discover its services. * This is a GATT client demo and its tutorial. This demo can scan for devices, connect to the GATT server and discover its services.
- :example:`bluetooth/gatt_client` - :example:`bluetooth/bluedroid/ble/gatt_client`
- :example_file:`GATT Client Example Walkthrough <bluetooth/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md>` - :example_file:`GATT Client Example Walkthrough <bluetooth/bluedroid/ble/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md>`
* This is a multiple connection demo and its tutorial. This demo can connect to multiple GATT server devices and discover their services. * This is a multiple connection demo and its tutorial. This demo can connect to multiple GATT server devices and discover their services.
- :example:`bluetooth/gattc_multi_connect` - :example:`bluetooth/bluedroid/ble/gattc_multi_connect`
- :example_file:`GATT Client Multi-connection Example Walkthrough <bluetooth/gattc_multi_connect/tutorial/Gatt_Client_Multi_Connection_Example_Walkthrough.md>` - :example_file:`GATT Client Multi-connection Example Walkthrough <bluetooth/bluedroid/ble/gattc_multi_connect/tutorial/Gatt_Client_Multi_Connection_Example_Walkthrough.md>`
* This is a BLE SPP-Like demo. This demo, which acts as a GATT client, can receive data from UART and then send the data to the peer device automatically. * This is a BLE SPP-Like demo. This demo, which acts as a GATT client, can receive data from UART and then send the data to the peer device automatically.
- :example:`bluetooth/ble_spp_client` - :example:`bluetooth/bluedroid/ble/ble_spp_client`
API Reference API Reference
------------- -------------

View file

@ -11,21 +11,21 @@ Overview
Application Example Application Example
------------------- -------------------
Check :example:`bluetooth` folder in ESP-IDF examples, which contains the following demos and their tutorials: Check :example:`bluetooth/bluedroid/ble` folder in ESP-IDF examples, which contains the following demos and their tutorials:
* This is a GATT sever demo and its tutorial. This demo creates a GATT service with an attribute table, which releases the user from adding attributes one by one. This is the recommended method of adding attributes. * This is a GATT sever demo and its tutorial. This demo creates a GATT service with an attribute table, which releases the user from adding attributes one by one. This is the recommended method of adding attributes.
- :example:`bluetooth/gatt_server_service_table` - :example:`bluetooth/bluedroid/ble/gatt_server_service_table`
- :example_file:`GATT Server Service Table Example Walkthrough <bluetooth/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md>` - :example_file:`GATT Server Service Table Example Walkthrough <bluetooth/bluedroid/ble/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md>`
* This is a GATT server demo and its tutorial. This demo creates a GATT service by adding attributes one by one as defined by Bluedroid. The recommended method of adding attributes is presented in example above. * This is a GATT server demo and its tutorial. This demo creates a GATT service by adding attributes one by one as defined by Bluedroid. The recommended method of adding attributes is presented in example above.
- :example:`bluetooth/gatt_server` - :example:`bluetooth/bluedroid/ble/gatt_server`
- :example_file:`GATT Server Example Walkthrough <bluetooth/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md>` - :example_file:`GATT Server Example Walkthrough <bluetooth/bluedroid/ble/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md>`
* This is a BLE SPP-Like demo. This demo, which acts as a GATT server, can receive data from UART and then send the data to the peer device automatically. * This is a BLE SPP-Like demo. This demo, which acts as a GATT server, can receive data from UART and then send the data to the peer device automatically.
- :example:`bluetooth/ble_spp_server` - :example:`bluetooth/bluedroid/ble/ble_spp_server`
API Reference API Reference
------------- -------------

View file

@ -11,9 +11,9 @@ Overview
Application Example Application Example
------------------- -------------------
Check :example:`bluetooth` folder in ESP-IDF examples, which contains the following application: Check :example:`bluetooth/bluedroid/classic_bt` folder in ESP-IDF examples, which contains the following application:
* This is a SPP demo. This demo can discover the service, connect, send and recive SPP data :example:`bluetooth/bt_spp_acceptor`, :example:`bluetooth/bt_spp_initiator` * This is a SPP demo. This demo can discover the service, connect, send and recive SPP data :example:`bluetooth/bluedroid/classic_bt/bt_spp_acceptor`, :example:`bluetooth/bluedroid/classic_bt/bt_spp_initiator`
API Reference API Reference
------------- -------------

View file

@ -22,13 +22,13 @@ For the overview of the ESP32 Bluetooth stack architecture, follow the links bel
* `ESP32 Bluetooth Architecture (PDF) [English] <http://espressif.com/sites/default/files/documentation/esp32_bluetooth_architecture_en.pdf>`_ * `ESP32 Bluetooth Architecture (PDF) [English] <http://espressif.com/sites/default/files/documentation/esp32_bluetooth_architecture_en.pdf>`_
* `ESP32 Bluetooth Architecture (PDF) [中文] <http://espressif.com/sites/default/files/documentation/esp32_bluetooth_architecture_cn.pdf>`_ * `ESP32 Bluetooth Architecture (PDF) [中文] <http://espressif.com/sites/default/files/documentation/esp32_bluetooth_architecture_cn.pdf>`_
Code examples for this API section are provided in the :example:`bluetooth` directory of ESP-IDF examples. Code examples for this API section are provided in the :example:`bluetooth/bluedroid` directory of ESP-IDF examples.
The following examples contain detailed walkthroughs: The following examples contain detailed walkthroughs:
* :example_file:`GATT Client Example Walkthrough <bluetooth/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md>` * :example_file:`GATT Client Example Walkthrough <bluetooth/bluedroid/ble/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md>`
* :example_file:`GATT Server Service Table Example Walkthrough <bluetooth/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md>` * :example_file:`GATT Server Service Table Example Walkthrough <bluetooth/bluedroid/ble/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md>`
* :example_file:`GATT Server Example Walkthrough <bluetooth/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md>` * :example_file:`GATT Server Example Walkthrough <bluetooth/bluedroid/ble/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md>`
* :example_file:`GATT Security Client Example Walkthrough <bluetooth/gatt_security_client/tutorial/Gatt_Security_Client_Example_Walkthrough.md>` * :example_file:`GATT Security Client Example Walkthrough <bluetooth/bluedroid/ble/gatt_security_client/tutorial/Gatt_Security_Client_Example_Walkthrough.md>`
* :example_file:`GATT Security Server Example Walkthrough <bluetooth/gatt_security_server/tutorial/Gatt_Security_Server_Example_Walkthrough.md>` * :example_file:`GATT Security Server Example Walkthrough <bluetooth/bluedroid/ble/gatt_security_server/tutorial/Gatt_Security_Server_Example_Walkthrough.md>`
* :example_file:`GATT Client Multi-connection Example Walkthrough <bluetooth/gattc_multi_connect/tutorial/Gatt_Client_Multi_Connection_Example_Walkthrough.md>` * :example_file:`GATT Client Multi-connection Example Walkthrough <bluetooth/bluedroid/ble/gattc_multi_connect/tutorial/Gatt_Client_Multi_Connection_Example_Walkthrough.md>`

View file

@ -17,14 +17,14 @@
`ESP32 蓝牙架构 (PDF) <http://espressif.com/sites/default/files/documentation/esp32_bluetooth_architecture_cn.pdf>`_ `ESP32 蓝牙架构 (PDF) <http://espressif.com/sites/default/files/documentation/esp32_bluetooth_architecture_cn.pdf>`_
蓝牙 API 的示例代码存放于 ESP-IDF :example:`bluetooth` 示例目录下,请查看。 蓝牙 API 的示例代码存放于 ESP-IDF :example:`bluetooth/bluedroid` 示例目录下,请查看。
下面的示例给出了详细介绍: 下面的示例给出了详细介绍:
* :example_file:`GATT 客户端示例 <bluetooth/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md>` * :example_file:`GATT 客户端示例 <bluetooth/bluedroid/ble/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md>`
* :example_file:`GATT 服务端服务表格示例 <bluetooth/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md>` * :example_file:`GATT 服务端服务表格示例 <bluetooth/bluedroid/ble/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md>`
* :example_file:`GATT 服务端示例 <bluetooth/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md>` * :example_file:`GATT 服务端示例 <bluetooth/bluedroid/ble/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md>`
* :example_file:`GATT 客户端安全性示例 <bluetooth/gatt_security_client/tutorial/Gatt_Security_Client_Example_Walkthrough.md>` * :example_file:`GATT 客户端安全性示例 <bluetooth/bluedroid/ble/gatt_security_client/tutorial/Gatt_Security_Client_Example_Walkthrough.md>`
* :example_file:`GATT 服务端安全性示例 <bluetooth/gatt_security_server/tutorial/Gatt_Security_Server_Example_Walkthrough.md>` * :example_file:`GATT 服务端安全性示例 <bluetooth/bluedroid/ble/gatt_security_server/tutorial/Gatt_Security_Server_Example_Walkthrough.md>`
* :example_file:`GATT 客户端多连接示例 <bluetooth/gattc_multi_connect/tutorial/Gatt_Client_Multi_Connection_Example_Walkthrough.md>` * :example_file:`GATT 客户端多连接示例 <bluetooth/bluedroid/ble/gattc_multi_connect/tutorial/Gatt_Client_Multi_Connection_Example_Walkthrough.md>`

View file

@ -6,8 +6,9 @@ This directory contains a range of example ESP-IDF projects. These are intended
The examples are grouped into subdirectories by category. Each category directory contains one or more example projects: The examples are grouped into subdirectories by category. Each category directory contains one or more example projects:
* `bluetooth` contains Bluetooth (BLE & BT Classic) examples using default Bluedroid host stack. * `bluetooth/bluedroid` contains Classic BT, BLE and coex examples using default Bluedroid host stack.
* `bleutooth/nimble` contains BLE examples using NimBLE host stack * `bluetooth/nimble` contains BLE examples using NimBLE host stack.
* `bluetooth/esp_ble_mesh` contains ESP BLE Mesh examples.
* `ethernet` contains Ethernet examples. * `ethernet` contains Ethernet examples.
* `get-started` contains some very simple examples with minimal functionality. * `get-started` contains some very simple examples with minimal functionality.
* `mesh` contains Wi-Fi Mesh examples. * `mesh` contains Wi-Fi Mesh examples.

View file

@ -1,5 +0,0 @@
# Bluetooth Examples
Note: To use examples in this directory, you need to have Bluetooth enabled in configuration. Run `make menuconfig`, go to `Component config` and verify if you see `[*] Bluetooth`. If not - enable it and save.
See the [README.md](../README.md) file in the upper level [examples](../) directory for more information about examples.

View file

@ -0,0 +1,13 @@
# Bluetooth Examples for Bluedroid host
Note: To use examples in this directory, you need to have Bluetooth enabled in configuration and Bluedroid selected as the host stack.
# Example Layout
The examples are grouped into subdirectories by category. Each category directory contains one or more example projects:
* `classic_bt` contains Classic BT examples
* `ble` contains BLE examples
* `coex` contains Classic BT and BLE coex examples
* `hci` contains HCI transport (VHCI and HCI UART) examples
See the [README.md](../../README.md) file in the upper level [examples](../../) directory for more information about examples.

View file

@ -6,7 +6,7 @@ This document provides a test case for BLE smartphone compatibility and includes
### What You Need ### What You Need
* ESP device which needs to flash [this test program] (https://github.com/espressif/esp-idf/blob/master/examples/bluetooth/ble_compatibility_test/main/ble_compatibility_test.c) * ESP device which needs to flash [this test program] (https://github.com/espressif/esp-idf/blob/master/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/ble_compatibility_test.c)
* Smartphone with LightBlue® Explorer app * Smartphone with LightBlue® Explorer app
### Initialization ### Initialization

View file

@ -12,7 +12,7 @@
</tr> </tr>
<tr> <tr>
<td>Test Demo:</td> <td>Test Demo:</td>
<td colspan="13">https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/ble_compatibility_test</td> <td colspan="13">https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/bluedroid/ble/ble_compatibility_test</td>
</tr> </tr>
<tr> <tr>
<td rowspan="2"><font size="1">Phone Brand</td> <td rowspan="2"><font size="1">Phone Brand</td>

Some files were not shown because too many files have changed in this diff Show more