BK-WIFI-MESH APIs

[zh_CN]

Important

The WiFi API v2.0 is the lastest stable WiFi APIs, it’s used to deprecate the WiFi API v1.0. All new applications should use WiFi API v2.0.

BK Wi-Fi Mesh Interface

Programing Principle

Important

Here is some general principle for API users:
  • Always init the reserved fields of config stuct to 0

  • Use BK_ERR_CHECK to check the return value of the API

  • If you are not sure how to use PIs, study the example code first

  • If you are not sure how to initialize some fields of config struct, use the default configuration macro to use the config first and then set application specific fields, e.g. use WIFI_DEFAULT_BK_MESH_CONFIG() to init bk_wifi_mesh_cfg_t first.

  • Don’t do too much work in event callback, relay the event to your own application task.

API Reference

Header File

Functions

bk_err_t bk_wifi_mesh_config(const bk_wifi_mesh_cfg_t *bk_mesh_config)

Set bk wifi mesh configuration.

Attention

Call bk_wifi_bk_mesh_config() first before call bk_wifi_bk_mesh_start().

Parameters

bk_mesh_config – store the configuration of BK wifi mesh.

Returns

  • BK_OK: succeed

  • others: other errors

bk_err_t bk_wifi_mesh_start(void)

Start BK wifi mesh.

This API notifies the WiFi driver to start a bk wifi mesh node.

Attention

Call bk_wifi_bk_mesh_config() first before call bk_wifi_bk_mesh_start().

Returns

  • BK_OK: succeed

  • others: other errors

bk_err_t bk_wifi_mesh_stop(void)

Stop BK wifi mesh.

This API notifies the WiFi driver to stop a bk wifi mesh node.

Attention

Call bk_wifi_bk_mesh_config() and bk_wifi_bk_mesh_start() if you want to restart a bk wifi mesh node after stop.

Returns

  • BK_OK: succeed

  • others: other errors

bk_err_t bk_wifi_mesh_status_info(bk_wifi_mesh_status_t *link_status)

Get the link info of the BK WIFI MESH node.

The link status information of the node includes the current state, the current level, the number of the downlink mesh nodes and non-mesh nodes, the MAC address of the parent node.

Attention

The MAC address of the parent node is valid when the the current level is not equel to 0.

Parameters

link_status – link status of the mesh node.

Returns

  • BK_OK: succeed

  • BK_ERR_NULL_PARAM: link_status is null pointer.

  • others: other errors

void bk_wifi_mesh_set_device_type(uint8_t device_type)

Set device type to BK mesh node.

The device type is defined by user. For example, type 1 indicates that the device is a light.

Parameters

device_type – store the type of device.

uint8_t bk_wifi_mesh_get_device_type(void)

Get the device type of the BK WIFI MESH node.

The device type is defined by user.

Returns

device type of the BK WIFI MESH node.

bk_err_t bk_wifi_mesh_set_vendor_cb_reg(void *set_vendor_cb)

set_vendor callback registration function. For example, set the color of the led, obtain the version, and so on.

callback function format typedef bk_err_t (* bk_mesh_net_set_vendor_cb_t)(uint8_t* vendor_ptr);

Parameters

void* – set_vendor_cb

bk_err_t bk_wifi_mesh_get_vendor_cb_reg(void *get_vendor_cb)

get vendor callback registration function For example, get the color of the lamp, obtain the version, and so on.

callback function format typedef uint8_t* (* bk_mesh_net_get_vendor_cb_t)(uint16_t* len, uint8_t* vendor_ptr); param in:

  • vendor_ptr: get the type of vendor param out

  • len: return the length of vendor

  • vendor: vendor returned according to the query type

Parameters

void* – get_vendor_cb

bk_err_t bk_wifi_mesh_comm_mac_get(uint8_t *my_mac, uint8_t *root_mac)

get communication mac Include my mac address and root’s mac address

Parameters
  • my_mac – is my mac address

  • root_mac – is the mac address of the root node

Returns

  • BK_OK: succeed

  • BK_FAIL: the mac address of the root node is invalid

bk_err_t bk_wifi_mesh_conn_rssi_thres_set(int rssi_thres)

set the rssi threshold of connection.

Attention

Call bk_wifi_mesh_conn_rssi_thres_set() first before call bk_wifi_bk_mesh_start() or bk_wifi_mesh_net_cfg().

Parameters

rssi_thres – the rssi threshold of connection

Returns

  • BK_OK: set succeed

  • BK_FAIL: set fail

bk_err_t bk_wifi_mesh_ap_specific_ssid_enable(bool enable)

Enable to use specific ssid for each mesh ap.

Attention

Call bk_wifi_mesh_ap_specific_ssid_enable() first before call bk_wifi_bk_mesh_start() or bk_wifi_mesh_net_cfg().

Parameters

enable – true if enable specific ssid and false if disable it.

Returns

  • BK_OK: set succeed

  • BK_FAIL: set fail

bk_err_t bk_wifi_mesh_data_send(uint8_t *rcv_mac_addr, uint8_t *data_buf, uint16_t data_len, uint16_t data_type)

send internal tcp data Include my mac address and root’s mac address

Parameters
  • rcv_mac_addr – send dest mac address

  • data_buf – send data buffer start address

  • data_len – send data length

  • data_type – send data type ,user only use 0;

Returns

  • BK_OK: sent succeed

  • BK_FAIL: sent fail

bk_err_t bk_wifi_mesh_register_rcv_cb(bk_mesh_rcv_handler data_rcv_cb)

register receive internal data cb function

Parameters

data_rcv_cb – cb function

Returns

  • BK_OK: register succeed

  • BK_FAIL: register fail

bk_err_t bk_wifi_mesh_ota_data_write(char *data_ptr, uint32_t len)

write ota bin to root node

Parameters
  • data_ptr – data address

  • len – data length,len mast be 1024. if last data frame not enought,use 0x0 or 0xf refill.

Returns

  • BK_OK: data write succeed

  • BK_FAIL: data write fail

bk_err_t bk_wifi_mesh_ota_finish(void)

notify ota bin download finish,and check crc is right

Parameters

void

Returns

  • BK_OK: bin crc succeed

  • BK_FAIL: bin crc fail

bk_err_t bk_wifi_mesh_set_net_mode(uint8_t net_mode)

Set the net mode.

Attention

Call thsi API to set ROOT mode and before starting the distribution network. root_mode: 1- Wide Area Network 2- Local Area Network 3- Local Area Network,but the root node is connected to the AP

Returns

  • BK_OK: succeed

  • BK_FAIL: other errors

bk_err_t bk_wifi_mesh_set_api_mode(void *event_cb)

Set the net mode.

Attention

Call thsi API to set distribution network mode and callback function before starting the distribution network.

Parameters

event_cb – API mode callback,reference format: int event_cb(void *arg, event_module_t event_module, int event_id, void *event_data); event_module: 3-indicate mesh event event_id: 0- BK_MESH_EVENT_GET_IDLE_NODE 1- BK_MESH_EVENT_GET_TOPO 2- BK_MESH_EVENT_RM_NODE 3- BK_MESH_EVENT_GET_VENDOR event_data: returned data

Returns

  • BK_OK: succeed

  • others: other errors

bk_err_t bk_wifi_mesh_get_idle_node(void)

Get the idle node list of BK WIFI MESH node.

Usage example:

//Define your event cb handler
int mesh_event_cb(void *arg, event_module_t event_module, int event_id, void *event_data)
{
    switch (event_id)
    {
        case BK_MESH_EVENT_GET_IDLE_NODE:
            os_printf("BK_MESH_EVENT_GET_IDLE_NODE\r\n");
            ///parse idle node list
            break;

        case BK_MESH_EVENT_GET_TOPO:
            os_printf("BK_MESH_EVENT_GET_TOPO\r\n");
            ///parse topo result
            break;

        case BK_MESH_EVENT_RM_NODE:
            os_printf("BK_MESH_EVENT_RM_NODE\r\n");
            ///parse rm result
            break;

        case BK_MESH_EVENT_GET_VENDOR:
            os_printf("BK_MESH_EVENT_GET_VENDOR\r\n");
            ///parse vendor result
            break;

        default:
            os_printf("event <%d %d>\n", event_module, event_id);
            break;
    }
    return BK_OK;
}

//Start get idle list
bk_wifi_mesh_set_api_mode(void* mesh_event_cb);
bk_wifi_mesh_get_idle_node();
Attention

This API notifies the MESH to get the idle node list, the event BK_MESH_EVENT_GET_IDLE_NODE will be raised if the scan is completed. General steps to use this API:

  • call bk_wifi_mesh_set_api_mode(void* event_cb)to register get idle list event callback.

  • call this API to trigger get idle list.

Returns

idle node list.

  • uint16_t length: Indicate the length of all fields after Length;

  • uint16_t node_num: Indicates the number of idle nodes returned;

  • uint8_t *node_list: Indicating the mac_addr list of idle nodes;

bk_err_t bk_wifi_mesh_net_cfg(const bk_wifi_mesh_net_cfg_t *config)

Set bk wifi mesh networking configuration.

Parameters

config – refer to the parameptr description of bk_wifi_mesh_net_cfg_t

Returns

  • BK_OK: succeed

  • others: other errors

bk_err_t bk_wifi_mesh_get_topo(void)

Get the topology of mesh network.

Usage example:

//Define your event cb handler
int mesh_event_cb(void *arg, event_module_t event_module, int event_id, void *event_data)
{
    switch (event_id)
    {
        case BK_MESH_EVENT_GET_IDLE_NODE:
            os_printf("BK_MESH_EVENT_GET_IDLE_NODE\r\n");
            ///parse idle node list
            break;

        case BK_MESH_EVENT_GET_TOPO:
            os_printf("BK_MESH_EVENT_GET_TOPO\r\n");
            ///parse topo result
            break;

        case BK_MESH_EVENT_RM_NODE:
            os_printf("BK_MESH_EVENT_RM_NODE\r\n");
            ///parse rm result
            break;

        case BK_MESH_EVENT_GET_VENDOR:
            os_printf("BK_MESH_EVENT_GET_VENDOR\r\n");
            ///parse vendor result
            break;

        default:
            os_printf("event <%d %d>\n", event_module, event_id);
            break;
    }
    return BK_OK;
}

//Start get idle list
bk_wifi_mesh_set_api_mode(void* mesh_event_cb);
bk_wifi_mesh_get_topo();
Attention

Call bk_wifi_mesh_get_topo at the root node.

Attention

This API notifies the MESH to get the topology result, the event BK_MESH_EVENT_GET_TOPO will be raised if the get topology is completed. General steps to use this API:

  • call bk_wifi_mesh_set_api_mode(void* event_cb)to register get idle list event callback.

  • call this API to trigger get topology.

Returns

mesh network topology.

  • uint16_t length: Indicate the length of all fields after Length;

  • uint8_t max_conn_Num: maximum number of mesh connections and non mesh connections;

  • uint8_t max_non_mesh_num: the maximum number of non mesh node connections;

  • uint8_t max_level: the maximum number of mesh network layers configured in the mesh network

  • uint16_t node_num: The number of nodes in the current Mesh network reported;

  • uint8_t *node_info_list: Node information of mesh network;

    • uint8_t level: Indicate the hierarchy of the node;

    • uint8_t node_mac_addr[6]: represents the MAC address of the node;

    • uint8_t parent_mac_addr[6]: represents the parent node information of the node,0 indicates no parent node information;

    • uint8_t mesh_conn_left: represents the number of remaining mesh node connections for the node;

    • uint8_t non_mesh_conn_left: represents the remaining number of non mesh node connections for the node;

bk_err_t bk_wifi_mesh_add_node(const bk_wifi_mesh_add_node_t *add_node)

Set add node configuration.

Attention

Call bk_wifi_mesh_add_node at the root node.

Parameters

add_node – refer to the parameptr description of bk_wifi_mesh_add_node_t

Returns

  • BK_OK: succeed

  • others: other errors

bk_err_t bk_wifi_mesh_remove_node(uint16_t node_num, uint8_t *node_mac_list)

Set remove node configuration.

Usage example:

//Define your event cb handler
int mesh_event_cb(void *arg, event_module_t event_module, int event_id, void *event_data)
{
    switch (event_id)
    {
        case BK_MESH_EVENT_GET_IDLE_NODE:
            os_printf("BK_MESH_EVENT_GET_IDLE_NODE\r\n");
            ///parse idle node list
            break;

        case BK_MESH_EVENT_GET_TOPO:
            os_printf("BK_MESH_EVENT_GET_TOPO\r\n");
            ///parse topo result
            break;

        case BK_MESH_EVENT_RM_NODE:
            os_printf("BK_MESH_EVENT_RM_NODE\r\n");
            ///parse rm result
            break;

        case BK_MESH_EVENT_GET_VENDOR:
            os_printf("BK_MESH_EVENT_GET_VENDOR\r\n");
            ///parse vendor result
            break;

        default:
            os_printf("event <%d %d>\n", event_module, event_id);
            break;
    }
    return BK_OK;
}

//Start get idle list
bk_wifi_mesh_set_api_mode(void* mesh_event_cb);
bk_wifi_mesh_remove_node(node_num, node_mac_list);
Attention

Call bk_wifi_mesh_remove_node at the root node.

Attention

This API notifies the MESH to get the remove result, the event BK_MESH_EVENT_RM_NODE will be raised if the remove node is completed. General steps to use this API:

  • call bk_wifi_mesh_set_api_mode(void* event_cb)to register get idle list event callback.

  • call this API to trigger get topology.

Parameters
  • node_num – Indicate the number of remove

  • node_mac_list – The MAC address list corresponding to the remove node.

Returns

remove fail list

  • uint16_t length: Indicate the length of all fields after Length;

  • uint16_t node_num: Indicates the number of nodes that failed to be deleted, 0 indicates that all nodes were successfully deleted;;

  • uint8_t *node_info_list: Only exists when node_num is not 0, carrying the failed node_info_list;

bk_err_t bk_wifi_mesh_change_cfg(const bk_wifi_mesh_change_cfg_t *change_cfg)

Set the change mesh config configuration.

Attention

Call bk_wifi_mesh_change_cfg at the root node.

Parameters

change_cfg – refer to the parameptr description of bk_wifi_mesh_change_cfg_t

Returns

  • BK_OK: succeed

  • others: other errors

bk_err_t bk_wifi_mesh_set_vendor(const bk_wifi_mesh_vendor_t *set_vendor)

Set the vendor information configuration.

Attention

Call bk_wifi_mesh_set_vendor at the root node.

Parameters
  • set_vendor – refer to the parameptr description of bk_wifi_mesh_vendor_t

  • node_num – Indicate the number of mesh nodes for customer information setup

  • node_mac_list – The MAC address list corresponding to the node_num.

  • vendor_len – Indicate the overall length of setting custom information

  • vendort_ptr – User Defined Fields.

Returns

  • BK_OK: succeed

  • others: other errors

bk_err_t bk_wifi_mesh_get_vendor(const bk_wifi_mesh_vendor_t *get_vendor)

Get the vendor information configuration.

Usage example:

//Define your event cb handler
int mesh_event_cb(void *arg, event_module_t event_module, int event_id, void *event_data)
{
    switch (event_id)
    {
        case BK_MESH_EVENT_GET_IDLE_NODE:
            os_printf("BK_MESH_EVENT_GET_IDLE_NODE\r\n");
            ///parse idle node list
            break;

        case BK_MESH_EVENT_GET_TOPO:
            os_printf("BK_MESH_EVENT_GET_TOPO\r\n");
            ///parse topo result
            break;

        case BK_MESH_EVENT_RM_NODE:
            os_printf("BK_MESH_EVENT_RM_NODE\r\n");
            ///parse rm result
            break;

        case BK_MESH_EVENT_GET_VENDOR:
            os_printf("BK_MESH_EVENT_GET_VENDOR\r\n");
            ///parse vendor result
            break;

        default:
            os_printf("event <%d %d>\n", event_module, event_id);
            break;
    }
    return BK_OK;
}

//Start get idle list
bk_wifi_mesh_set_api_mode(void* mesh_event_cb);
bk_wifi_mesh_get_vendor(get_vendor);
Attention

Call bk_wifi_mesh_get_vendor at the root node.

Attention

This API notifies the MESH to get the vendor, the event BK_MESH_EVENT_GET_VENDOR will be raised if the get vendor is completed. General steps to use this API:

  • call bk_wifi_mesh_set_api_mode(void* event_cb)to register get idle list event callback.

  • call this API to trigger get topology.

Parameters

get_vendor – refer to the parameptr description of bk_wifi_mesh_vendor_t

Returns

vendor information

  • uint16_t length: Indicate the length of all fields after Length;

  • uint16_t node_num: Indicate the number of nodes that return customer information data;

  • uint8_t *vendor_info_list: Indicate customer information for each node;

    • uint8_t node_mac_addr[6]: The MAC address of mesh node;

    • uint16_t vendor_length: Customer Information length;

    • uint8_t * vendor_specific: customer information data;

bk_err_t bk_wifi_mesh_ota_start(const bk_wifi_mesh_ota_t *ota_cfg)

Set the OTA ugrade configuration.

Attention

Call bk_wifi_mesh_ota_start at the root node.

Parameters

ota_cfg – refer to the parameptr description of bk_wifi_mesh_ota_t

Returns

  • BK_OK: succeed

  • others: other errors

uint8_t bk_wifi_mesh_get_ota_state(void)

Get the OTA state.

Attention

Call bk_wifi_mesh_get_ota_state at the root node.

Returns

  • ota_status:

    • 0: Indicates idle status, not upgraded in OTA;

    • 1: Indicates that the current OTA upgrade process is underway;

    • 2: Indicates RBL download failure;

    • 3: Indicates that no mobile hotspot has been scanned. Please confirm if the hotspot name is entered correctly;

    • 4: Indicates that the mobile hotspot password is incorrect. Please confirm if the hotspot password entered is correct;

    • 5: Failed to connect to hotspot, please try again;

bk_err_t bk_wifi_mesh_reset_node(const bk_wifi_mesh_reset_node_t *reset_node)

Reset the mesh node. mesh node will clear flash and become idle node.

Attention

Call bk_wifi_mesh_reset_node at the root node.

Returns

  • BK_OK: succeed

  • others: other errors

bk_err_t bk_wifi_mesh_conn_router(const bk_wifi_mesh_conn_router_t *conn_router)

In WAN,the root node first connects to the router to confirm the connection.

Attention

Call bk_wifi_mesh_conn_router at the root node.

Returns

  • BK_OK: succeed

  • others: other errors

Type Definitions

typedef void (*bk_mesh_rcv_handler)(const uint8_t *data_ptr, uint8_t *mac, uint16_t data_len)

API Typedefs

Header File

Structures

struct bk_wifi_mesh_cfg_t

BK MESH configuration.

BK MESH configuration parameters.

Public Members

uint8_t mesh_id

The Mesh ID

char router_ssid[WIFI_SSID_STR_LEN]

The SSID of the router

char router_password[WIFI_PASSWORD_LEN]

The password of the router

char ap_ssid[WIFI_SSID_STR_LEN]

The SSID of an access point

char ap_password[WIFI_PASSWORD_LEN]

The password of the access point

uint8_t max_mesh_conn_num

The maximum number of mesh stations allowed to connect in.

uint8_t max_non_mesh_conn_num

The maximum number of non-mesh stations allowed to connect in.

uint8_t max_level

The maximum level allowed

bool is_designated_root

Ture if the node is designated root node.

struct bk_wifi_mesh_status_t

BK MESH link status parameters.

Public Members

bk_mesh_link_state_t state

The mesh node link status

uint8_t level

The level of mesh node. 0 is invalid

The mesh num of the mesh node linked

The non mesh num of the mesh node linked

uint8_t parent_mac[WIFI_MAC_LEN]

The parent’s MAC address of the mesh node

struct bk_wifi_mesh_net_cfg_t

BK MESH networking configuration.

Public Members

uint32_t net_token

net token.

token for the first network distribution,use random value when set 0

uint16_t node_num

Indicates the number of selected mesh nodes

char *node_mac_list

MAC addr list corresponding to the node_num

uint8_t mesh_id

Mesh network identifier, 0 indicates use default values

char router_ssid[WIFI_SSID_STR_LEN]

The SSID of the AP associated with the root node,wide area networkis mandatory

char router_pw[WIFI_PASSWORD_LEN]

The password of the AP associated with the root node, wide area networkis mandatory

char sap_ssid[WIFI_SSID_STR_LEN]

The SSID of SAP, 0 indicating use default value

char sap_pw[WIFI_PASSWORD_LEN]

The password of SAP, 0 indicating use default value

uint8_t max_mesh_num

The maximum number of mesh nodes that can be connected, with 1 to 10 being valid, 0 indicating use default value 10

uint8_t max_level

The maximum number of layers in a mesh network can be set to an integer not less than 1, 0 indicating use default value 10;

uint8_t design_root[WIFI_MAC_LEN]

designated root node mac address

struct bk_wifi_mesh_add_node_t

BK MESH add node configuration.

Public Members

uint16_t node_num

Indicates the number of selected mesh nodes

char *node_mac_list

MAC addr list corresponding to the node_num

char *design_parent

Add parent nodes corresponding to each node separately

struct bk_wifi_mesh_change_cfg_t

BK MESH change config configuration.

Public Members

uint16_t node_num

Indicates the number of selected mesh nodes

char *node_mac_list

MAC addr list corresponding to the node_num

char *design_parent

Modify the parent node specified by the configured node

char router_ssid[WIFI_SSID_STR_LEN]

The SSID of the AP associated with the root node,wide area networkis mandatory

char router_pw[WIFI_PASSWORD_LEN]

The password of the AP associated with the root node, wide area networkis mandatory

uint8_t max_mesh_num

Indicates the maximum number of mesh nodes allowed for connection, with 1 to 10 being valid

