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 #162 background imageLoading...
Page #162 background image
Chapter 2. API Reference
esp_err_t esp_mesh_fix_root(bool enable)
Enable network Fixed Root Setting.
Enabling fixed root disables automatic election of the root node via voting.
All devices in the network shall use the same Fixed Root Setting (enabled or disabled).
If Fixed Root is enabled, users should make sure a root node is designated for the network.
Return
ESP_OK
Parameters
[in] enable: enable or not
bool esp_mesh_is_root_fixed(void)
Check whether network Fixed Root Setting is enabled.
Enable/disable network Fixed Root Setting by API esp_mesh_fix_root().
Network Fixed Root Setting also changes with the flagvalue in parent networking IE.
Return true/false
esp_err_t esp_mesh_set_parent(const wifi_config_t *parent, const mesh_addr_t
*parent_mesh_id, mesh_type_t my_type, int my_layer)
Set a specified parent for the device.
Attention This API can be called at any time after mesh is configured.
Return
ESP_OK
ESP_ERR_ARGUMENT
ESP_ERR_MESH_NOT_CONFIG
Parameters
[in] parent: parent configuration, the SSID and the channel of the parent are mandatory.
If the BSSID is set, make sure that the SSID and BSSID represent the same parent, otherwise
the device will never find this specied parent.
[in] parent_mesh_id: parent mesh ID,
If this value is not set, the original mesh ID is used.
[in] my_type: mesh type
MESH_STA is not supported.
If the parent set for the device is the same as the router in the network configuration, then
my_type shall set MESH_ROOT and my_layer shall set MESH_ROOT_LAYER.
[in] my_layer: mesh layer
my_layer of the device may change after joining the network.
If my_type is set MESH_NODE, my_layer shall be greater than MESH_ROOT_LAYER.
If my_type is set MESH_LEAF, the device becomes a standalone Wi-Fi station and no longer
has the ability to extend the network.
esp_err_t esp_mesh_scan_get_ap_ie_len(int *len)
Get mesh networking IE length of one AP.
Return
ESP_OK
ESP_ERR_WIFI_NOT_INIT
ESP_ERR_WIFI_ARG
ESP_ERR_WIFI_FAIL
Parameters
[out] len: mesh networking IE length
esp_err_t esp_mesh_scan_get_ap_record(wifi_ap_record_t *ap_record, void *buer)
Get AP record.
Attention Different from esp_wifi_scan_get_ap_records(), this API only gets one of APs scanned each time.
See manual_networkingexample.
Return
ESP_OK
ESP_ERR_WIFI_NOT_INIT
Espressif Systems 151
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