EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #156 background imageLoading...
Page #156 background image
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 type)
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 API shall be called after having received the event
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 authmode)
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 145
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish