esp-ble-mesh.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. ESP-BLE-MESH
  2. ============
  3. .. note::
  4. The current ESP-BLE-MESH v1.1 related code is a preview version, so the Mesh Protocol v1.1 related Structures, MACROs, and APIs involved in the code may be changed.
  5. With various features of ESP-BLE-MESH, users can create a managed flooding mesh network for several scenarios, such as lighting, sensor and etc.
  6. For an ESP32 to join and work on a ESP-BLE-MESH network, it must be provisioned firstly. By provisioning, the ESP32, as an unprovisioned device, will join the ESP-BLE-MESH network and become a ESP-BLE-MESH node, communicating with other nodes within or beyond the radio range.
  7. Apart from ESP-BLE-MESH nodes, inside ESP-BLE-MESH network, there is also ESP32 that works as ESP-BLE-MESH provisioner, which could provision unprovisioned devices into ESP-BLE-MESH nodes and configure the nodes with various features.
  8. For information how to start using ESP32 and ESP-BLE-MESH, please see the Section :ref:`getting-started-with-ble-mesh`. If you are interested in information on ESP-BLE-MESH architecture, including some details of software implementation, please see Section :doc:`../../api-guides/esp-ble-mesh/ble-mesh-architecture`.
  9. Application Examples and Demos
  10. ------------------------------
  11. Please refer to Sections :ref:`esp-ble-mesh-examples` and :ref:`esp-ble-mesh-demo-videos`.
  12. API Reference
  13. -------------
  14. ESP-BLE-MESH APIs are divided into the following parts:
  15. * `ESP-BLE-MESH Definitions`_
  16. * `ESP-BLE-MESH Core API Reference`_
  17. * `ESP-BLE-MESH Models API Reference`_
  18. * `ESP-BLE-MESH (v1.1) Core API Reference`_
  19. ESP-BLE-MESH Definitions
  20. ------------------------
  21. This section contains only one header file, which lists the following items of ESP-BLE-MESH.
  22. * ID of all the models and related message opcodes
  23. * Structs of model, element and Composition Data
  24. * Structs of used by ESP-BLE-MESH Node/Provisioner for provisioning
  25. * Structs used to transmit/receive messages
  26. * Event types and related event parameters
  27. .. include-build-file:: inc/esp_ble_mesh_defs.inc
  28. ESP-BLE-MESH Core API Reference
  29. -------------------------------
  30. This section contains ESP-BLE-MESH Core related APIs, which can be used to initialize ESP-BLE-MESH stack, provision, send/publish messages, etc.
  31. This API reference covers six components:
  32. * `ESP-BLE-MESH Stack Initialization`_
  33. * `Reading of Local Data Information`_
  34. * `Low Power Operation (Updating)`_
  35. * `Send/Publish Messages, add Local AppKey, etc.`_
  36. * `ESP-BLE-MESH Node/Provisioner Provisioning`_
  37. * `ESP-BLE-MESH GATT Proxy Server`_
  38. ESP-BLE-MESH Stack Initialization
  39. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  40. .. include-build-file:: inc/esp_ble_mesh_common_api.inc
  41. Reading of Local Data Information
  42. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  43. .. include-build-file:: inc/esp_ble_mesh_local_data_operation_api.inc
  44. Low Power Operation (Updating)
  45. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  46. .. include-build-file:: inc/esp_ble_mesh_low_power_api.inc
  47. Send/Publish Messages, Add Local AppKey, Etc.
  48. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  49. .. include-build-file:: inc/esp_ble_mesh_networking_api.inc
  50. ESP-BLE-MESH Node/Provisioner Provisioning
  51. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  52. .. include-build-file:: inc/esp_ble_mesh_provisioning_api.inc
  53. ESP-BLE-MESH GATT Proxy Server
  54. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  55. .. include-build-file:: inc/esp_ble_mesh_proxy_api.inc
  56. ESP-BLE-MESH Models API Reference
  57. ---------------------------------
  58. This section contains ESP-BLE-MESH Model related APIs, event types, event parameters, etc.
  59. There are six categories of models:
  60. * `Configuration Client/Server Models`_
  61. * `Health Client/Server Models`_
  62. * `Generic Client/Server Models`_
  63. * `Sensor Client/Server Models`_
  64. * `Time and Scenes Client/Server Models`_
  65. * `Lighting Client/Server Models`_
  66. .. note::
  67. Definitions related to Server Models are being updated, and will be released soon.
  68. Configuration Client/Server Models
  69. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  70. .. include-build-file:: inc/esp_ble_mesh_config_model_api.inc
  71. Health Client/Server Models
  72. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  73. .. include-build-file:: inc/esp_ble_mesh_health_model_api.inc
  74. Generic Client/Server Models
  75. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  76. .. include-build-file:: inc/esp_ble_mesh_generic_model_api.inc
  77. Sensor Client/Server Models
  78. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  79. .. include-build-file:: inc/esp_ble_mesh_sensor_model_api.inc
  80. Time and Scenes Client/Server Models
  81. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  82. .. include-build-file:: inc/esp_ble_mesh_time_scene_model_api.inc
  83. Lighting Client/Server Models
  84. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  85. .. include-build-file:: inc/esp_ble_mesh_lighting_model_api.inc
  86. ESP-BLE-MESH (v1.1) Core API Reference
  87. --------------------------------------
  88. .. note::
  89. This section is a preview version, so the related structures, macros, and APIs may be changed.
  90. This section contains ESP-BLE-MESH v1.1 Core related APIs, event types, event parameters, etc.
  91. This API reference covers 10 components:
  92. * `Remote Provisioning`_
  93. * `Directed Forwarding`_
  94. * `Subnet Bridge Configuration`_
  95. * `Mesh Private Beacon`_
  96. * `On-Demand Private Proxy`_
  97. * `SAR Configuration`_
  98. * `Solicitation PDU RPL Configuration`_
  99. * `Opcodes Aggregator`_
  100. * `Large Composition Data`_
  101. * `Composition and Metadata`_
  102. Remote Provisioning
  103. ^^^^^^^^^^^^^^^^^^^
  104. .. include-build-file:: inc/esp_ble_mesh_rpr_model_api.inc
  105. Directed Forwarding
  106. ^^^^^^^^^^^^^^^^^^^
  107. .. include-build-file:: inc/esp_ble_mesh_df_model_api.inc
  108. Subnet Bridge Configuration
  109. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  110. .. include-build-file:: inc/esp_ble_mesh_brc_model_api.inc
  111. Mesh Private Beacon
  112. ^^^^^^^^^^^^^^^^^^^
  113. .. include-build-file:: inc/esp_ble_mesh_prb_model_api.inc
  114. On-Demand Private Proxy
  115. ^^^^^^^^^^^^^^^^^^^^^^^
  116. .. include-build-file:: inc/esp_ble_mesh_odp_model_api.inc
  117. SAR Configuration
  118. ^^^^^^^^^^^^^^^^^
  119. .. include-build-file:: inc/esp_ble_mesh_sar_model_api.inc
  120. Solicitation PDU RPL Configuration
  121. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  122. .. include-build-file:: inc/esp_ble_mesh_srpl_model_api.inc
  123. Opcodes Aggregator
  124. ^^^^^^^^^^^^^^^^^^
  125. .. include-build-file:: inc/esp_ble_mesh_agg_model_api.inc
  126. Large Composition Data
  127. ^^^^^^^^^^^^^^^^^^^^^^
  128. .. include-build-file:: inc/esp_ble_mesh_lcd_model_api.inc
  129. Composition and Metadata
  130. ^^^^^^^^^^^^^^^^^^^^^^^^
  131. .. include-build-file:: inc/esp_ble_mesh_cm_data_api.inc