BK-WIFI-MESH APIs
重要
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
MESH networking
bk_wifi_mesh_get_idle_node()- Get mesh idle node list
bk_wifi_mesh_net_cfg()- Configure BK WIFI MESH networking parametersMESH network build
bk_wifi_mesh_config()- Configure BK WIFI MESH parameters
bk_wifi_mesh_start()- Start BK wifi mesh node
bk_wifi_mesh_stop()- Stop BK wifi mesh node
bk_wifi_mesh_status_info()- Get link status of BK wifi mesh node
bk_wifi_mesh_comm_mac_get()- Get communication macMESH OTA
bk_wifi_mesh_ota_start()- Configure BK WIFI MESH ota parameters
bk_wifi_mesh_ota_data_write()- Write OTA bin to root node
bk_wifi_mesh_ota_finish()- Notify ota bin download finish
bk_wifi_mesh_get_ota_state()- Get the OTA stateMESH data transmission
bk_wifi_mesh_data_send()- Send internal data frame to other node in the same networkMESH network control
bk_wifi_mesh_set_vendor_cb_reg()- Set_vendor callback registration function
bk_wifi_mesh_get_vendor_cb_reg()- Get vendor callback registration function
bk_wifi_mesh_get_topo()- Get the topology of mesh network
bk_wifi_mesh_add_node()- Add mesh node to mesh network
bk_wifi_mesh_remove_node()- Remove the mesh node
bk_wifi_mesh_change_cfg()- Set the change mesh config configuration
bk_wifi_mesh_set_vendor()- Set the custom information
bk_wifi_mesh_get_vendor()- Get the custom information
bk_wifi_mesh_reset_node()- Reset the mesh node
Programing Principle
重要
- 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
bk_wifi_mesh.h
- bk_wifi_mesh.h路径:
components/bk_wifi_mesh/inc
API Typedefs
bk_wifi_mesh_types.h
- bk_wifi_mesh_types.h路径:
components/bk_wifi_mesh/inc