Chapter 2. API Reference
• ESP_FAIL
Parameters
• [in] seconds: the expired time
int esp_mesh_get_ap_assoc_expire(void)
Get mesh softAP associate expired time.
Return seconds
int esp_mesh_get_total_node_num(void)
Get total number of devices in current network (including the root)
Attention The returned value might be incorrect when the network is changing.
Return total number of devices (including the root)
int esp_mesh_get_routing_table_size(void)
Get the number of devices in this device’s sub-network (including self)
Return the number of devices over this device’s sub-network (including self)
esp_err_t esp_mesh_get_routing_table(mesh_addr_t *mac, int len, int *size)
Get routing table of this device’s sub-network (including itself)
Return
• ESP_OK
• ESP_ERR_MESH_ARGUMENT
Parameters
• [out] mac: pointer to routing table
• [in] len: routing table size(in bytes)
• [out] size: pointer to the number of devices in routing table (including itself)
esp_err_t esp_mesh_post_toDS_state(bool reachable)
Post the toDS state to the mesh stack.
Attention This API is only for the root.
Return
• ESP_OK
• ESP_FAIL
Parameters
• [in] reachable: this state represents whether the root is able to access external IP network
esp_err_t esp_mesh_get_tx_pending(mesh_tx_pending_t *pending)
Return the number of packets pending in the queue waiting to be sent by the mesh stack.
Return
• ESP_OK
• ESP_FAIL
Parameters
• [out] pending: pointer to the TX pending
esp_err_t esp_mesh_get_rx_pending(mesh_rx_pending_t *pending)
Return the number of packets available in the queue waiting to be received by applications.
Return
• ESP_OK
• ESP_FAIL
Parameters
• [out] pending: pointer to the RX pending
int esp_mesh_available_txupQ_num(const mesh_addr_t *addr, uint32_t *xseqno_in)
Return the number of packets could be accepted from the specified address.
Return the number of upQ for a certain address
Parameters
• [in] addr: self address or an associate children address
• [out] xseqno_in: sequence number of the last received packet from the specified address
Espressif Systems 148
Submit Document Feedback
Release v4.4