Merge remote-tracking branch 'origin/master' into feature/github-7022

This commit is contained in:
Zim Kalinowski
2021-10-03 12:25:39 +08:00
3914 changed files with 690484 additions and 137878 deletions

View File

@@ -15,6 +15,7 @@ The examples are grouped into subdirectories by category. Each category director
* `ethernet` Ethernet network examples.
* `get-started` Simple examples with minimal functionality. Good start point for beginners.
* `mesh` Wi-Fi Mesh examples.
* `network` Examples related to general network environment, test & analysis.
* `openthread` OpenThread examples.
* `peripherals` Examples showing driver functionality for the various onboard ESP32 peripherals.
* `protocols` Examples showing network protocol interactions.
@@ -28,17 +29,12 @@ In addition to these examples, `commmon_components` directory contains code shar
# Using Examples
Before building an example, be sure to follow the Getting Started guide to ensure you have the required development environment.
* [ESP-IDF Getting Started Guide on ESP32](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html)
* [ESP-IDF Getting Started Guide on ESP32-S2](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html)
* [ESP-IDF Getting Started Guide on ESP32-C3](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/index.html)
Before building an example, be sure to follow the [ESP-IDF Getting Started Guide](https://idf.espressif.com/) to ensure you have the required development environment.
Building an example is the same as building any other project:
* Change into the directory of the new example you'd like to build.
* Run `idf.py set-target TARGET` to select the correct chip target to build before opening the project configuration menu. By default the target is `esp32` and the options are `esp32`, `esp32s2` and `esp32c3`.
* Run `idf.py set-target TARGET` to select the correct chip target to build before opening the project configuration menu. By default the target is `esp32`. For all options see `idf.py set-target --help`
* Run `idf.py menuconfig` to open the project configuration menu. Most examples have a project-specific "Example Configuration" section here (for example, to set the WiFi SSID & password to use).
* `idf.py build` to build the example.
* Follow the printed instructions to flash, or run `idf.py -p PORT flash`.

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -669,7 +668,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_SMP_ENABLE=y
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -673,7 +672,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_SMP_ENABLE=y
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -674,7 +673,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_SMP_ENABLE=y
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -671,7 +670,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -416,10 +416,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -460,7 +459,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -673,7 +672,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -671,7 +670,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -416,10 +416,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -460,7 +459,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -673,7 +672,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -671,7 +670,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -416,10 +416,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -460,7 +459,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -673,7 +672,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -209,7 +209,7 @@ static struct gattc_profile_inst gl_profile_tab[PROFILE_NUM] = {
};
```
The initialization of the Application Profile table array includes defining the callback functions for each Profile. These are `gattc_profile_a_event_handler()` and `gattc_profile_a_event_handler()` respectively. In addition, the GATT interface is initialized to the default value of `ESP_GATT_IF_NONE`. Later on, when the Application Profile is registered, the BLE stack returns a GATT interface instance to use with that Application Profile.
The initialization of the Application Profile table array includes defining the callback function for Profile. It is `gattc_profile_event_handler()`. In addition, the GATT interface is initialized to the default value of `ESP_GATT_IF_NONE`. Later on, when the Application Profile is registered, the BLE stack returns a GATT interface instance to use with that Application Profile.
The profile registration triggers an `ESP_GATTC_REG_EVT` event, which is handled by the `esp_gattc_cb()` event handler. The handler takes the GATT interface returned by the event and stores it in the profile table:

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -669,7 +668,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_SMP_ENABLE=y
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -673,7 +672,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_SMP_ENABLE=y
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -671,7 +670,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -430,7 +430,7 @@ static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_
## Creating Services
The register event is also used to create a profile attributes table by using the `esp_ble_gatts_create_attr_tab()` function, which takes an `esp_gatts_attr_db_t` type structure that has all the information of the service table. The way to create this table is:
The register event is also used to create a service by using the `esp_ble_gatts_create_service()`. When service creation is done, a callback event ESP_GATTS_CREATE_EVT is called to report status and service ID to the profile. The way to create service is:
```c

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -671,7 +670,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -416,10 +416,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -460,7 +459,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -673,7 +672,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -348,7 +348,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -372,7 +371,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_EFF=1
CONFIG_BTDM_CTRL_BLE_MAX_ACT=10
@@ -412,7 +411,7 @@ CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BTDM_CTRL_SLEEP_MODE_EFF=0
CONFIG_BTDM_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BTDM_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -615,7 +614,7 @@ CONFIG_BT_SMP_ENABLE=y
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -472,7 +472,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -545,14 +544,14 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
#
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -760,7 +759,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -348,7 +348,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -372,7 +371,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_EFF=1
CONFIG_BTDM_CTRL_BLE_MAX_ACT=10
@@ -412,7 +411,7 @@ CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BTDM_CTRL_SLEEP_MODE_EFF=0
CONFIG_BTDM_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BTDM_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -619,7 +618,6 @@ CONFIG_BT_SMP_ENABLE=y
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -472,7 +472,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -545,14 +544,14 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
#
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -760,7 +759,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -348,7 +348,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -366,7 +365,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_EFF=1
CONFIG_BTDM_CTRL_BLE_MAX_ACT=10
@@ -406,7 +405,7 @@ CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BTDM_CTRL_SLEEP_MODE_EFF=0
CONFIG_BTDM_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BTDM_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -606,7 +605,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -472,7 +472,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -545,14 +544,14 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
#
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -760,7 +759,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -348,7 +348,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -366,7 +365,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_EFF=1
CONFIG_BTDM_CTRL_BLE_MAX_ACT=10
@@ -406,7 +405,7 @@ CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BTDM_CTRL_SLEEP_MODE_EFF=0
CONFIG_BTDM_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BTDM_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -606,7 +605,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -472,7 +472,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -545,14 +544,14 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
#
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -760,7 +759,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -348,7 +348,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -366,7 +365,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_EFF=1
CONFIG_BTDM_CTRL_BLE_MAX_ACT=10
@@ -406,7 +405,7 @@ CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BTDM_CTRL_SLEEP_MODE_EFF=0
CONFIG_BTDM_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BTDM_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -606,7 +605,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -472,7 +472,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -545,14 +544,14 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
#
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -760,7 +759,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -0,0 +1,7 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(bt_hid_mouse_device)

View File

@@ -3,6 +3,6 @@
# project subdirectory.
#
PROJECT_NAME := mcpwm_bldc_control_hall_sensor
PROJECT_NAME := bt_hid_mouse_device
include $(IDF_PATH)/make/project.mk

View File

@@ -0,0 +1,11 @@
| Supported Targets | ESP32 |
| ----------------- | ----- |
# ESP-IDF HID Device over Bluetooth Classic Demo
Demo of HID Device over Bluetooth Classic.
This turns the device into a mouse, but can be altered to be any kind of HID device.
After loading the code, connect with a computer to a device broadcasting
as "HID Mouse Example". The mouse should move left and right while they are connected.

View File

@@ -0,0 +1,7 @@
#set(COMPONENT_SRCS "main.c")
#set(COMPONENT_ADD_INCLUDEDIRS "")
#register_component()
idf_component_register(SRCS "main.c"
INCLUDE_DIRS ".")

View File

@@ -0,0 +1,436 @@
#include "esp_log.h"
#include "esp_hidd_api.h"
#include "esp_bt_main.h"
#include "esp_bt_device.h"
#include "esp_bt.h"
#include "esp_err.h"
#include "nvs.h"
#include "nvs_flash.h"
#include "esp_gap_bt_api.h"
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#define BOOT_PROTO_MOUSE_RPT_ID 0x02
typedef struct
{
esp_hidd_app_param_t app_param;
esp_hidd_qos_param_t both_qos;
uint8_t protocol_mode;
SemaphoreHandle_t mouse_mutex;
xTaskHandle mouse_task_hdl;
uint8_t buffer[4];
int8_t x_dir;
} local_param_t;
static local_param_t s_local_param = {0};
bool check_report_id_type(uint8_t report_id, uint8_t report_type)
{
bool ret = false;
xSemaphoreTake(s_local_param.mouse_mutex, portMAX_DELAY);
do {
if (report_type != ESP_HIDD_REPORT_TYPE_INPUT) {
break;
}
if (s_local_param.protocol_mode == ESP_HIDD_BOOT_MODE) {
if (report_id == BOOT_PROTO_MOUSE_RPT_ID) {
ret = true;
break;
}
} else {
if (report_id == 0) {
ret = true;
break;
}
}
} while (0);
if (!ret) {
if (s_local_param.protocol_mode == ESP_HIDD_BOOT_MODE) {
esp_bt_hid_device_report_error(ESP_HID_PAR_HANDSHAKE_RSP_ERR_INVALID_REP_ID);
} else {
esp_bt_hid_device_report_error(ESP_HID_PAR_HANDSHAKE_RSP_ERR_INVALID_REP_ID);
}
}
xSemaphoreGive(s_local_param.mouse_mutex);
return ret;
}
// send the buttons, change in x, and change in y
void send_mouse(uint8_t buttons, char dx, char dy, char wheel)
{
xSemaphoreTake(s_local_param.mouse_mutex, portMAX_DELAY);
if (s_local_param.protocol_mode == ESP_HIDD_REPORT_MODE) {
s_local_param.buffer[0] = buttons;
s_local_param.buffer[1] = dx;
s_local_param.buffer[2] = dy;
s_local_param.buffer[3] = wheel;
esp_bt_hid_device_send_report(ESP_HIDD_REPORT_TYPE_INTRDATA, 0x00, 4, s_local_param.buffer);
} else if (s_local_param.protocol_mode == ESP_HIDD_BOOT_MODE) {
s_local_param.buffer[0] = buttons;
s_local_param.buffer[1] = dx;
s_local_param.buffer[2] = dy;
esp_bt_hid_device_send_report(ESP_HIDD_REPORT_TYPE_INTRDATA, BOOT_PROTO_MOUSE_RPT_ID, 3, s_local_param.buffer);
}
xSemaphoreGive(s_local_param.mouse_mutex);
}
// move the mouse left and right
void mouse_move_task(void* pvParameters) {
const char* TAG = "mouse_move_task";
ESP_LOGI(TAG, "starting");
for(;;) {
s_local_param.x_dir = 1;
int8_t step = 10;
for (int i = 0; i < 2; i++) {
xSemaphoreTake(s_local_param.mouse_mutex, portMAX_DELAY);
s_local_param.x_dir *= -1;
xSemaphoreGive(s_local_param.mouse_mutex);
for (int j = 0; j < 100; j++) {
send_mouse(0, s_local_param.x_dir * step, 0, 0);
vTaskDelay(50 / portTICK_PERIOD_MS);
}
}
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}
static void print_bt_address(void) {
const char* TAG = "bt_address";
const uint8_t* bd_addr;
bd_addr = esp_bt_dev_get_address();
ESP_LOGI(TAG, "my bluetooth address is %02X:%02X:%02X:%02X:%02X:%02X",
bd_addr[0], bd_addr[1], bd_addr[2], bd_addr[3], bd_addr[4], bd_addr[5]);
}
// a generic mouse descriptor
uint8_t hid_descriptor_mouse_boot_mode[] = {
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x02, // USAGE (Mouse)
0xa1, 0x01, // COLLECTION (Application)
0x09, 0x01, // USAGE (Pointer)
0xa1, 0x00, // COLLECTION (Physical)
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // USAGE_MINIMUM (Button 1)
0x29, 0x03, // USAGE_MAXIMUM (Button 3)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x95, 0x03, // REPORT_COUNT (3)
0x75, 0x01, // REPORT_SIZE (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x05, // REPORT_SIZE (5)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x30, // USAGE (X)
0x09, 0x31, // USAGE (Y)
0x09, 0x38, // USAGE (Wheel)
0x15, 0x81, // LOGICAL_MINIMUM (-127)
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x03, // REPORT_COUNT (3)
0x81, 0x06, // INPUT (Data,Var,Rel)
0xc0, // END_COLLECTION
0xc0 // END_COLLECTION
};
int hid_descriptor_mouse_boot_mode_len = sizeof(hid_descriptor_mouse_boot_mode);
void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param)
{
const char* TAG = "esp_bt_gap_cb";
switch (event) {
case ESP_BT_GAP_AUTH_CMPL_EVT:{
if (param->auth_cmpl.stat == ESP_BT_STATUS_SUCCESS) {
ESP_LOGI(TAG, "authentication success: %s", param->auth_cmpl.device_name);
esp_log_buffer_hex(TAG, param->auth_cmpl.bda, ESP_BD_ADDR_LEN);
} else {
ESP_LOGE(TAG, "authentication failed, status:%d", param->auth_cmpl.stat);
}
break;
}
case ESP_BT_GAP_PIN_REQ_EVT:{
ESP_LOGI(TAG, "ESP_BT_GAP_PIN_REQ_EVT min_16_digit:%d", param->pin_req.min_16_digit);
if (param->pin_req.min_16_digit) {
ESP_LOGI(TAG, "Input pin code: 0000 0000 0000 0000");
esp_bt_pin_code_t pin_code = {0};
esp_bt_gap_pin_reply(param->pin_req.bda, true, 16, pin_code);
} else {
ESP_LOGI(TAG, "Input pin code: 1234");
esp_bt_pin_code_t pin_code;
pin_code[0] = '1';
pin_code[1] = '2';
pin_code[2] = '3';
pin_code[3] = '4';
esp_bt_gap_pin_reply(param->pin_req.bda, true, 4, pin_code);
}
break;
}
#if (CONFIG_BT_SSP_ENABLED == true)
case ESP_BT_GAP_CFM_REQ_EVT:
ESP_LOGI(TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %d", param->cfm_req.num_val);
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
break;
case ESP_BT_GAP_KEY_NOTIF_EVT:
ESP_LOGI(TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%d", param->key_notif.passkey);
break;
case ESP_BT_GAP_KEY_REQ_EVT:
ESP_LOGI(TAG, "ESP_BT_GAP_KEY_REQ_EVT Please enter passkey!");
break;
#endif
case ESP_BT_GAP_MODE_CHG_EVT:
ESP_LOGI(TAG, "ESP_BT_GAP_MODE_CHG_EVT mode:%d", param->mode_chg.mode);
break;
default:
ESP_LOGI(TAG, "event: %d", event);
break;
}
return;
}
void bt_app_task_start_up(void)
{
s_local_param.mouse_mutex = xSemaphoreCreateMutex();
memset(s_local_param.buffer, 0, 4);
xTaskCreate(mouse_move_task, "mouse_move_task", 2 * 1024, NULL, configMAX_PRIORITIES - 3, &s_local_param.mouse_task_hdl);
return;
}
void bt_app_task_shut_down(void)
{
if (s_local_param.mouse_task_hdl) {
vTaskDelete(s_local_param.mouse_task_hdl);
s_local_param.mouse_task_hdl = NULL;
}
if (s_local_param.mouse_mutex) {
vSemaphoreDelete(s_local_param.mouse_mutex);
s_local_param.mouse_mutex = NULL;
}
return;
}
void esp_bt_hidd_cb(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
{
static const char* TAG = "esp_bt_hidd_cb";
switch (event) {
case ESP_HIDD_INIT_EVT:
if (param->init.status == ESP_HIDD_SUCCESS) {
ESP_LOGI(TAG, "setting hid parameters");
esp_bt_hid_device_register_app(&s_local_param.app_param, &s_local_param.both_qos, &s_local_param.both_qos);
} else {
ESP_LOGE(TAG, "init hidd failed!");
}
break;
case ESP_HIDD_DEINIT_EVT:
break;
case ESP_HIDD_REGISTER_APP_EVT:
if (param->register_app.status == ESP_HIDD_SUCCESS) {
ESP_LOGI(TAG, "setting hid parameters success!");
ESP_LOGI(TAG, "setting to connectable, discoverable");
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
if (param->register_app.in_use && param->register_app.bd_addr != NULL) {
ESP_LOGI(TAG, "start virtual cable plug!");
esp_bt_hid_device_connect(param->register_app.bd_addr);
}
} else {
ESP_LOGE(TAG, "setting hid parameters failed!");
}
break;
case ESP_HIDD_UNREGISTER_APP_EVT:
if (param->unregister_app.status == ESP_HIDD_SUCCESS) {
ESP_LOGI(TAG, "unregister app success!");
} else {
ESP_LOGE(TAG, "unregister app failed!");
}
break;
case ESP_HIDD_OPEN_EVT:
if (param->open.status == ESP_HIDD_SUCCESS) {
if (param->open.conn_status == ESP_HIDD_CONN_STATE_CONNECTING) {
ESP_LOGI(TAG, "connecting...");
} else if (param->open.conn_status == ESP_HIDD_CONN_STATE_CONNECTED) {
ESP_LOGI(TAG, "connected to %02x:%02x:%02x:%02x:%02x:%02x", param->open.bd_addr[0],
param->open.bd_addr[1], param->open.bd_addr[2], param->open.bd_addr[3], param->open.bd_addr[4],
param->open.bd_addr[5]);
bt_app_task_start_up();
ESP_LOGI(TAG, "making self non-discoverable and non-connectable.");
esp_bt_gap_set_scan_mode(ESP_BT_NON_CONNECTABLE, ESP_BT_NON_DISCOVERABLE);
} else {
ESP_LOGE(TAG, "unknown connection status");
}
} else {
ESP_LOGE(TAG, "open failed!");
}
break;
case ESP_HIDD_CLOSE_EVT:
ESP_LOGI(TAG, "ESP_HIDD_CLOSE_EVT");
if (param->close.status == ESP_HIDD_SUCCESS) {
if (param->close.conn_status == ESP_HIDD_CONN_STATE_DISCONNECTING) {
ESP_LOGI(TAG, "disconnecting...");
} else if (param->close.conn_status == ESP_HIDD_CONN_STATE_DISCONNECTED) {
ESP_LOGI(TAG, "disconnected!");
bt_app_task_shut_down();
ESP_LOGI(TAG, "making self discoverable and connectable again.");
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
} else {
ESP_LOGE(TAG, "unknown connection status");
}
} else {
ESP_LOGE(TAG, "close failed!");
}
break;
case ESP_HIDD_SEND_REPORT_EVT:
ESP_LOGI(TAG, "ESP_HIDD_SEND_REPORT_EVT id:0x%02x, type:%d", param->send_report.report_id,
param->send_report.report_type);
break;
case ESP_HIDD_REPORT_ERR_EVT:
ESP_LOGI(TAG, "ESP_HIDD_REPORT_ERR_EVT");
break;
case ESP_HIDD_GET_REPORT_EVT:
ESP_LOGI(TAG, "ESP_HIDD_GET_REPORT_EVT id:0x%02x, type:%d, size:%d", param->get_report.report_id,
param->get_report.report_type, param->get_report.buffer_size);
if (check_report_id_type(param->get_report.report_id, param->get_report.report_type)) {
xSemaphoreTake(s_local_param.mouse_mutex, portMAX_DELAY);
if (s_local_param.protocol_mode == ESP_HIDD_REPORT_MODE) {
esp_bt_hid_device_send_report(param->get_report.report_type, 0x00, 4, s_local_param.buffer);
} else if (s_local_param.protocol_mode == ESP_HIDD_BOOT_MODE) {
esp_bt_hid_device_send_report(param->get_report.report_type, 0x02, 3, s_local_param.buffer);
}
xSemaphoreGive(s_local_param.mouse_mutex);
} else {
ESP_LOGE(TAG, "check_report_id failed!");
}
break;
case ESP_HIDD_SET_REPORT_EVT:
ESP_LOGI(TAG, "ESP_HIDD_SET_REPORT_EVT");
break;
case ESP_HIDD_SET_PROTOCOL_EVT:
ESP_LOGI(TAG, "ESP_HIDD_SET_PROTOCOL_EVT");
if (param->set_protocol.protocol_mode == ESP_HIDD_BOOT_MODE) {
ESP_LOGI(TAG, " - boot protocol");
xSemaphoreTake(s_local_param.mouse_mutex, portMAX_DELAY);
s_local_param.x_dir = -1;
xSemaphoreGive(s_local_param.mouse_mutex);
} else if (param->set_protocol.protocol_mode == ESP_HIDD_REPORT_MODE) {
ESP_LOGI(TAG, " - report protocol");
}
xSemaphoreTake(s_local_param.mouse_mutex, portMAX_DELAY);
s_local_param.protocol_mode = param->set_protocol.protocol_mode;
xSemaphoreGive(s_local_param.mouse_mutex);
break;
case ESP_HIDD_INTR_DATA_EVT:
ESP_LOGI(TAG, "ESP_HIDD_INTR_DATA_EVT");
break;
case ESP_HIDD_VC_UNPLUG_EVT:
ESP_LOGI(TAG, "ESP_HIDD_VC_UNPLUG_EVT");
if (param->vc_unplug.status == ESP_HIDD_SUCCESS) {
if (param->close.conn_status == ESP_HIDD_CONN_STATE_DISCONNECTED) {
ESP_LOGI(TAG, "disconnected!");
bt_app_task_shut_down();
ESP_LOGI(TAG, "making self discoverable and connectable again.");
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
} else {
ESP_LOGE(TAG, "unknown connection status");
}
} else {
ESP_LOGE(TAG, "close failed!");
}
break;
default:
break;
}
}
void app_main(void) {
const char* TAG = "app_main";
esp_err_t ret;
s_local_param.app_param.name = "Mouse";
s_local_param.app_param.description = "Mouse Example";
s_local_param.app_param.provider = "ESP32";
s_local_param.app_param.subclass = ESP_HID_CLASS_MIC;
s_local_param.app_param.desc_list = hid_descriptor_mouse_boot_mode;
s_local_param.app_param.desc_list_len = hid_descriptor_mouse_boot_mode_len;
memset(&s_local_param.both_qos, 0, sizeof(esp_hidd_qos_param_t)); // don't set the qos parameters
s_local_param.protocol_mode = ESP_HIDD_REPORT_MODE;
ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK( ret );
ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_BLE));
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
if ((ret = esp_bt_controller_init(&bt_cfg)) != ESP_OK) {
ESP_LOGE(TAG, "initialize controller failed: %s\n", esp_err_to_name(ret));
return;
}
if ((ret = esp_bt_controller_enable(ESP_BT_MODE_CLASSIC_BT)) != ESP_OK) {
ESP_LOGE(TAG, "enable controller failed: %s\n", esp_err_to_name(ret));
return;
}
if ((ret = esp_bluedroid_init()) != ESP_OK) {
ESP_LOGE(TAG, "initialize bluedroid failed: %s\n", esp_err_to_name(ret));
return;
}
if ((ret = esp_bluedroid_enable()) != ESP_OK) {
ESP_LOGE(TAG, "enable bluedroid failed: %s\n", esp_err_to_name(ret));
return;
}
if ((ret = esp_bt_gap_register_callback(esp_bt_gap_cb)) != ESP_OK) {
ESP_LOGE(TAG, "gap register failed: %s\n", esp_err_to_name(ret));
return;
}
ESP_LOGI(TAG, "setting device name");
esp_bt_dev_set_device_name("HID Mouse Example");
ESP_LOGI(TAG, "setting cod major, peripheral");
esp_bt_cod_t cod;
cod.major = ESP_BT_COD_MAJOR_DEV_PERIPHERAL;
esp_bt_gap_set_cod(cod ,ESP_BT_SET_COD_MAJOR_MINOR);
vTaskDelay(2000 / portTICK_PERIOD_MS);
ESP_LOGI(TAG, "register hid device callback");
esp_bt_hid_device_register_callback(esp_bt_hidd_cb);
ESP_LOGI(TAG, "starting hid device");
esp_bt_hid_device_init();
#if (CONFIG_BT_SSP_ENABLED == true)
/* Set default parameters for Secure Simple Pairing */
esp_bt_sp_param_t param_type = ESP_BT_SP_IOCAP_MODE;
esp_bt_io_cap_t iocap = ESP_BT_IO_CAP_NONE;
esp_bt_gap_set_security_param(param_type, &iocap, sizeof(uint8_t));
#endif
/*
* Set default parameters for Legacy Pairing
* Use variable pin, input pin code when pairing
*/
esp_bt_pin_type_t pin_type = ESP_BT_PIN_TYPE_VARIABLE;
esp_bt_pin_code_t pin_code;
esp_bt_gap_set_pin(pin_type, 0, pin_code);
print_bt_address();
ESP_LOGI(TAG, "exiting");
}

View File

@@ -0,0 +1,7 @@
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_CLASSIC_ENABLED=y
CONFIG_BT_HID_ENABLED=y
CONFIG_BT_HID_DEVICE_ENABLED=y

View File

@@ -43,4 +43,8 @@ After the program started, `bt_spp_initator` will connect it and send data.
- To see the information of data, users shall set `SPP_SHOW_MODE` as `SPP_SHOW_DATA` or `SPP_SHOW_SPEED` in code(should be same with `bt_spp_initator`).
- We also show the Security Simple Pair in this SPP demo. Users can set the IO Capability and Security Mode for their device (security level is fixed level 4). The default security mode of this demo is `ESP_SPP_SEC_AUTHENTICATE` which support MITM (Man In The Middle) protection. For more information about Security Simple Pair on ESP32, please refer to [ESP32_SSP](./ESP32_SSP.md).
- We also show the Security Simple Pair in this SPP demo. Users can set the IO Capability and Security Mode for their device (security level is fixed level 4). The default security mode of this demo is `ESP_SPP_SEC_AUTHENTICATE` which support MITM (Man In The Middle) protection. For more information about Security Simple Pair on ESP32, please refer to [ESP32_SSP](./ESP32_SSP.md).
## FAQ
Q: How many SPP servers does ESP32 support?
A: For now, the maximum number of SPP servers is 6, which is limited by the maximum number of SDP records. When the SPP server is successfully started, the unique SCN (Server Channel Number) will be mapped to the SPP server.

View File

@@ -56,8 +56,6 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
switch (event) {
case ESP_SPP_INIT_EVT:
ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT");
esp_bt_dev_set_device_name(EXAMPLE_DEVICE_NAME);
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
esp_spp_start_srv(sec_mask,role_slave, 0, SPP_SERVER_NAME);
break;
case ESP_SPP_DISCOVERY_COMP_EVT:
@@ -71,6 +69,8 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
break;
case ESP_SPP_START_EVT:
ESP_LOGI(SPP_TAG, "ESP_SPP_START_EVT");
esp_bt_dev_set_device_name(EXAMPLE_DEVICE_NAME);
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
break;
case ESP_SPP_CL_INIT_EVT:
ESP_LOGI(SPP_TAG, "ESP_SPP_CL_INIT_EVT");

View File

@@ -119,3 +119,13 @@ To clearly show how the SSP aggregate with the SPP , we use the Commands and Eff
- If you want to update the responses of HF Unit or want to update the log, please refer to `bt_app_spp.c`.
- Task configuration part is in `example_spp_initiator_demo.c`.
## FAQ
Q: How can we reach the maximum throughput when using SPP?
A: The default MTU size of classic Bluetooth SPP on ESP32 is 990 bytes, and higher throughput can be achieved in the case that data chunck size is close to the MTU size or multiple of MTU size. For example, sending 100 bytes data per second is much better than sending 10 bytes every 100 milliseconds.
Q: What is the difference between the event `ESP_SPP_CONG_EVT` and the parameter `cong` of the event `ESP_SPP_WRITE_EVT`?
A: The event `ESP_SPP_CONG_EVT` shows the changing status from `congest` to `uncongest`, or form `uncongest` to `congest`. Congestion can have many causes, such as using out of the credit which is sent by peer, reaching the high watermark of the Tx buffer, the congestion at Bluetooth L2CAP layer and so on. The parameter `cong` of the event `ESP_SPP_WRITE_EVT` shows a snapshot of the state of the flow control manager after the write operation is completed. The user needs to carefully consider retransmitting or continuing to write according to these two events. The ESP32 offers an VFS mode of SPP which hides the details of retransmitting, but it will block the caller and is not more efficient than the callback mode.
Q: How many SPP clients does ESP32 support?
A: The ESP32 supports maximum 8 SPP clients, which including virtual SPP connections. Virtual SPP connection means that SPP clients can connect to the different SPP servers running on the same peer device. However the number of SPP clients (excluding virtual connections) shall not exceed the number of Bluetooth ACL connections.

View File

@@ -80,8 +80,6 @@ static void esp_spp_cb(uint16_t e, void *p)
ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT status=%d", param->init.status);
if (param->init.status == ESP_SPP_SUCCESS) {
esp_spp_vfs_register();
esp_bt_dev_set_device_name(EXAMPLE_DEVICE_NAME);
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
esp_spp_start_srv(sec_mask, role_slave, 0, SPP_SERVER_NAME);
}
break;
@@ -96,6 +94,8 @@ static void esp_spp_cb(uint16_t e, void *p)
break;
case ESP_SPP_START_EVT:
ESP_LOGI(SPP_TAG, "ESP_SPP_START_EVT");
esp_bt_dev_set_device_name(EXAMPLE_DEVICE_NAME);
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
break;
case ESP_SPP_CL_INIT_EVT:
ESP_LOGI(SPP_TAG, "ESP_SPP_CL_INIT_EVT");

View File

@@ -367,7 +367,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -382,7 +381,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -426,7 +425,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -639,7 +638,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -477,7 +477,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -550,7 +549,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -559,7 +558,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -769,7 +768,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -410,10 +410,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -454,7 +453,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -674,7 +673,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_SMP_ENABLE=y
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -10,7 +10,7 @@ To test this demo, you need to prepare a mobile phone with blufi application ins
Blufi is completely open source, here is the download link:
* [blufi source code](https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/bluedroid/ble/blufi)
* [blufi source code](https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/blufi)
* [BluFi protocol](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/blufi.html?highlight=blufi#the-frame-formats-defined-in-blufi)
@@ -18,4 +18,4 @@ Blufi is completely open source, here is the download link:
* [Android source code](https://github.com/EspressifApp/EspBlufi)
* [Bluetooth Network User Guide CN](https://www.espressif.com/sites/default/files/documentation/esp32_bluetooth_networking_user_guide_cn.pdf)
* [Bluetooth Network User Guide CN](https://www.espressif.com/sites/default/files/documentation/esp32_bluetooth_networking_user_guide_cn.pdf)

View File

@@ -1,3 +1,4 @@
idf_component_register(SRCS "blufi_example_main.c"
"blufi_security.c"
"blufi_init.c"
INCLUDE_DIRS ".")

View File

@@ -11,3 +11,6 @@ uint16_t blufi_crc_checksum(uint8_t iv8, uint8_t *data, int len);
int blufi_security_init(void);
void blufi_security_deinit(void);
int esp_blufi_gap_register_callback(void);
esp_err_t esp_blufi_host_init(void);
esp_err_t esp_blufi_host_and_cb_init(esp_blufi_callbacks_t *callbacks);

View File

@@ -28,49 +28,12 @@
#include "esp_bt.h"
#include "esp_blufi_api.h"
#include "esp_bt_defs.h"
#include "esp_gap_ble_api.h"
#include "esp_bt_main.h"
#include "esp_bt_device.h"
#include "blufi_example.h"
#include "esp_blufi.h"
static void example_event_callback(esp_blufi_cb_event_t event, esp_blufi_cb_param_t *param);
#define BLUFI_DEVICE_NAME "BLUFI_DEVICE"
static uint8_t example_service_uuid128[32] = {
/* LSB <--------------------------------------------------------------------------------> MSB */
//first uuid, 16bit, [12],[13] is the value
0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
};
//static uint8_t test_manufacturer[TEST_MANUFACTURER_DATA_LEN] = {0x12, 0x23, 0x45, 0x56};
static esp_ble_adv_data_t example_adv_data = {
.set_scan_rsp = false,
.include_name = true,
.include_txpower = true,
.min_interval = 0x0006, //slave connection min interval, Time = min_interval * 1.25 msec
.max_interval = 0x0010, //slave connection max interval, Time = max_interval * 1.25 msec
.appearance = 0x00,
.manufacturer_len = 0,
.p_manufacturer_data = NULL,
.service_data_len = 0,
.p_service_data = NULL,
.service_uuid_len = 16,
.p_service_uuid = example_service_uuid128,
.flag = 0x6,
};
static esp_ble_adv_params_t example_adv_params = {
.adv_int_min = 0x100,
.adv_int_max = 0x100,
.adv_type = ADV_TYPE_IND,
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
//.peer_addr =
//.peer_addr_type =
.channel_map = ADV_CHNL_ALL,
.adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};
#define WIFI_LIST_NUM 10
static wifi_config_t sta_config;
@@ -91,10 +54,6 @@ static uint8_t gl_sta_bssid[6];
static uint8_t gl_sta_ssid[32];
static int gl_sta_ssid_len;
/* connect infor*/
static uint8_t server_if;
static uint16_t conn_id;
static void ip_event_handler(void* arg, esp_event_base_t event_base,
int32_t event_id, void* event_data)
{
@@ -242,8 +201,7 @@ static void example_event_callback(esp_blufi_cb_event_t event, esp_blufi_cb_para
case ESP_BLUFI_EVENT_INIT_FINISH:
BLUFI_INFO("BLUFI init finish\n");
esp_ble_gap_set_device_name(BLUFI_DEVICE_NAME);
esp_ble_gap_config_adv_data(&example_adv_data);
esp_blufi_adv_start();
break;
case ESP_BLUFI_EVENT_DEINIT_FINISH:
BLUFI_INFO("BLUFI deinit finish\n");
@@ -251,16 +209,14 @@ static void example_event_callback(esp_blufi_cb_event_t event, esp_blufi_cb_para
case ESP_BLUFI_EVENT_BLE_CONNECT:
BLUFI_INFO("BLUFI ble connect\n");
ble_is_connected = true;
server_if = param->connect.server_if;
conn_id = param->connect.conn_id;
esp_ble_gap_stop_advertising();
esp_blufi_adv_stop();
blufi_security_init();
break;
case ESP_BLUFI_EVENT_BLE_DISCONNECT:
BLUFI_INFO("BLUFI ble disconnect\n");
ble_is_connected = false;
blufi_security_deinit();
esp_ble_gap_start_advertising(&example_adv_params);
esp_blufi_adv_start();
break;
case ESP_BLUFI_EVENT_SET_WIFI_OPMODE:
BLUFI_INFO("BLUFI Set WIFI opmode %d\n", param->wifi_mode.op_mode);
@@ -304,7 +260,7 @@ static void example_event_callback(esp_blufi_cb_event_t event, esp_blufi_cb_para
}
case ESP_BLUFI_EVENT_RECV_SLAVE_DISCONNECT_BLE:
BLUFI_INFO("blufi close a gatt connection");
esp_blufi_close(server_if, conn_id);
esp_blufi_disconnect();
break;
case ESP_BLUFI_EVENT_DEAUTHENTICATE_STA:
/* TODO */
@@ -401,17 +357,6 @@ static void example_event_callback(esp_blufi_cb_event_t event, esp_blufi_cb_para
}
}
static void example_gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
{
switch (event) {
case ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT:
esp_ble_gap_start_advertising(&example_adv_params);
break;
default:
break;
}
}
void app_main(void)
{
esp_err_t ret;
@@ -440,33 +385,11 @@ void app_main(void)
return;
}
ret = esp_bluedroid_init();
ret = esp_blufi_host_and_cb_init(&example_callbacks);
if (ret) {
BLUFI_ERROR("%s init bluedroid failed: %s\n", __func__, esp_err_to_name(ret));
BLUFI_ERROR("%s initialise failed: %s\n", __func__, esp_err_to_name(ret));
return;
}
ret = esp_bluedroid_enable();
if (ret) {
BLUFI_ERROR("%s init bluedroid failed: %s\n", __func__, esp_err_to_name(ret));
return;
}
BLUFI_INFO("BD ADDR: "ESP_BD_ADDR_STR"\n", ESP_BD_ADDR_HEX(esp_bt_dev_get_address()));
BLUFI_INFO("BLUFI VERSION %04x\n", esp_blufi_get_version());
ret = esp_ble_gap_register_callback(example_gap_event_handler);
if(ret){
BLUFI_ERROR("%s gap register failed, error code = %x\n", __func__, ret);
return;
}
ret = esp_blufi_register_callbacks(&example_callbacks);
if(ret){
BLUFI_ERROR("%s blufi register failed, error code = %x\n", __func__, ret);
return;
}
esp_blufi_profile_init();
}

View File

@@ -0,0 +1,181 @@
#include <stdio.h>
#include "esp_err.h"
#include "esp_blufi_api.h"
#include "esp_log.h"
#include "esp_blufi.h"
#include "blufi_example.h"
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#include "esp_bt.h"
#include "esp_bt_main.h"
#include "esp_bt_device.h"
#endif
#ifdef CONFIG_BT_NIMBLE_ENABLED
#include "esp_nimble_hci.h"
#include "nimble/nimble_port.h"
#include "nimble/nimble_port_freertos.h"
#include "host/ble_hs.h"
#include "host/util/util.h"
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#include "console/console.h"
#endif
#ifdef CONFIG_BT_BLUEDROID_ENABLED
esp_err_t esp_blufi_host_init(void)
{
int ret;
ret = esp_bluedroid_init();
if (ret) {
BLUFI_ERROR("%s init bluedroid failed: %s\n", __func__, esp_err_to_name(ret));
return ESP_FAIL;
}
ret = esp_bluedroid_enable();
if (ret) {
BLUFI_ERROR("%s init bluedroid failed: %s\n", __func__, esp_err_to_name(ret));
return ESP_FAIL;
}
BLUFI_INFO("BD ADDR: "ESP_BD_ADDR_STR"\n", ESP_BD_ADDR_HEX(esp_bt_dev_get_address()));
return ESP_OK;
}
esp_err_t esp_blufi_gap_register_callback(void)
{
int rc;
rc = esp_ble_gap_register_callback(esp_blufi_gap_event_handler);
if(rc){
return rc;
}
return esp_blufi_profile_init();
}
esp_err_t esp_blufi_host_and_cb_init(esp_blufi_callbacks_t *example_callbacks)
{
esp_err_t ret = ESP_OK;
ret = esp_blufi_host_init();
if (ret) {
BLUFI_ERROR("%s initialise host failed: %s\n", __func__, esp_err_to_name(ret));
return ret;
}
ret = esp_blufi_register_callbacks(example_callbacks);
if(ret){
BLUFI_ERROR("%s blufi register failed, error code = %x\n", __func__, ret);
return ret;
}
ret = esp_blufi_gap_register_callback();
if(ret){
BLUFI_ERROR("%s gap register failed, error code = %x\n", __func__, ret);
return ret;
}
return ESP_OK;
}
#endif /* CONFIG_BT_BLUEDROID_ENABLED */
#ifdef CONFIG_BT_NIMBLE_ENABLED
void ble_store_config_init(void);
static void blufi_on_reset(int reason)
{
MODLOG_DFLT(ERROR, "Resetting state; reason=%d\n", reason);
}
static void
blufi_on_sync(void)
{
esp_blufi_profile_init();
}
void bleprph_host_task(void *param)
{
ESP_LOGI("BLUFI_EXAMPLE", "BLE Host Task Started");
/* This function will return only when nimble_port_stop() is executed */
nimble_port_run();
nimble_port_freertos_deinit();
}
esp_err_t esp_blufi_host_init(void)
{
ESP_ERROR_CHECK(esp_nimble_hci_init());
nimble_port_init();
/* Initialize the NimBLE host configuration. */
ble_hs_cfg.reset_cb = blufi_on_reset;
ble_hs_cfg.sync_cb = blufi_on_sync;
ble_hs_cfg.gatts_register_cb = esp_blufi_gatt_svr_register_cb;
ble_hs_cfg.store_status_cb = ble_store_util_status_rr;
ble_hs_cfg.sm_io_cap = 4;
#ifdef CONFIG_EXAMPLE_BONDING
ble_hs_cfg.sm_bonding = 1;
#endif
#ifdef CONFIG_EXAMPLE_MITM
ble_hs_cfg.sm_mitm = 1;
#endif
#ifdef CONFIG_EXAMPLE_USE_SC
ble_hs_cfg.sm_sc = 1;
#else
ble_hs_cfg.sm_sc = 0;
#ifdef CONFIG_EXAMPLE_BONDING
ble_hs_cfg.sm_our_key_dist = 1;
ble_hs_cfg.sm_their_key_dist = 1;
#endif
#endif
int rc;
rc = esp_blufi_gatt_svr_init();
assert(rc == 0);
/* Set the default device name. */
rc = ble_svc_gap_device_name_set(BLUFI_DEVICE_NAME);
assert(rc == 0);
/* XXX Need to have template for store */
ble_store_config_init();
esp_blufi_btc_init();
nimble_port_freertos_init(bleprph_host_task);
return ESP_OK;
}
esp_err_t esp_blufi_gap_register_callback(void)
{
return ESP_OK;
}
esp_err_t esp_blufi_host_and_cb_init(esp_blufi_callbacks_t *example_callbacks)
{
esp_err_t ret = ESP_OK;
ret = esp_blufi_register_callbacks(example_callbacks);
if(ret){
BLUFI_ERROR("%s blufi register failed, error code = %x\n", __func__, ret);
return ret;
}
ret = esp_blufi_gap_register_callback();
if(ret){
BLUFI_ERROR("%s gap register failed, error code = %x\n", __func__, ret);
return ret;
}
ret = esp_blufi_host_init();
if (ret) {
BLUFI_ERROR("%s initialise host failed: %s\n", __func__, esp_err_to_name(ret));
return ret;
}
return ret;
}
#endif /* CONFIG_BT_NIMBLE_ENABLED */

View File

@@ -20,9 +20,6 @@
#include "esp_bt.h"
#include "esp_blufi_api.h"
#include "esp_bt_defs.h"
#include "esp_gap_ble_api.h"
#include "esp_bt_main.h"
#include "blufi_example.h"
#include "mbedtls/aes.h"

View File

@@ -398,10 +398,9 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32=y
#
# Bluetooth controller(ESP32 Dual Mode Bluetooth)
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
@@ -442,7 +441,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BTDM_COEX_BT_OPTIONS is not set
# end of Bluetooth controller(ESP32 Dual Mode Bluetooth)
# end of Bluetooth controller
CONFIG_BTDM_CTRL_HW_CCA_EFF=0
CONFIG_BTDM_CTRL_DFT_TX_POWER_LEVEL_EFF=0
@@ -659,7 +658,7 @@ CONFIG_BT_ACL_CONNECTIONS=4
# CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set
# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set
CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -355,7 +355,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
@@ -370,7 +369,7 @@ CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
#
# Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_MODE_EFF=1
CONFIG_BT_CTRL_BLE_MAX_ACT=10
@@ -412,7 +411,7 @@ CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=7
CONFIG_BT_CTRL_SLEEP_MODE_EFF=0
CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
# end of Bluetooth controller(ESP32C3 Bluetooth Low Energy)
# end of Bluetooth controller
#
# MODEM SLEEP Options
@@ -625,7 +624,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -465,7 +465,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32S3=y
CONFIG_BT_SOC_SUPPORT_5_0=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
@@ -538,7 +537,7 @@ CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0
CONFIG_BT_CTRL_HCI_TL_EFF=1
#
# Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# Bluetooth controller
#
CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set
@@ -547,7 +546,7 @@ CONFIG_BT_CTRL_PINNED_TO_CORE_0=y
# MODEM SLEEP Options
#
# end of MODEM SLEEP Options
# end of Bluetooth controller(ESP32S3 Bluetooth Low Energy)
# end of Bluetooth controller
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
@@ -754,7 +753,6 @@ CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30
CONFIG_BT_BLE_RPA_SUPPORTED=y
# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# end of Bluedroid Options
# end of Bluetooth

View File

@@ -13,7 +13,6 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_ESP32C3=y
CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN=y
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MANUAL=y

View File

@@ -46,7 +46,7 @@ CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MANUAL=y
CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=y
CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY=y
CONFIG_BT_SMP_ENABLE=y
CONFIG_BT_RESERVE_DRAM=0x10000
CONFIG_BTDM_RESERVE_DRAM=0x10000
#
# ESP32-specific

View File

@@ -2,5 +2,7 @@
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_components/example_init)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ble_mesh_console)

View File

@@ -7,4 +7,6 @@ PROJECT_NAME := ble_mesh_console
COMPONENT_ADD_INCLUDEDIRS := components/include
EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_components/example_init
include $(IDF_PATH)/make/project.mk

View File

@@ -104,7 +104,7 @@ void ble_mesh_set_node_prestore_params(uint16_t netkey_index, uint16_t unicast_a
void ble_mesh_node_statistics_get(void)
{
xSemaphoreTake(ble_mesh_node_sema, portMAX_DELAY);
ESP_LOGI(TAG, "statistics:%d,%d\n", ble_mesh_node_statistics.statistics, ble_mesh_node_statistics.package_num);
ESP_LOGI(TAG, "Statistics:%d\n", ble_mesh_node_statistics.package_num);
xSemaphoreGive(ble_mesh_node_sema);
}
@@ -114,6 +114,7 @@ int ble_mesh_node_statistics_accumulate(uint8_t *data, uint32_t value, uint16_t
uint16_t sequence_num = (data[0] << 8) | data[1];
xSemaphoreTake(ble_mesh_node_sema, portMAX_DELAY);
for (i = 0; i < ble_mesh_node_statistics.total_package_num; i++) {
if (ble_mesh_node_statistics.package_index[i] == sequence_num) {
xSemaphoreGive(ble_mesh_node_sema);
@@ -136,6 +137,7 @@ int ble_mesh_node_statistics_accumulate(uint8_t *data, uint32_t value, uint16_t
}
}
xSemaphoreGive(ble_mesh_node_sema);
return 0;
}
@@ -190,24 +192,26 @@ void ble_mesh_create_send_data(char *data, uint16_t byte_num, uint16_t sequence_
void ble_mesh_test_performance_client_model_get(void)
{
uint32_t i, j;
uint32_t i;
uint32_t succeed_packet_count;
uint32_t sum_time = 0;
uint32_t failed_packet_num = 0;
uint32_t rtt = 0;
for (i = 0, j = 0; i < test_perf_statistics.test_num; i++) {
for (i = 0, succeed_packet_count = 0; i < test_perf_statistics.test_num; i++) {
if (test_perf_statistics.time[i] != 0) {
sum_time += test_perf_statistics.time[i];
j += 1;
succeed_packet_count += 1;
} else {
continue;
}
if (j == test_perf_statistics.test_num - 1) {
break;
failed_packet_num += 1;
}
}
ESP_LOGI(TAG, "VendorModel:Statistics,%d,%d\n",
test_perf_statistics.statistics, (sum_time / (j + 1)));
if(succeed_packet_count != 0){
rtt = (int)(sum_time / succeed_packet_count);
}
ESP_LOGI(TAG, "VendorModel:Statistics,%d,%d\n", failed_packet_num, rtt);
}
void ble_mesh_test_performance_client_model_get_received_percent(void)
@@ -250,6 +254,9 @@ void ble_mesh_test_performance_client_model_get_received_percent(void)
// for script match
ESP_LOGI(TAG, "VendorModel:Statistics");
for (j = 0; j < time_level_num; j++) {
ESP_LOGI("", "%d:%d", statistics_time_percent[j].time_level, statistics_time_percent[j].time_num);
}
free(statistics_time_percent);
}
@@ -264,18 +271,12 @@ int ble_mesh_test_performance_client_model_accumulate_time(uint16_t time, uint8_
uint16_t sequence_num = 0;
uint16_t node_received_ttl = 0;
// receive failed
if (length != test_perf_statistics.test_length) {
return 1;
}
if (data != NULL) {
sequence_num = (data[0] << 8) | data[1];
if (data[2] == VENDOR_MODEL_PERF_OPERATION_TYPE_SET) {
node_received_ttl = data[3];
}
}
for (i = 0; i < test_perf_statistics.test_num; i++) {
if (test_perf_statistics.package_index[i] == sequence_num) {
return 1;
@@ -286,7 +287,7 @@ int ble_mesh_test_performance_client_model_accumulate_time(uint16_t time, uint8_
if (test_perf_statistics.package_index[i] == 0) {
test_perf_statistics.package_index[i] = sequence_num;
if (data[2] == VENDOR_MODEL_PERF_OPERATION_TYPE_SET) {
if (node_received_ttl == test_perf_statistics.ttl && ack_ttl == test_perf_statistics.ttl) {
if (node_received_ttl == test_perf_statistics.ttl) {
test_perf_statistics.time[i] = time;
} else {
test_perf_statistics.time[i] = 0;

View File

@@ -22,12 +22,10 @@
#include "esp_vfs_fat.h"
#include "esp_bt.h"
#include "esp_bt_main.h"
#include "esp_console.h"
#include "ble_mesh_console_decl.h"
#include "ble_mesh_example_init.h"
#define TAG "ble_mesh_test"
@@ -50,34 +48,6 @@ static void initialize_filesystem(void)
}
#endif // CONFIG_STORE_HISTORY
esp_err_t bluetooth_init(void)
{
esp_err_t ret;
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
ret = esp_bt_controller_init(&bt_cfg);
if (ret) {
return ret;
}
ret = esp_bt_controller_enable(ESP_BT_MODE_BLE);
if (ret) {
return ret;
}
ret = esp_bluedroid_init();
if (ret) {
return ret;
}
ret = esp_bluedroid_enable();
if (ret) {
return ret;
}
esp_log_level_set("*", ESP_LOG_ERROR);
esp_log_level_set("ble_mesh_console", ESP_LOG_INFO);
return ret;
}
void app_main(void)
{
esp_err_t res;
@@ -90,6 +60,9 @@ void app_main(void)
printf("esp32_bluetooth_init failed (ret %d)", res);
}
esp_log_level_set("*", ESP_LOG_INFO);
esp_log_level_set("ble_mesh_console", ESP_LOG_INFO);
esp_console_repl_t *repl = NULL;
esp_console_repl_config_t repl_config = ESP_CONSOLE_REPL_CONFIG_DEFAULT();
esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT();

View File

@@ -62,7 +62,7 @@ static void register_restart(void)
static int free_mem(int argc, char **argv)
{
printf("%d\n", esp_get_free_heap_size());
printf("freeheap:%d\n", esp_get_free_heap_size());
return 0;
}

View File

@@ -70,18 +70,18 @@ void ble_mesh_test_performance_client_model_throughput(void *params)
ctx.model = profile_context->model;
ctx.send_rel = 0;
test_perf_statistics.test_length = profile_context->length;
// create send data
data = malloc(profile_context->length);
if (data == NULL) {
ESP_LOGE(TAG, " %s, %d, malloc fail\n", __func__, __LINE__);
}
TRANSACTION_INIT(&trans, TRANS_TYPE_MESH_PERF, TRANS_MESH_SEND_MESSAGE,
TRANS_MESH_SEND_MESSAGE_EVT, SEND_MESSAGE_TIMEOUT, &start_time, NULL);
for (i = 1; i <= profile_context->test_num; i++) {
ble_mesh_create_send_data((char *)data, profile_context->length, i, profile_context->opcode);
start_time = esp_timer_get_time();
TRANSACTION_INIT(&trans, TRANS_TYPE_MESH_PERF, TRANS_MESH_SEND_MESSAGE,
TRANS_MESH_SEND_MESSAGE_EVT, SEND_MESSAGE_TIMEOUT, &start_time, NULL);
//tx: data profile_context->length
esp_ble_mesh_client_model_send_msg(profile_context->model, &ctx, profile_context->opcode,
profile_context->length, data, 8000, profile_context->need_ack, profile_context->device_role);
ble_mesh_test_performance_client_model_accumulate_statistics(profile_context->length);
@@ -156,7 +156,6 @@ int ble_mesh_test_performance_client_model_performance(int argc, char **argv)
}
if (strcmp(test_perf_client_model_statistics.action_type->sval[0], "init") == 0) {
init_transactions();
result = ble_mesh_test_performance_client_model_init(test_perf_client_model_statistics.node_num->ival[0],
test_perf_client_model_statistics.test_size->ival[0], test_perf_client_model_statistics.ttl->ival[0]);
if (result == 0) {

View File

@@ -15,8 +15,6 @@
#include "esp_bt.h"
#include "soc/soc.h"
#include "esp_bt_device.h"
#include "test.h"
#include "esp_ble_mesh_networking_api.h"
#include "esp_ble_mesh_defs.h"
@@ -25,8 +23,8 @@
#include "esp_ble_mesh_generic_model_api.h"
#include "ble_mesh_console_lib.h"
#include "ble_mesh_adapter.h"
#include "transaction.h"
#include "esp_bt_defs.h"
#include "provisioner_prov.h"
@@ -56,6 +54,12 @@ typedef struct {
} ble_mesh_comp_t;
static ble_mesh_comp_t component;
typedef struct {
struct arg_int *action;
struct arg_end *end;
} ble_mesh_deinit_t;
static ble_mesh_deinit_t deinit;
typedef struct {
struct arg_int *bearer;
struct arg_int *enable;
@@ -290,8 +294,8 @@ void ble_mesh_prov_cb(esp_ble_mesh_prov_cb_event_t event, esp_ble_mesh_prov_cb_p
#if (CONFIG_BLE_MESH_PROVISIONER)
case ESP_BLE_MESH_PROVISIONER_RECV_UNPROV_ADV_PKT_EVT:
ESP_LOGD(TAG, "Provisioner recv unprovisioned device beacon:");
ESP_LOG_BUFFER_HEX("Device UUID %s", param->provisioner_recv_unprov_adv_pkt.dev_uuid, 16);
ESP_LOG_BUFFER_HEX("Address %s", param->provisioner_recv_unprov_adv_pkt.addr, 6);
ESP_LOG_BUFFER_HEX("Device UUID", param->provisioner_recv_unprov_adv_pkt.dev_uuid, 16);
ESP_LOG_BUFFER_HEX("Address", param->provisioner_recv_unprov_adv_pkt.addr, 6);
ESP_LOGD(TAG, "Address type 0x%x, oob_info 0x%04x, adv_type 0x%x, bearer 0x%x",
param->provisioner_recv_unprov_adv_pkt.addr_type, param->provisioner_recv_unprov_adv_pkt.oob_info,
param->provisioner_recv_unprov_adv_pkt.adv_type, param->provisioner_recv_unprov_adv_pkt.bearer);
@@ -347,13 +351,24 @@ void ble_mesh_model_cb(esp_ble_mesh_model_cb_event_t event, esp_ble_mesh_model_c
{
uint16_t result;
uint8_t data[4];
esp_err_t outcome = ESP_OK;
uint8_t status;
uint64_t *start_time = NULL;
transaction_t *trans = NULL;
ESP_LOGD(TAG, "enter %s, event=%x\n", __func__, event);
do {
trans = transaction_get(TRANS_TYPE_MESH_PERF, TRANS_MESH_SEND_MESSAGE, trans);
if (trans) {
start_time = (uint64_t *)trans->input;
break;
}
}while(trans);
switch (event) {
case ESP_BLE_MESH_MODEL_OPERATION_EVT:
if (param->model_operation.model != NULL && param->model_operation.model->op != NULL) {
if (param->model_operation.opcode == ESP_BLE_MESH_VND_MODEL_OP_TEST_PERF_SET) {
if (param->model_operation.opcode == ESP_BLE_MESH_VND_MODEL_OP_TEST_PERF_SET) {
ESP_LOGI(TAG, "VendorModel:SetAck,Success,%d", param->model_operation.ctx->recv_ttl);
data[0] = param->model_operation.msg[0];
data[1] = param->model_operation.msg[1];
@@ -367,9 +382,36 @@ void ble_mesh_model_cb(esp_ble_mesh_model_cb_event_t event, esp_ble_mesh_model_c
} else if (param->model_operation.opcode == ESP_BLE_MESH_VND_MODEL_OP_TEST_PERF_SET_UNACK) {
ESP_LOGI(TAG, "VendorModel:SetUnAck,Success,%d,%d", param->model_operation.ctx->recv_ttl, param->model_operation.length);
result = ble_mesh_node_statistics_accumulate(param->model_operation.msg, param->model_operation.length, VENDOR_MODEL_PERF_OPERATION_TYPE_SET_UNACK);
if (result == 0) {
esp_ble_mesh_server_model_send_msg(param->model_operation.model, param->model_operation.ctx,
ESP_BLE_MESH_VND_MODEL_OP_TEST_PERF_STATUS, param->model_operation.length, param->model_operation.msg);
}
else if (param->model_operation.opcode == ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_GET) {
ESP_LOGI(TAG, "Node:GetStatus,OK");
ble_mesh_node_get_state(status);
outcome = esp_ble_mesh_server_model_send_msg(param->model_operation.model, param->model_operation.ctx, ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_STATUS,
sizeof(status), &status);
if (outcome != ESP_OK) {
ESP_LOGE(TAG, "Node:SendMsg,Fal");
}
} else if (param->model_operation.opcode == ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET) {
ble_mesh_node_set_state(param->model_operation.msg[0]);
ESP_LOGI(TAG, "Node:SetAck,OK,%d,%d", param->model_operation.msg[0], param->model_operation.ctx->recv_ttl);
outcome = esp_ble_mesh_server_model_send_msg(param->model_operation.model, param->model_operation.ctx, ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_STATUS,
sizeof(status), param->model_operation.msg);
if (outcome != ESP_OK) {
ESP_LOGE(TAG, "Node:SendMsg,Fal");
}
} else if (param->model_operation.opcode == ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET_UNACK) {
ble_mesh_node_set_state(param->model_operation.msg[0]);
ESP_LOGI(TAG, "Node:SetUnAck,OK,%d,%d", param->model_operation.msg[0], param->model_operation.ctx->recv_ttl);
} else if (param->model_operation.opcode == ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_STATUS) {
ESP_LOGI(TAG, "Node:Status,Success,%d", param->model_operation.length);
} else if (param->model_operation.opcode == ESP_BLE_MESH_VND_MODEL_OP_TEST_PERF_SET) {
ESP_LOGI(TAG, "VendorModel:SetAck,OK,%d", param->model_operation.ctx->recv_ttl);
} else if (param->model_operation.opcode == ESP_BLE_MESH_VND_MODEL_OP_TEST_PERF_STATUS) {
if (trans) {
uint64_t current_time = esp_timer_get_time();
outcome = ble_mesh_test_performance_client_model_accumulate_time(((uint32_t)(current_time - *start_time) / 1000), param->model_operation.msg,
param->model_operation.ctx->recv_ttl, param->model_operation.length);
transaction_set_events(trans, TRANS_MESH_SEND_MESSAGE_EVT);
}
}
}
@@ -384,11 +426,23 @@ void ble_mesh_model_cb(esp_ble_mesh_model_cb_event_t event, esp_ble_mesh_model_c
case ESP_BLE_MESH_MODEL_PUBLISH_COMP_EVT:
ESP_LOGI(TAG, "PublishSend,OK,0x%x,%d,", param->model_publish_comp.model->model_id, param->model_publish_comp.model->pub->msg->len);
break;
case ESP_BLE_MESH_CLIENT_MODEL_RECV_PUBLISH_MSG_EVT:
ESP_LOGI(TAG, "Node:PublishReceive,OK,0x%04X,%d,%d", param->client_recv_publish_msg.opcode, param->client_recv_publish_msg.length, param->client_recv_publish_msg.msg[1]);
if (trans) {
uint64_t current_time = esp_timer_get_time();
outcome = ble_mesh_test_performance_client_model_accumulate_time(((uint32_t)(current_time - *start_time) / 2000), param->client_recv_publish_msg.msg,
param->client_recv_publish_msg.ctx->recv_ttl, param->client_recv_publish_msg.length);
transaction_set_events(trans, TRANS_MESH_SEND_MESSAGE_EVT);
}
break;
case ESP_BLE_MESH_MODEL_PUBLISH_UPDATE_EVT:
ESP_LOGI(TAG, "PublishUpdate,OK");
break;
case ESP_BLE_MESH_CLIENT_MODEL_SEND_TIMEOUT_EVT:
ESP_LOGI(TAG, "Node:TimeOut");
ESP_LOGI(TAG, "Node:TimeOut, 0x%04X", param->client_send_timeout.opcode);
if (trans) {
transaction_set_events(trans, TRANS_MESH_SEND_MESSAGE_EVT);
}
break;
case ESP_BLE_MESH_MODEL_EVT_MAX:
ESP_LOGI(TAG, "Node:MaxEvt");
@@ -429,6 +483,19 @@ int ble_mesh_power_set(int argc, char **argv)
return result;
}
static int get_dev_uuid(uint8_t uuid[16])
{
uint8_t addr[6] = {0};
extern int get_bd_addr(uint8_t addr[6]);
if (get_bd_addr(addr)) {
return -1;
}
memcpy(uuid, addr, BD_ADDR_LEN);
return 0;
}
static int ble_mesh_load_oob(int argc, char **argv)
{
uint8_t *static_val;
@@ -444,7 +511,9 @@ static int ble_mesh_load_oob(int argc, char **argv)
//parsing prov
#if CONFIG_BLE_MESH_NODE
prov.uuid = dev_uuid;
memcpy(dev_uuid, esp_bt_dev_get_address(), BD_ADDR_LEN);
if (get_dev_uuid(dev_uuid)) {
return 1;
}
if (oob.static_val->count != 0) {
static_val = malloc(oob.static_val_len->ival[0] + 1);
if (static_val == NULL) {
@@ -500,7 +569,7 @@ int ble_mesh_init(int argc, char **argv)
if (device_uuid == NULL) {
ESP_LOGE(TAG, "ble mesh malloc failed, %d\n", __LINE__);
}
err = get_value_string((char *)component.dev_uuid->sval[0], (char *) device_uuid);
err = get_value_string((char *)component.dev_uuid->sval[0], (char *)device_uuid);
if (err == ESP_OK) {
memcpy(dev_uuid, device_uuid, ESP_BLE_MESH_OCTET16_LEN);
} else {
@@ -508,7 +577,9 @@ int ble_mesh_init(int argc, char **argv)
memcpy(dev_uuid, device_uuid, BD_ADDR_LEN);
}
} else {
memcpy(dev_uuid, esp_bt_dev_get_address(), 6);
if (get_dev_uuid(dev_uuid)) {
return 1;
}
}
err = esp_ble_mesh_init(&prov, local_component);
@@ -550,6 +621,35 @@ int ble_mesh_node_enable_bearer(int argc, char **argv)
return err;
}
int ble_mesh_deinit(int argc, char **argv)
{
int err;
esp_ble_mesh_deinit_param_t param = {};
ESP_LOGD(TAG, "enter %s \n", __func__);
int nerrors = arg_parse(argc, argv, (void **) &deinit);
if (nerrors != 0) {
arg_print_errors(stderr, deinit.end, argv[0]);
return 1;
}
if (deinit.action->count != 0) {
param.erase_flash = deinit.action->ival[0];
err = esp_ble_mesh_deinit(&param);
if (err == ESP_OK) {
ESP_LOGI(TAG, "Bm:DeInit,OK,%d,\n", deinit.action->ival[0]);
}
else{
ESP_LOGI(TAG, "Bm:DeInit,Fail\n");
}
}
else {
return 1;
}
ESP_LOGD(TAG, "exit %s\n", __func__);
return err;
}
int ble_mesh_provisioner_enable_bearer(int argc, char **argv)
{
esp_err_t err = 0;
@@ -672,9 +772,15 @@ int ble_mesh_provision_address(int argc, char **argv)
str_2_mac((uint8_t *)provisioner_addr.device_addr->sval[0], del_dev.addr);
arg_int_to_value(provisioner_addr.addr_type, device_addr.addr_type, "address type");
arg_int_to_value(provisioner_addr.addr_type, del_dev.addr_type, "address type");
} else if (provisioner_addr.device_uuid->count != 0) {
get_value_string((char *)provisioner_addr.device_uuid->sval[0], (char *)device_addr.uuid);
get_value_string((char *)provisioner_addr.device_uuid->sval[0], (char *)del_dev.uuid);
}
if (provisioner_addr.device_uuid->count != 0) {
uint8_t tmp_uuid[16] = {0};
err = get_value_string((char *)provisioner_addr.device_uuid->sval[0], (char *)tmp_uuid);
if (err != ESP_OK) {
str_2_mac((uint8_t *)provisioner_addr.device_uuid->sval[0], tmp_uuid);
}
memcpy(device_addr.uuid, tmp_uuid, 16);
memcpy(del_dev.uuid, tmp_uuid, 16);
del_dev.flag = BIT(1);
}
@@ -858,7 +964,19 @@ void ble_mesh_register_cmd(void)
.func = &ble_mesh_init,
.argtable = &component,
};
ESP_ERROR_CHECK( esp_console_cmd_register(&model_cmd) );
ESP_ERROR_CHECK( esp_console_cmd_register(&model_cmd));
deinit.action = arg_int0("o", NULL, "<action>", "deinit action");
deinit.end = arg_end(1);
const esp_console_cmd_t deinit_cmd = {
.command = "bmdeinit",
.help = "ble mesh: provisioner/node deinit",
.hint = NULL,
.func = &ble_mesh_deinit,
.argtable = &deinit,
};
ESP_ERROR_CHECK( esp_console_cmd_register(&deinit_cmd));
provisioner_addr.add_del = arg_str1("z", NULL, "<add/delete>", "action type");
provisioner_addr.device_addr = arg_str0("d", NULL, "<address>", "device address");
@@ -896,7 +1014,7 @@ void ble_mesh_register_cmd(void)
.func = &ble_mesh_load_oob,
.argtable = &oob,
};
ESP_ERROR_CHECK( esp_console_cmd_register(&oob_cmd) );
ESP_ERROR_CHECK( esp_console_cmd_register(&oob_cmd));
bearer.bearer = arg_int0("b", NULL, "<bearer>", "supported bearer");
bearer.enable = arg_int0("e", NULL, "<enable/disable>", "bearers node supported");
@@ -1027,4 +1145,6 @@ void ble_mesh_register_cmd(void)
.argtable = &node_network_info,
};
ESP_ERROR_CHECK(esp_console_cmd_register(&node_network_info_cmd));
init_transactions();
}

View File

@@ -11,10 +11,18 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "string.h"
#include "esp_bt_device.h"
#include "esp_console.h"
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#include "esp_bt_device.h"
#endif
#ifdef CONFIG_BT_NIMBLE_ENABLED
#include "host/ble_hs.h"
#endif
#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
@@ -25,9 +33,45 @@ void register_bluetooth(void)
register_ble_address();
}
int get_bd_addr(uint8_t addr[6])
{
if (addr) {
#ifdef CONFIG_BT_BLUEDROID_ENABLED
memcpy(addr, esp_bt_dev_get_address(), 6);
return 0;
#endif
#ifdef CONFIG_BT_NIMBLE_ENABLED
uint8_t own_addr_type = 0;
uint8_t mac[6] = {0};
int rc = 0;
rc = ble_hs_id_infer_auto(0, &own_addr_type);
if (rc != 0) {
printf("error determining address type; rc=%d\n", rc);
return rc;
}
ble_hs_id_copy_addr(own_addr_type, mac, NULL);
uint8_t *src = addr;
uint8_t *dst = mac + 5;
for (uint8_t length = 6; length > 0; length--) {
*src++ = *dst--;
}
return 0;
#endif
}
return -1;
}
int bt_mac(int argc, char** argv)
{
const uint8_t *mac = esp_bt_dev_get_address();
uint8_t mac[6] = {0};
get_bd_addr(mac);
printf("+BTMAC:"MACSTR"\n", MAC2STR(mac));
return 0;
}

View File

@@ -5,14 +5,10 @@
#include "freertos/event_groups.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_timer.h"
#include "esp_log.h"
#include "esp_err.h"
#include "transaction.h"
#define TAG "TRANS"
static transaction_t transactions[MAX_TRANSACTION_COUNT];
@@ -178,7 +174,6 @@ esp_err_t transaction_run(transaction_t *trans)
if (trans) {
start_time = utils_get_system_ts();
// wait for wait events
while (1) {
//TODO: we didn't handle ts overflow
@@ -246,7 +241,6 @@ transaction_t *transaction_get(uint8_t type, uint32_t sub_type, transaction_t *s
}
}
xSemaphoreGiveRecursive(trans_mutex);
ESP_LOGV(TAG, "transaction get: %x, %x, %x, %x", type, sub_type, (uint32_t) start, (uint32_t) trans);
return trans;
}

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