uint8_t max_level

The maximum number of layers in a MESH network can be set to an integer not less than 1;default 10

struct bk_wifi_mesh_vendor_t

BK MESH vendor configuration.

Public Members

uint16_t node_num

Indicates the number of selected mesh nodes

char *node_mac_list

MAC addr list corresponding to the node_num

uint16_t vendor_len

Indicates the length of customer information

char *vendort_ptr

custom defined fields

struct bk_wifi_mesh_ota_t

BK MESH ota configuration.

Public Members

uint8_t ota_type

1: cloud upgrade; 2 :app upgrade; 3:serial port upgrade

uint8_t upgrade_type

0: upgrade all; 1:upgrade single node; 2:upgrade part node

uint16_t node_num

Indicates the number of selected mesh nodes

char *node_mac_list

mac address of the node when upgrade_single set to 1

char ap_ssid[WIFI_SSID_STR_LEN]

Required when otaotype is 2, SSID representing mobile hotspot

char ap_pw[WIFI_PASSWORD_LEN]

Required when otaotype is 2, password representing mobile hotspot

uint8_t url_len

Required when otaotype is 1 or 2, url_ptr length

char *url_ptr

Required when otaotype is 1 or 2, url

struct bk_wifi_mesh_conn_router_t

BK MESH router config.

Public Members

uint16_t node_num

Indicates the number of selected mesh nodes

uint8_t root_mac[WIFI_MAC_LEN]

mac address of the root node

char router_ssid[WIFI_SSID_STR_LEN]

The SSID of the AP associated with the root node,wide area networkis mandatory

char router_pw[WIFI_PASSWORD_LEN]

The password of the AP associated with the root node, wide area networkis mandatory

struct bk_wifi_mesh_reset_node_t

BK MESH router config.

Public Members

uint16_t node_num

Indicates the number of selected mesh nodes

char *node_mac_list

MAC addr list corresponding to the node_num

Macros

BK_WIFI_MESH_MAX_LEVEL

Maximum level allowed

BK_WIFI_MESH_MAX_MESH_NODE_PER_LEVEL

Maximum mesh node number per level allowed

BK_WIFI_MESH_MAX_NON_MESH_NODE_PER_LEVEL

Maximum non-mesh node number per level allowed

WIFI_SSID_STR_LEN

Maximum NULL-terminated WiFi SSID length

WIFI_BSSID_LEN

Length of BSSID

WIFI_MAC_LEN

Length of MAC

WIFI_PASSWORD_LEN

Maximum NULL-terminated WiFi password length

SSID_MAX_LEN
ETH_ALEN
WIFI_DEFAULT_BK_MESH_CONFIG()

default BK WIFI MESH configuration

WIFI_DEFAULT_BK_MESH_NET_CONFIG()
WIFI_DEFAULT_BK_MESH_NET_ADD_CONFIG()
WIFI_DEFAULT_BK_MESH_NET_CHANGE_CONFIG()
WIFI_DEFAULT_BK_MESH_NET_VENDOR_CONFIG()
WIFI_DEFAULT_BK_MESH_NET_OTA_CONFIG()
WIFI_DEFAULT_BK_MESH_NET_ROUTER()
WIFI_DEFAULT_BK_MESH_RESET_NODE()

Enumerations

enum bk_wifi_mesh_cfg_type_t

BK MESH configuration type.

BK MESH configuration Type.

Values:

enumerator BK_WIFI_MESH_CFG_TYPE_NONE
enumerator BK_WIFI_MESH_CFG_TYPE_LOCAL
enumerator BK_WIFI_MESH_CFG_TYPE_APP
enumerator BK_WIFI_MESH_CFG_TYPE_WEBPAGE
enumerator BK_WIFI_MESH_CFG_TYPE_MAX
enum bk_wifi_mesh_net_event_t

BK MESH networking event Type.

Values:

enumerator BK_MESH_EVENT_GET_IDLE_NODE

return idle nodel list

enumerator BK_MESH_EVENT_GET_TOPO

return topology

enumerator BK_MESH_EVENT_RM_NODE

return rm node fail list

enumerator BK_MESH_EVENT_GET_VENDOR

return vendor info

enumerator BK_MESH_EVENT_CONN_ROUTER

return connect router result

enumerator BK_MESH_EVENT_OTA_FINISH

return OTA finish event

enumerator BK_MESH_EVENT_MAX

BK MESH link status.

BK MESH link state.

Values:

node state is without distribution network

node state is in networing

node state is networked

node state is restoring

reserved