Espressif ESP32-S2 Programming Manual page 156

Table of Contents

Advertisement

Chapter 2. API Reference
• ESP_ERR_MESH_ARGUMENT
Parameters
• [out] id: pointer to mesh network ID
esp_err_t esp_mesh_set_type(mesh_type_t
Designate device type over the mesh network.
• MESH_IDLE: designates a device as a self-organized node for a mesh network
• MESH_ROOT: designates the root node for a mesh network
• MESH_LEAF: designates a device as a standalone Wi-Fi station that connects to a parent
• MESH_STA: designates a device as a standalone Wi-Fi station that connects to a router
Return
• ESP_OK
• ESP_ERR_MESH_NOT_ALLOWED
Parameters
• [in] type: device type
mesh_type_t
esp_mesh_get_type(void)
Get device type over mesh network.
Attention This
MESH_EVENT_PARENT_CONNECTED.
Return mesh type
esp_err_t
esp_mesh_set_max_layer(int max_layer)
Set network max layer value.
• for tree topology, the max is 25.
• for chain topology, the max is 1000.
• Network max layer limits the max hop count.
Attention This API shall be called before mesh is started.
Return
• ESP_OK
• ESP_ERR_MESH_ARGUMENT
• ESP_ERR_MESH_NOT_ALLOWED
Parameters
• [in] max_layer: max layer value
int esp_mesh_get_max_layer(void)
Get max layer value.
Return max layer value
esp_err_t
esp_mesh_set_ap_password(const uint8_t *pwd, int len)
Set mesh softAP password.
Attention This API shall be called before mesh is started.
Return
• ESP_OK
• ESP_ERR_MESH_ARGUMENT
• ESP_ERR_MESH_NOT_ALLOWED
Parameters
• [in] pwd: pointer to the password
• [in] len: password length
esp_err_t esp_mesh_set_ap_authmode(wifi_auth_mode_t
Set mesh softAP authentication mode.
Attention This API shall be called before mesh is started.
Return
• ESP_OK
• ESP_ERR_MESH_ARGUMENT
• ESP_ERR_MESH_NOT_ALLOWED
Espressif Systems
type)
API
shall
be
Submit Document Feedback
called
after
having
authmode)
145
received
the
event
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF