Merge branch 'feature/support_ble_mesh_for_esp32h2' into 'master'

ble_mesh: example: update ble mesh examples for esp32h2

See merge request espressif/esp-idf!22734
This commit is contained in:
Jiang Jiang Jian 2023-03-20 16:24:19 +08:00
commit eaae3178e0
22 changed files with 265 additions and 0 deletions

View File

@ -0,0 +1,30 @@
# ESP32H2-specific
##Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=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
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_NODE=y
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=3
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=3
CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y
CONFIG_BLE_MESH_PROVISIONER=y
CONFIG_BLE_MESH_SELF_TEST=y
CONFIG_BLE_MESH_TEST_AUTO_ENTER_NETWORK=y
CONFIG_BLE_MESH_WAIT_FOR_PROV_MAX_DEV_NUM=80
CONFIG_BLE_MESH_MAX_PROV_NODES=80
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
# end of ESP32H2-specific

View File

@ -0,0 +1,21 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN=y
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_PROVISIONER=y
CONFIG_BLE_MESH_PBA_SAME_TIME=1
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_ADV_BUF_COUNT=100
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y

View File

@ -29,6 +29,10 @@ menu "Example Configuration"
bool "ESP32C6-DevKitC"
depends on IDF_TARGET_ESP32C6
config BLE_MESH_ESP32H2_DEV
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
endchoice
endmenu

View File

@ -32,6 +32,10 @@
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32H2_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
struct _led_state {

View File

@ -0,0 +1,27 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=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
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_FAST_PROV=y
CONFIG_BLE_MESH_MAX_PROV_NODES=6
CONFIG_BLE_MESH_PBA_SAME_TIME=3
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_CRPL=60
CONFIG_BLE_MESH_MSG_CACHE_SIZE=60
CONFIG_BLE_MESH_ADV_BUF_COUNT=200
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_TRACE_LEVEL_ERROR=y
CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y

View File

@ -29,6 +29,10 @@ menu "Example Configuration"
bool "ESP32C6-DevKitC"
depends on IDF_TARGET_ESP32C6
config BLE_MESH_ESP32H2_DEV
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
endchoice
endmenu

View File

@ -33,6 +33,10 @@
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32H2_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,29 @@
# ESP32H2-specific
##Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=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
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_NODE=y
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=3
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=3
CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y
CONFIG_BLE_MESH_PROVISIONER=y
CONFIG_BLE_MESH_SELF_TEST=y
CONFIG_BLE_MESH_TEST_AUTO_ENTER_NETWORK=y
CONFIG_BLE_MESH_WAIT_FOR_PROV_MAX_DEV_NUM=80
CONFIG_BLE_MESH_MAX_PROV_NODES=80
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# end of ESP32H2-specific

View File

@ -29,6 +29,10 @@ menu "Example Configuration"
bool "ESP32C6-DevKitC"
depends on IDF_TARGET_ESP32C6
config BLE_MESH_ESP32H2_DEV
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
endchoice
endmenu

View File

@ -32,6 +32,10 @@
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32H2_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,18 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=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
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_NODE=y
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=10

View File

@ -0,0 +1,19 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN=y
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_PROVISIONER=y
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y

View File

@ -0,0 +1,19 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN=y
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_PROVISIONER=y
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BLE_MESH_SENSOR_CLI=y

View File

@ -29,6 +29,10 @@ menu "Example Configuration"
bool "ESP32C6-DevKitC"
depends on IDF_TARGET_ESP32C6
config BLE_MESH_ESP32H2_DEV
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
endchoice
endmenu

View File

@ -32,6 +32,10 @@
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32H2_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,18 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=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
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_NODE=y
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=10

View File

@ -0,0 +1,18 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=y
CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE=y
CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN=y
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_PROVISIONER=y
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_CFG_CLI=y

View File

@ -29,6 +29,10 @@ menu "Example Configuration"
bool "ESP32C6-DevKitC"
depends on IDF_TARGET_ESP32C6
config BLE_MESH_ESP32H2_DEV
bool "ESP32H2-DevKitC"
depends on IDF_TARGET_ESP32H2
endchoice
endmenu

View File

@ -32,6 +32,10 @@
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32H2_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
#define LED_ON 1

View File

@ -0,0 +1,18 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_BT_ENABLED=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
CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_LE_50_FEATURE_SUPPORT=n
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
# Override some defaults of ESP BLE Mesh
CONFIG_BLE_MESH=y
CONFIG_BLE_MESH_NODE=y
CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=10

View File

@ -29,6 +29,10 @@ menu "Example Configuration"
bool "ESP32C6-DevKitC"
depends on IDF_TARGET_ESP32C6
config BLE_MESH_ESP32H2_DEV
bool "ESP32C6-DevKitC"
depends on IDF_TARGET_ESP32H2
endchoice
endmenu

View File

@ -32,6 +32,10 @@
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#elif defined(CONFIG_BLE_MESH_ESP32H2_DEV)
#define LED_R GPIO_NUM_8
#define LED_G GPIO_NUM_8
#define LED_B GPIO_NUM_8
#endif
struct _led_state {