diff --git a/docs/en/api-guides/esp-ble-mesh/ble-mesh-index.rst b/docs/en/api-guides/esp-ble-mesh/ble-mesh-index.rst index b74cb24d56..deec3cc7d2 100644 --- a/docs/en/api-guides/esp-ble-mesh/ble-mesh-index.rst +++ b/docs/en/api-guides/esp-ble-mesh/ble-mesh-index.rst @@ -219,7 +219,7 @@ ESP-BLE-MESH Examples * :example:`ESP-BLE-MESH and Wi-Fi Coexistence ` - an example that demonstrates the Wi-Fi and Bluetooth (BLE/BR/EDR) coexistence feature of ESP32. Simply put, users can use the Wi-Fi while operating Bluetooth, see :example:`example code `. -* ESP-BLE-MESH Node Console - an example that implements BLE Mesh node basic features. Within this example a node can be scanned and provisioned by Provisioner and reply to get/set message from Provisioner, see :example:`example node code ` and :example:`example Provisioner code `. +* ESP-BLE-MESH Node Console - an example that implements BLE Mesh node basic features. Within this example a node can be scanned and provisioned by Provisioner and reply to get/set message from Provisioner, see :example:`example node code `. .. _esp-ble-mesh-demo-videos: diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/CMakeLists.txt similarity index 87% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/CMakeLists.txt rename to examples/bluetooth/esp_ble_mesh/ble_mesh_console/CMakeLists.txt index 74361e558c..ec534dfbf5 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/CMakeLists.txt @@ -3,4 +3,4 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(ble_mesh_console_node) +project(ble_mesh_console) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/Makefile b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/Makefile similarity index 84% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/Makefile rename to examples/bluetooth/esp_ble_mesh/ble_mesh_console/Makefile index 209aa2e0cc..718b7922d2 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/Makefile +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/Makefile @@ -3,7 +3,7 @@ # project subdirectory. # -PROJECT_NAME := ble_mesh_console_node +PROJECT_NAME := ble_mesh_console COMPONENT_ADD_INCLUDEDIRS := components/include diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/README.md b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/README.md similarity index 87% rename from examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/README.md rename to examples/bluetooth/esp_ble_mesh/ble_mesh_console/README.md index 0bb260c816..86a244b8f7 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/README.md +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | +| ----------------- | ----- | + # ble mesh node console demo ## Introduction This demo implements ble mesh node basic features.Based on this demo, node can be scaned and proved by provisioner, reply get/set message to provisioner. diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_commands_README.md b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_commands_README.md new file mode 100644 index 0000000000..b9277422ad --- /dev/null +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_commands_README.md @@ -0,0 +1,166 @@ +# The Document of ESP32 BLE_MESH Commands + +## Overall Command + + +* `bmreg`: Provisioner/node register callback + * Example: `bmreg` + * Result: `Bm:Reg,OK` + +* `bminit`: Provisioner/node initialize + * `-m`: `mesh modle` + * Example: `bminit -m 0x0001` + * Result: `Bm:Init,OK` + +* `bmpbind`: Provisioner binds Appkey with local model + * `-a`: `:appkey index` + * `-e`: `:element address` + * `-n`: `:network index` + * `-m`: `:model id` + * `-c`: `:company id` + * Example: `bmpbind -a 0 -e 0x01 -m 0x1001 -n 0x00` + * Result: `provisioning:AppKeyBind,OK` + +* `bmpdev`: Provisioner add/delete unprovisioned device + * `-z`: `action type ` + * `-d`: `device address` + * `-u`: `device uuid` + * `-a`: `address type` + * `-f`: `address flag` + * `-b`: `used bearer` + * `-o`: `oob information` + * Example: `bmpdev -z add -d bt_mac -b -1 -a 0` + * Result: `provisioner:DevAdd/Del,OK` + +* `bmoob`: Provisioner/node config OOB parameters + * `-s`: `Static OOB value` + * `-l`: `Static OOB value length` + * `-x`: `Maximum size of Output OOB` + * `-o`: `Supported Output OOB Actions` + * `-y`: `Maximum size of Input OOB` + * `-i`: `Supported Input OOB Actions` + * `-p`: `start address assigned by provisioner` + * Example: `bmoob -o -0 -x 0` + * Result: `OOB:Load,OK` + +* `bmpbearer`: Enable/disable provisioner different bearer + * `-b`: `bearer supported` + * `-e`: `enable or disable bearer` + * Example: `bmpbearer -b 1 -e 1` + * Result: `provisioner:EnBearer,OK` + +* `bmnbearer`: Enable/disable node different bearer + * `-b`: `bearer supported` + * `-e`: `enable or disable bearer` + * Example: `bmnbearer -b 1 -e 1` + * Result: `Node:EnBearer,OK` + +* `bmpkey`: Add/Delete NetKey and AppKey of Provisioner + * `-z`: `:add app key or network key` + * `-n`: `:network key index` + * `-k`: `:appkey or network` + * `-a`: `:appkey index` + * Example: `bmpkey -z netkey -n 1 -k ` + * Result: `provisioner:NetKeyAdd,OK` + +* `bmccm`: BLE Mesh configuration client model operations + * `-z`: `:action type`:add or del client model + * `-x`: `:set state` + * `-o`: `:message opcode` + * `-u`: `
:unicast address` + * `-n`: `:net work index` + * `-i`: `:appkey index` + * `-r`: `:relay statue` + * `-t`: `:relay transmit` + * `-c`: `:company id` + * `-v`: `:value` + * `-a`: `
:address` + * `-m`: `:model id` + * Example: `bmccm -z reg` + * Result: `ConfigClient:OK` + +* `bmgocm`: BLE Mesh onoff client model operations + * `-z`: `:action type`: on or off client model + * `-o`: `:message opcode` + * `-u`: `
:unicast address` + * `-n`: `:network key index` + * `-a`: `:appkey index` + * `-r`: `:role` + * `-t`: `