ESP8266_RTOS_SDK
v1.4.0
|
Mesh APIs. More...
Enumerations | |
enum | mesh_status { MESH_DISABLE = 0, MESH_WIFI_CONN, MESH_NET_CONN, MESH_LOCAL_AVAIL, MESH_ONLINE_AVAIL } |
enum | mesh_node_type { MESH_NODE_PARENT = 0, MESH_NODE_CHILD, MESH_NODE_ALL } |
Functions | |
bool | espconn_mesh_local_addr (struct ip_addr *ip) |
Check whether the IP address is mesh local IP address or not. More... | |
bool | espconn_mesh_get_node_info (enum mesh_node_type type, uint8_t **info, uint8_t *count) |
Get the information of mesh node. More... | |
bool | espconn_mesh_encrypt_init (AUTH_MODE mode, uint8_t *passwd, uint8_t passwd_len) |
Set WiFi cryption algrithm and password for mesh node. More... | |
bool | espconn_mesh_set_ssid_prefix (uint8_t *prefix, uint8_t prefix_len) |
Set prefix of SSID for mesh node. More... | |
bool | espconn_mesh_set_max_hops (uint8_t max_hops) |
Set max hop for mesh network. More... | |
bool | espconn_mesh_group_id_init (uint8_t *grp_id, uint16_t gid_len) |
Set group ID of mesh node. More... | |
bool | espconn_mesh_set_dev_type (uint8_t dev_type) |
Set the curent device type. More... | |
sint8 | espconn_mesh_connect (struct espconn *usr_esp) |
Try to establish mesh connection to server. More... | |
sint8 | espconn_mesh_disconnect (struct espconn *usr_esp) |
Disconnect a mesh connection. More... | |
sint8 | espconn_mesh_get_status () |
Get current mesh status. More... | |
sint8 | espconn_mesh_sent (struct espconn *usr_esp, uint8 *pdata, uint16 len) |
Send data through mesh network. More... | |
uint8 | espconn_mesh_get_max_hops () |
Get max hop of mesh network. More... | |
void | espconn_mesh_enable (espconn_mesh_callback enable_cb, enum mesh_type type) |
To enable mesh network. More... | |
void | espconn_mesh_disable (espconn_mesh_callback disable_cb) |
To disable mesh network. More... | |
void | espconn_mesh_init () |
To print version of mesh. More... | |
Mesh APIs.
enum mesh_node_type |
enum mesh_status |
sint8 espconn_mesh_connect | ( | struct espconn * | usr_esp | ) |
Try to establish mesh connection to server.
struct | espconn *usr_esp : the network connection structure, the usr_esp to listen to the connection |
void espconn_mesh_disable | ( | espconn_mesh_callback | disable_cb | ) |
To disable mesh network.
espconn_mesh_callback | disable_cb : callback function of mesh-disable |
enum | mesh_type type : type of mesh, local or online. |
sint8 espconn_mesh_disconnect | ( | struct espconn * | usr_esp | ) |
Disconnect a mesh connection.
struct | espconn *usr_esp : the network connection structure |
void espconn_mesh_enable | ( | espconn_mesh_callback | enable_cb, |
enum mesh_type | type | ||
) |
To enable mesh network.
espconn_mesh_callback | enable_cb : callback function of mesh-enable |
enum | mesh_type type : type of mesh, local or online. |
bool espconn_mesh_encrypt_init | ( | AUTH_MODE | mode, |
uint8_t * | passwd, | ||
uint8_t | passwd_len | ||
) |
Set WiFi cryption algrithm and password for mesh node.
AUTH_MODE | mode : cryption algrithm (WPA/WAP2/WPA_WPA2). |
uint8_t | *passwd : password of WiFi. |
uint8_t | passwd_len : length of password (8 <= passwd_len <= 64). |
uint8 espconn_mesh_get_max_hops | ( | ) |
Get max hop of mesh network.
null. |
bool espconn_mesh_get_node_info | ( | enum mesh_node_type | type, |
uint8_t ** | info, | ||
uint8_t * | count | ||
) |
Get the information of mesh node.
enum | mesh_node_type typ : mesh node type. |
uint8_t | **info : the information will be saved in *info. |
uint8_t | *count : the node count in *info. |
sint8 espconn_mesh_get_status | ( | ) |
Get current mesh status.
null |
bool espconn_mesh_group_id_init | ( | uint8_t * | grp_id, |
uint16_t | gid_len | ||
) |
Set group ID of mesh node.
uint8_t | *grp_id : group ID. |
uint16_t | gid_len: length of group ID, now gid_len = 6. |
void espconn_mesh_init | ( | ) |
To print version of mesh.
null |
bool espconn_mesh_local_addr | ( | struct ip_addr * | ip | ) |
Check whether the IP address is mesh local IP address or not.
struct | ip_addr *ip : IP address |
sint8 espconn_mesh_sent | ( | struct espconn * | usr_esp, |
uint8 * | pdata, | ||
uint16 | len | ||
) |
Send data through mesh network.
struct | espconn *usr_esp : the network connection structure |
uint8 | *pdata : pointer of data |
uint16 | len : data length |
bool espconn_mesh_set_dev_type | ( | uint8_t | dev_type | ) |
Set the curent device type.
uint8_t | dev_type : device type of mesh node |
bool espconn_mesh_set_max_hops | ( | uint8_t | max_hops | ) |
Set max hop for mesh network.
uint8_t | max_hops : max hop of mesh network (1 <= max_hops < 10, 4 is recommended). |
bool espconn_mesh_set_ssid_prefix | ( | uint8_t * | prefix, |
uint8_t | prefix_len | ||
) |
Set prefix of SSID for mesh node.
uint8_t | *prefix : prefix of SSID. |
uint8_t | prefix_len : length of prefix (0 < passwd_len <= 22). |