Wi-Fi Manager
wifi_mgmr_init()
Initialize the Wi-Fi manager and register event filters
Return value: see the SDK header
wifi_mgmr_bitmap_to_chanlist(bitmap, chan_list, chan_count)
Convert a channel bitmap to a channel list
Return value: None
wifi_mgmr_chanlist_to_bitmap(chan_list, chan_count, bitmap)
Convert a channel list to a channel bitmap
Return value: None
wifi_mgmr_init_country_bitmaps()
Initialize country/region channel bitmaps
Return value: None
wifi_mgmr_print_channel_info(country_code)
Print supported channel info
Return value: None
wifi_mgmr_task_start()
Start the Wi-Fi management task
Return value: see the SDK header
wifi_mgmr_get_channel_nums(country_code, c24G_cnt, c5G_cnt)
Get 2.4G/5G channel counts for a country code
Return value: see the SDK header
wifi_mgmr_scan_beacon_save(scan)
Save scanned beacon information
Return value: see the SDK header
wifi_mgmr_sta_info_reset()
Reset STA information
Return value: None
wifi_mgmr_sta_info_upatestatus(status_code, reason_code)
Update STA connection status
Return value: None
wifi_mgmr_sta_info_save(param)
Save STA connection info
Return value: None
wifi_mgmr_sta_connect_params_get()
Get current STA connection parameters
Return value: see the SDK header
wifi_mgmr_ap_sta_info_del(sta_idx)
Delete AP client info
Return value: None
wifi_mgmr_ap_sta_info_add(sta_idx, aid, addr)
Add AP client info
Return value: None
wifi_mgmr_auth_to_str(auth)
Convert an auth mode enum to a string (e.g., WPA2-PSK)
Return value: see the SDK header
wifi_mgmr_cipher_to_str(cipher)
Convert a cipher enum to a string (e.g., AES)
Return value: see the SDK header
Wi-Fi Manager Ext
wifi_sta_antenna_connect(ssid, key, bssid, akm_str, pmf_cfg, freq1, freq2, use_dhcp)
wifi_sta_antenna_connect Connect to the AP
Return value: see the SDK header
wifi_sta_connect(ssid, key, bssid, akm_str, pmf_cfg, freq1, freq2, use_dhcp)
wifi_sta_connect Connect to the AP
Return value: see the SDK header
wifi_mgmr_sta_quickconnect(ssid, key, freq1, freq2)
wifi_mgmr_sta_quickconnect Connect to the AP
Return value: see the SDK header
wifi_mgmr_sta_connect(config)
wifi_mgmr_sta_connect Connect to the AP
Return value: see the SDK header
wifi_sta_disconnect()
wifi_sta_disconnect Disconnect from the AP
Return value: see the SDK header
wifi_mgmr_sta_ip_set(ip, mask, gw, dns)
Set IPv4 address of STA interface
Return value: see the SDK header
wifi_sta_ip4_addr_get(addr, mask, gw, dns)
Get IPv4 address of STA interface
Return value: see the SDK header
wifi_sta_dhcp_client_start(to_ms)
Start dhcp client on STA interface IF STA interface is not connected, just return -1
Parameters:
to_ms:Timeout in ms to obtain IP (0 uses WIFI_STA_DHCPC_TIMEOUT_MS_DEFAULT)
Return value: see the SDK header
wifi_mgmr_sniffer_enable(to_ms)
wifi_mgmr_sniffer_enable start sniffer mode
Parameters:
to_ms:Timeout in ms to obtain IP (0 uses WIFI_STA_DHCPC_TIMEOUT_MS_DEFAULT)
Return value: see the SDK header
wifi_mgmr_sniffer_disable(sniffer_item)
wifi_mgmr_sniffer_disable stop sniffer mode
Return value: see the SDK header
wifi_mgmr_state_get()
wifi_mgmr_state_get get ap/sta state
Return value: see the SDK header
wifi_mgmr_sta_rssi_get(rssi)
wifi_mgmr_sta_rssi_get get the last beacon rssi
Return value: see the SDK header
wifi_mgmr_sta_channel_get(channel)
wifi_mgmr_sta_channel_get get sta mode channel
Return value: see the SDK header
wifi_mgmr_sta_ssid_set(ssid)
wifi_mgmr_sta_ssid_set set sta mode ssid
Return value: see the SDK header
wifi_mgmr_sta_ssid_get(ssid)
wifi_mgmr_sta_ssid_get get sta mode ssid
Return value: see the SDK header
wifi_mgmr_sta_passphr_set(passphr)
wifi_mgmr_sta_passphr_set set sta mode password
Return value: see the SDK header
wifi_mgmr_sta_connect_ind_stat_get(wifi_mgmr_ind_stat)
wifi_mgmr_sta_connect_ind_stat_get get state (ssid password) of sta mode
Return value: see the SDK header
wifi_mgmr_sta_scan(config)
wifi_mgmr_sta_scan Scan available APs
Return value: see the SDK header
wifi_mgmr_ap_bcn_mode_set(bcn_mode, bcn_timer)
wifi_mgmr_ap_bcn_mode_set Beacon Transmission Control Setting in the SAP modex
Return value: see the SDK header
wifi_mgmr_ap_bcn_mode_get(bcn_mode, bcn_timer)
wifi_mgmr_ap_bcn_mode_get Get Beacon Transmission Control Setting in the SAP modex
Return value: None
wifi_mgmr_sta_scanlist()
wifi_mgmr_sta_scanlist List the scan results in last scan
Return value: see the SDK header
wifi_mgmr_sta_scanlist_nums_get()
wifi_mgmr_sta_scanlist_nums_get Get the number of scan results
Return value: see the SDK header
wifi_mgmr_sta_scanlist_dump(results, resultNums)
wifi_mgmr_sta_scanlist_dump Get the scan results
Return value: see the SDK header
wifi_mgmr_scan_filter_hidden_ssid(filter)
wifi_mgmr_scan_filter_hidden_ssid Whether filter hidden ssid from scan results
Return value: see the SDK header
wifi_mgmr_scan_ap_all(env, arg, cb)
Get scan results
Parameters:
env:env for cbarg:arg for cbcb:Callback to receive scan results
Return value: 0
wifi_mgmr_ap_start(env, arg, cb)
wifi_mgmr_ap_start Start AP mode
Parameters:
env:env for cbarg:arg for cbcb:Callback to receive scan results
Return value: 0
wifi_mgmr_ap_stop()
wifi_mgmr_ap_stop Stop AP mode
Return value: see the SDK header
wifi_mgmr_ap_acl_enable(default_perm)
wifi_mgmr_ap_acl_enable MAC Address Filtering Enable && MAC Address Filtering Default permission setting
Return value: see the SDK header
wifi_mgmr_ap_acl_set(acl, action, mac_str)
wifi_mgmr_ap_acl_set MAC Address White-list/Black-list setting
Return value: see the SDK header
wifi_mgmr_mac_set(mac)
wifi_mgmr_mac_set Set mac
Return value: see the SDK header
wifi_mgmr_sta_set_mac(mac)
wifi_mgmr_sta_set_mac Set mac addr for sta mode
Return value: see the SDK header
wifi_mgmr_ap_set_mac(mac)
wifi_mgmr_ap_set_mac Set mac addr for ap mode
Return value: see the SDK header
wifi_mgmr_sta_mac_get(mac)
wifi_mgmr_sta_mac_get Get sta mac
Return value: see the SDK header
wifi_mgmr_ap_mac_get(mac)
wifi_mgmr_ap_mac_get Get ap mac
Return value: see the SDK header
wifi_mgmr_set_country_code(country_code)
wifi_mgmr_set_country_code Set country code
Return value: see the SDK header
wifi_mgmr_get_country_code(country_code)
wifi_mgmr_get_country_code Get country code
Return value: see the SDK header
wifi_mgmr_sta_autoconnect_enable()
wifi_mgmr_set_autoconnect_enable Enable station autoconnect
Return value: see the SDK header
wifi_mgmr_sta_autoconnect_disable()
wifi_mgmr_set_autoconnect_disable Disable station autoconnect
Return value: see the SDK header
wifi_mgmr_sta_reconnect_policy_set(cfg)
wifi_mgmr_sta_reconnect_policy_set Set station reconnect policy used after authentication failure.
Return value: see the SDK header
wifi_mgmr_sta_reconnect_policy_get(cfg)
wifi_mgmr_sta_reconnect_policy_get Get station reconnect policy used after authentication failure.
Return value: see the SDK header
wifi_mgmr_sta_wps_pbc(auth)
wifi_mgmr_sta_wps_pbc Start sta wps pbc
Return value: see the SDK header
wifi_mgmr_sta_non_pref_chan_set(argc, argv)
wifi_mgmr_sta_non_pref_chan_set - Set the non-preferred channel list for Wi-Fi management @argc: The number of arguments passed to the function
Return value: see the SDK header
wifi_mgmr_sta_non_pref_chan_notify()
wifi_mgmr_sta_non_pref_chan_notify - Notify the Wi-Fi management system of non-preferred channel changes
Return value: see the SDK header
wifi_mgmr_sta_ps_enter()
wifi_mgmr_sta_ps_enter Enter powersave mode
Return value: see the SDK header
wifi_mgmr_sta_ps_exit()
wifi_mgmr_sta_ps_exit Exit powersave mode
Return value: see the SDK header
wifi_mgmr_sta_ps_active_time(ms)
wifi_mgmr_sta_ps_active_time set ps active time
Return value: see the SDK header
wifi_mgmr_sta_coex_enable()
Enable WiFi/BLE coexistence mode WiFi must be connected before calling this function. BL616/BL616CL enable combo PS_PTA. BL618DG on 5 GHz applies the standalone dual-antenna hardware recipe without enabling PS_PTA.
Return value: 0 on success, negative error code on failure
wifi_mgmr_ap_coex_enable()
Apply coexistence configuration for an enabled SoftAP. The current public AP flow supports the BL618DG 5 GHz standalone dual-antenna hardware recipe only. It does not enable PS_PTA.
Return value: 0 on success, -1 on failure.
wifi_mgmr_sta_coex_enable_2g(config, ps_pta_enable)
Enable BL618DG 2.4 GHz coexistence with an explicit configuration.
Parameters:
config:COEX combo or standalone SPDT configuration.ps_pta_enable:Enable the software TBTT/PS_PTA runtime.
Return value: 0 on success, -1 on failure.
wifi_mgmr_sta_coex_disable()
Disable WiFi/BLE coexistence mode This function disables coexistence mode and restores normal WiFi operation.
Return value: 0 on success, negative error code on failure
wifi_mgmr_sta_coex_duty_set(active_ms)
Set WiFi active duty cycle for coexistence mode This function configures the WiFi active time per TBTT period.
Parameters:
active_ms:WiFi active time in milliseconds (valid range: 10-90)
Return value: 0 on success, -1 on invalid parameter
wifi_mgmr_sta_coex_status_get()
Get WiFi/BLE coexistence mode status
Return value: true if coex mode is enabled, false otherwise
wifi_mgmr_sta_coex_duty_get()
Get current WiFi active duty cycle
Return value: WiFi active time in milliseconds
wifi_mgmr_sta_twt_setup(twt_params_ptr)
Set up WiFi Manager STA TWT (Target Wake Time) functionality This function is used to set up the WiFi Manager's STA TWT functionality in order to achieve target wake time under specified conditions.
Parameters:
twt_params_ptr:Pointer to the structure containing all the necessary parameters for TWT setup
Return value: Returns the result of the function execution, 0 for success and -1 for failure
wifi_mgmr_sta_twt_teardown(twt_params_ptr)
Tear down WiFi Manager STA TWT (Target Wake Time) functionality This function tears down the WiFi Manager's STA TWT functionality based on the provided parameters.
Parameters:
twt_params_ptr:Pointer to the structure containing TWT teardown parameters
Return value: Returns the result of the function execution, 0 for success and -1 for failure
wifi_mgmr_sta_twt_statusget(conf, twt_num)
Get WiFi Manager STA TWT (Target Wake Time) status This function retrieves the current TWT status including all active TWT flows and their configurations.
Parameters:
conf:Pointer to an array of twt_status_info structures to store TWT flow configurationstwt_num:Pointer to store the number of active TWT flows
Return value: Returns the result of the function execution, 0 for success and -1 for failure
wifi_mgmr_sta_twt_flow_get()
Get active STA TWT flow count.
Return value: Active TWT flow count, or 0 when TWT is not enabled.
wifi_mgmr_sta_set_listen_itv(itv)
wifi_mgmr_sta_set_listen_itv Set listen interval
Return value: Active TWT flow count, or 0 when TWT is not enabled.
wifi_mgmr_sta_get_listen_itv()
wifi_mgmr_sta_get_listen_itv Get listen interval
Return value: see the SDK header
wifi_mgmr_sta_aid_get()
wifi_mgmr_sta_aid_get Get aid
Return value: see the SDK header
wifi_mgmr_sta_get_bssid(bssid)
wifi_mgmr_sta_get_bssid Get STA bssid
Return value: see the SDK header
wifi_mgmr_ap_sta_info_get(sta_info, idx)
wifi_mgmr_ap_sta_info_get Get STA List in AP mode
Return value: see the SDK header
wifi_mgmr_tpc_pwr_set(power_table)
wifi_mgmr_tpc_pwr_set Set power table
Return value: see the SDK header
wifi_mgmr_tpc_pwr_get(power_table)
wifi_mgmr_tpc_pwr_get Get power table
Return value: see the SDK header
wifi_mgmr_connection_info(connection_info)
wifi_mgmr_connection_info Get connected ap/router info
Return value: see the SDK header
wifi_mgmr_get_ap_info(ap)
wifi_mgmr_get_ap_info Get ap info
Return value: see the SDK header
wifi_mgmr_sta_keepalive_time_set(time_seconds)
Set keep alive time for sta mode
Return value: see the SDK header
wifi_mgmr_sta_state_get()
get sta connected or not connected for sta mode return: 0 : not connected 1 : connected
Return value: see the SDK header
wifi_mgmr_sta_state_get_ext()
get sta specific state return: state
Return value: see the SDK header
wifi_mgmr_sta_info_status_code_get()
wifi_mgmr_sta_info_status_code_get Get status code
Return value: see the SDK header
wifi_mgmr_ap_state_get()
get whether ap has started for ap mode return: 0 : not started 1 : has started
Return value: see the SDK header
wifi_mgmr_ap_state_get_ext()
get ap specific state return: state
Return value: see the SDK header
wifi_mgmr_conf_max_sta(max_sta_supported)
wifi_mgmr_conf_max_sta Set max number of sta supported for ap
Return value: see the SDK header
wifi_mgmr_ap_sta_delete(sta_idx)
wifi_mgmr_ap_sta_delete Del sta in ap mode
Return value: see the SDK header
wifi_mgmr_raw_80211_send(config)
wifi_mgmr_raw_80211_send Send raw packet
Return value: see the SDK header
wifi_mgmr_get_stats(stats, num_stats)
wifi_mgmr_raw_80211_send Send raw packet
Return value: see the SDK header
wifi_mgmr_clear_stats()
wifi_mgmr_raw_80211_send Send raw packet
Return value: see the SDK header
wifi_mgmr_null_data_send()
wifi_mgmr_null_data_send Send null packet
Return value: see the SDK header
wifi_mgmr_psk_cal(password, ssid, ssid_len, output)
wifi_mgmr_psk_cal Calucate psk by using passpharse
Return value: see the SDK header
wifi_mgmr_rate_config(cfg)
wifi_mgmr_rate_config param:
Return value: see the SDK header
wifi_mgmr_rate_config_sta(fixed_rate_cfg)
wifi_mgmr_rate_config param:
Return value: see the SDK header
fhost_rc_set_rate_sta(sta, params)
wifi_mgmr_rate_config param:
Return value: see the SDK header
wifi_mgmr_set_ht40_enable(value)
wifi_mgmr_set_ht40_enable Toggle state of HT40 mode
Return value: see the SDK header
wifi_mgmr_set_ldpc_rx_enable(value)
wifi_mgmr_set_ldpc_rx_enable Toggle state of LDPC RX mode
Return value: see the SDK header
wifi_mgmr_sta_ap_tx_power_set(pwr_table)
wifi_mgmr_set_ldpc_rx_enable Toggle state of LDPC RX mode
Return value: see the SDK header
wifi_mgmr_sta_ap_tx_power_get()
wifi_mgmr_set_ldpc_rx_enable Toggle state of LDPC RX mode
Return value: see the SDK header
wifi_mgmr_sta_ap_retry_limit_set(retry_limit)
wifi_mgmr_sta_ap_retry_limit_set Set tx retry limit for ap/sta mode
Return value: see the SDK header
wifi_mgmr_sta_ap_retry_limit_get()
wifi_mgmr_sta_ap_retry_limit_set Get tx retry limit for ap/sta mode
Return value: see the SDK header
wifi_mgmr_set_tx_queue_params(queue, aifs, cw_min, cw_max, burst_time)
wifi_mgmr_set_tx_queue_params Set CWmin, CWmax, and AIFS for each Tx Queue
Return value: see the SDK header
wifi_mgmr_get_tx_queue_params(queue, aifsn, cwmin, cwmax)
wifi_mgmr_set_tx_queue_params Get CWmin, CWmax, and AIFS for each Tx Queue
Return value: see the SDK header
wifi_mgmr_get_remaining_tx(tx0_cnt, tx1_cnt, tx2_cnt, tx3_cnt)
wifi_mgmr_get_remaining_tx Get the number of frames remaining in each Tx queue.
Return value: see the SDK header
wifi_mgmr_set_mode(ap_or_sta, mode)
wifi_mgmr_set_mode Set sta/ap mode (e.g. b/g/n/ax)
Return value: see the SDK header
wifi_mgmr_get_mode(ap_or_sta)
wifi_mgmr_get_mode Get sta/ap mode (e.g. b/g/n/ax)
Return value: see the SDK header
wifi_mgmr_adhoc_set_rate(rate)
wifi_mgmr_adhoc_set_rate Set tx rate
Return value: see the SDK header
wifi_mgmr_adhoc_get_rate()
wifi_mgmr_adhoc_get_rate Get tx rate
Return value: see the SDK header
wifi_mgmr_adhoc_set_rts_thrshold(rts_thrshold)
wifi_mgmr_adoc_set_rts_thrshold Set/ RTS threshold
Return value: see the SDK header
wifi_mgmr_adhoc_get_rts_thrshold()
wifi_mgmr_adoc_get_rts_thrshold Get RTS threshold
Return value: see the SDK header
wifi_mgmr_adhoc_set_tx_power(tx_power)
wifi_mgmr_adoc_set_tx_power Set Tx power
Return value: see the SDK header
wifi_mgmr_adhoc_get_tx_power()
wifi_mgmr_adoc_get_tx_power Get Tx power
Return value: see the SDK header
wifi_mgmr_adhoc_set_retry_limit(retry_limit)
wifi_mgmr_adoc_set_retry_limit Set retry limit
Return value: see the SDK header
wifi_mgmr_adhoc_get_retry_limit()
wifi_mgmr_adoc_get_retry_limit Get retry limit
Return value: see the SDK header
wifi_mgmr_adhoc_get_channel()
wifi_mgmr_adhoc_get_channel Get channel of ad-hoc mode
Return value: see the SDK header
wifi_mgmr_adhoc_pkt_send(config)
wifi_mgmr_adhoc_pkt_send Send packets for testing
Return value: see the SDK header
wifi_mgmr_adhoc_start(config)
wifi_mgmr_adhoc_start Start adhoc mode
Return value: see the SDK header
wifi_mgmr_adhoc_stop()
wifi_mgmr_adhoc_stop Stop adhoc mode
Return value: see the SDK header
wifi_mgmr_coex_enable(en)
wifi_mgmr_coex_enable Enable or disable wifi coex
Return value: None
wifi_sta_ipv6_enable(enable)
wifi_sta_ipv6_enable Enable or disable ipv6
Return value: see the SDK header
wifi_mgmr_get_channelnum_24G()
Get the number of valid 2.4GHz Wi-Fi channels
Return value: see the SDK header
wifi_mgmr_channel_valid_check(channel)
Get the number of valid 2.4GHz Wi-Fi channels
Return value: uint8_t
wifi_mgmr_wifimode_valid_check(mode)
Check if a WiFi mode is valid
Parameters:
mode:The WiFi mode to validate
Return value: int
wifi_mgmr_ap_chan_switch(channel, cs_count)
Trigger an AP Channel Switch Announcement (CSA) to migrate the running SoftAP to a new channel without tearing down associated stations. Hostapd advertises the upcoming switch by inserting a CSA IE in the next
Parameters:
channel:Target primary channel (2.4 GHz: 1..14, 5 GHz: 36..165).cs_count:Number of beacons to send before switching. Unit is one
Return value: int
wifi_mgmr_mode_to_str(mode)
Convert a Wi-Fi mode enum to a string
Return value: see the SDK header
printf(n, channel_count)
Format and print to the serial port (standard library)
Return value: see the SDK header
Wi-Fi CLI
cmd_hello(argc, argv)
CLI command: print hello test info
Return value: None
cmd_phy(argc, argv)
CLI command: PHY test operations
Return value: None
cmd_ac_set(argc, argv)
CLI command: set AC parameters
Return value: None
cmd_ap_stop(argc, argv)
CLI command: stop AP mode
Return value: None
wifi_scan_cmd(argc, argv)
CLI command: run a Wi-Fi scan
Return value: None
wifi_connect_cmd(argc, argv)
CLI command: connect to a Wi-Fi (SSID/password)
Return value: None
wifi_disconnect_cmd(argc, argv)
CLI command: disconnect the current Wi-Fi
Return value: None
lwip_cmd(argc, argv)
CLI command: lwIP debug info
Return value: None
cmd_wifi_sniffer_on(argc, argv)
CLI command: enable Wi-Fi sniffer
Return value: None
cmd_wifi_sniffer_off(argc, argv)
CLI command: disable Wi-Fi sniffer
Return value: None
cmd_wifi_state_get(argc, argv)
CLI command: get Wi-Fi state
Return value: None
cmd_wifi_sta_dhcp_client_start(argc, argv)
CLI command: start the STA DHCP client
Return value: None
cmd_wifi_sta_rssi_get(argc, argv)
CLI command: get STA RSSI
Return value: None
cmd_wifi_sta_channel_get(argc, argv)
CLI command: get the current channel
Return value: None
cmd_wifi_sta_ssid_passphr_get(argc, argv)
CLI command: get the connected SSID/passphrase
Return value: None
cmd_wifi_sta_mac_get(argc, argv)
CLI command: get the STA MAC address
Return value: None
wifi_enable_autoreconnect_cmd(argc, argv)
CLI command: enable auto-reconnect
Return value: None
wifi_disable_autoreconnect_cmd(argc, argv)
CLI command: disable auto-reconnect
Return value: None
wifi_country_code_get_cmd(argc, argv)
CLI command: get the country code
Return value: None
wifi_country_code_set_cmd(argc, argv)
CLI command: set the country code
Return value: None
wifi_sta_ps_on_cmd(argc, argv)
CLI command: enable STA power save
Return value: None
wifi_sta_ps_off_cmd(argc, argv)
CLI command: disable STA power save
Return value: None
wifi_sta_ps_set_cmd(argc, argv)
CLI command: set the power-save duty cycle
Return value: None
wifi_coex_enable_cmd(argc, argv)
CLI command: enable Wi-Fi/BLE coexistence
Return value: None
wifi_ap_coex_enable_cmd(argc, argv)
CLI command: enable AP coexistence
Return value: None
wifi_coex_disable_cmd(argc, argv)
CLI command: disable coexistence
Return value: None
wifi_coex_duty_set_cmd(argc, argv)
CLI command: set the coexistence duty cycle
Return value: None
wifi_coex_status_cmd(argc, argv)
CLI command: query coexistence status
Return value: None
wifi_coex_bt_spdt_cmd(argc, argv)
CLI command: set coexistence BT SPDT switch
Return value: None
wifi_coex_bt_adj_pwr_cmd(argc, argv)
CLI command: enable coexistence BT power adjustment
Return value: None
wifi_coex_bt_adj_pwr_off_cmd(argc, argv)
CLI command: disable coexistence BT power adjustment
Return value: None
wifi_coex_bt_overlay_cmd(argc, argv)
CLI command: enable coexistence BT overlay
Return value: None
wifi_coex_bt_overlay_off_cmd(argc, argv)
CLI command: disable coexistence BT overlay
Return value: None
wifi_sta_info_cmd(argc, argv)
CLI command: show STA info
Return value: None
wifi_ap_sta_list_get_cmd(argc, argv)
CLI command: get the AP client list
Return value: None
wifi_ap_sta_delete_cmd(argc, argv)
CLI command: kick an AP client
Return value: None
wifi_mgmr_ap_start_cmd(argc, argv)
CLI command: start AP mode
Return value: None
wifi_mgmr_ap_stop_cmd(argc, argv)
CLI command: stop AP mode
Return value: None
cmd_wifi_ap_mac_get(argc, argv)
CLI command: get the AP MAC address
Return value: None
cmd_wifi_ap_conf_max_sta(argc, argv)
CLI command: configure the AP max client count
Return value: None
cmd_wifi_raw_send(argc, argv)
CLI command: send a raw Wi-Fi frame
Return value: None
cmd_wifi(argc, argv)
CLI command: generic Wi-Fi debug entry
Return value: None
wifi_sta_static_ipv4(argc, argv)
CLI command: configure STA static IPv4
Return value: None
cmd_iperf(argc, argv)
CLI command: iperf throughput test
Return value: None
cmd_rc(argc, argv)
CLI command: radio/rate control related
Return value: None
cmd_rate(argc, argv)
CLI command: set the transmit rate
Return value: None
cmd_non_pref_chan(argc, argv)
CLI command: set non-preferred channels
Return value: None
cmd_non_pref_chan_notify(argc, argv)
CLI command: notify non-preferred channel changes
Return value: None
cmd_wifi_mgmr_sta_twt_setup(argc, argv)
CLI command: configure STA TWT (Wi-Fi 6 power save)
Return value: None
cmd_wifi_mgmr_sta_twt_teardown(argc, argv)
CLI command: tear down a TWT session
Return value: None
cmd_wifi_mgmr_sta_twt_statusget(argc, argv)
CLI command: query TWT status
Return value: None
cmd_wifi_adhoc_send(argc, argv)
CLI command: send AD-HOC data
Return value: None
cmd_adhoc_start(argc, argv)
CLI command: start AD-HOC mode
Return value: None
cmd_adhoc_stop(argc, argv)
CLI command: stop AD-HOC mode
Return value: None
cmd_wifi_mode_set(argc, argv)
CLI command: set the Wi-Fi mode
Return value: None
cmd_wifi_wps_pbc(argc, argv)
CLI command: trigger WPS PBC provisioning
Return value: None
wifi_ap_bcn_mode_set_cmd(argc, argv)
CLI command: set AP beacon mode
Return value: None
wifi_mgmr_ap_acl_set_cmd(argc, argv)
CLI command: configure AP access control list
Return value: None
wifi_mgmr_ap_acl_enable_cmd(argc, argv)
CLI command: enable/disable AP ACL
Return value: None
cmd_wifi_stats(argc, argv)
CLI command: show Wi-Fi statistics
Return value: None
cmd_wifi_get_tx_remaining(argc, argv)
CLI command: query remaining TX data
Return value: None
cmd_wifi_power_get(argc, argv)
CLI command: get the TX power
Return value: None
cmd_wifi_channel_get(argc, argv)
CLI command: get the current channel
Return value: None
cmd_wifi_cca(argc, argv)
CLI command: CCA (clear channel assessment) test
Return value: None
wifi_antenna_scan_cmd(argc, argv)
CLI command: antenna scan
Return value: None
wifi_antenna_scan_connect_cmd(argc, argv)
CLI command: antenna scan then connect
Return value: None
fhost Framework
dbg_vsnprintf_offset(buffer, size, offset, fmt, args)
Fully Hosted module implementation. This module creates different RTOS tasks that will be used to handle the operations of the fully-hosted FW
Return value: see the SDK header
fhost_wakeup()
Configuration/control messages received from supplicant application
Return value: None
fhost_to_net_if(fhost_vif_idx)
Get Network interface associated to a FHOST VIF.
Return value: A pointer to the corresponding network interface
fhost_vif_name(fhost_vif_idx, name, len)
Get FHOST VIF name. Copy name of a FHOST VIF inside provided buffer including a terminating a null byte. If the buffer is not big enough then interface name is truncated and the null byte is not written in the buffer.
📎 Device name lookup: Supported Device Names (BL616)
Return value: < 0 if error occurred, otherwise the number of characters (excluding the
fhost_vif_idx_from_name(name)
Get FHOST VIF index from its name.
📎 Device name lookup: Supported Device Names (BL616)
Return value: index of the fhost vif and < 0 if there is no interface with the provided name
fhost_vif_set_uapsd_queues(fhost_vif_idx, uapsd_queues)
Configure default queues enabled for U-APSD. This configuration is used when an interface configured as STA connects to an AP that supports U-APSD. This can be called at any time, but the configuration will only be applied for the next connections.
Return value: 0 on success and != 0 if error occurred.
fhost_application_init()
Initialization of the application. Called during the initialization procedure (i.e. when RTOS scheduler is not yet active). Implementation of this function will depends of the final application and in most cases it will create one of several application tasks and their required communication interface (queue, semaphore, ...)
Return value: 0 on success and != 0 if error occurred.
fhost_print_buf(handle, buf)
Print a pre-formatted string buffer. Implementation of this function will depend of target/application
Return value: 0 on success and != 0 if error occurred.
fhost_print(handle, fmt, ...)
Print a message. Implementation of this function will depend of target/application
Return value: see the SDK header
fhost_ip_chksum(dataptr, len)
Compute checksum on a given IP packet Compute IP packet checksum using HSU and fallback to software computation if HSU is unavailable
Return value: IP packet checksum
fhost_sta_cfg(fhost_vif_idx, cfg)
Connect a STA interface to an AP This is blocking until connection is successful.
Return value: 0 on success and != 0 if error occurred.
fhost_ap_cfg(fhost_vif_idx, cfg, mesh_mode)
Start an Access Point This is blocking until AP is operational.
Return value: 0 on success and != 0 if error occurred.
fhost_get_sta_idx(fhost_vif, table_max_size, idx_table)
Retrieve list of Stations connected to a certain VIF
Return value: Size of the idx_table
fhost_get_cipher_supported()
Get supported cipher suites based on MAC capabilities Returns a bitmask of supported ciphers in MAC_CIPHER format (CO_BIT(MAC_CIPHER_*)). Queries MAC layer for actual cipher support. 256-bit ciphers (CCMP-256, GCMP-256) are enabled by default.
Return value: Bitmask of supported ciphers
fhost_vif_is_up(fhost_vif_idx)
Get supported cipher suites based on MAC capabilities Returns a bitmask of supported ciphers in MAC_CIPHER format (CO_BIT(MAC_CIPHER_*)). Queries MAC layer for actual cipher support. 256-bit ciphers (CCMP-256, GCMP-256) are enabled by default.
Return value: Bitmask of supported ciphers
fhost_to_mac_vif(fhost_vif_idx)
把 fhost 接口映射到 MAC 虚拟接口
Return value: A pointer to the corresponding MAC VIF
fhost_from_mac_vif(mac_vif_idx)
把 MAC 虚拟接口映射回 fhost 接口
Return value: A pointer to the corresponding FHOST VIF
fhost Network API
fhost_init()
Initialization of the fully hosted module. This function allocates all the resources needed by the different FHOST sub-modules. This function will use the rtos_al API to create tasks, semaphores, etc. As such it must be called after @ref rtos_init (or equivalent). The user shall call @ref fhost_wait_ready to ensure that all sub-modules have been fully initialized
Return value: 0 on success and != 0 if error occurred.
fhost_wait_ready()
Waits until fully hosted module is ready. This function will block until fully hosted module is ready to be used. Fully hosted module is ready when all its tasks (created by @ref fhost_init) finished their initialization. It is not safe to call any of the functions defined thereafter without ensuring first that the fully hosted module is ready.
Return value: see the SDK header
fhost_get_status(status)
Retrieve fully hosted module status.
Return value: None
fhost_get_vif_status(fvif_idx, status)
Retrieve one interface status.
Return value: 0 on success and != 0 if error occurred
fhost_get_vif_raw_state(fvif_idx)
Retrieve one interface raw state.
Return value: raw state of the interface
fhost_get_vif_state(fvif_idx)
Retrieve one interface state.
Return value: state of the interface
fhost_set_vif_type(resp_queue, fvif_idx, type, p2p)
Change interface type When the interface type is changed, the current interface will first be cleared (i.e. close its connection, release its IP address ...) If interface is already of the requested type the function returns immediately. If you want to clear an interface without changing its type, you should first set its type to VIF_UNKNOWN and then reset it.
Return value: 0 on success and <0 if any error occurred.
fhost_configure_vif(resp_queue, fvif_idx, cfg)
Configure an interface This function configures an interface. The processing done depend of the interface type: - MONITOR: Set the radio channel - STA: Start wpa_supplicant to connect to an AP - AP: Start an Access Point - MESH_POINT: Start a MESH Point The configuration type (i.e. fhost_vif_cfg.cfg_type) must match the interface type otherwise an error is returned.
Return value: see the SDK header
fhost_scan(resp_queue, fvif_idx)
Scan Access Points on a given interface This function is blocking until the scan is finished. Once the scan is complete you can use @ref fhost_get_scan_results to retrieve the results.
Return value: < 0 if an error occurred, otherwise it returns the number of Access point
fhost_get_scan_results(resp_queue, result_idx, max_nb_result, results)
Retrieve scan results This function retrieves up to @p max_nb_result scan results starting at index
Return value: 0 on success and <0 if any error occurred.
fhost_send_80211_frame(fvif_idx, frame, length, no_cck, cfm_cb, cfm_cb_arg)
Transmit a 802.11 frame This function is used to send a pre-formatted 802.11 frame (most likely a Management frame). The frame is sent as a singleton using basic rates. The memory passed as parameter is first copied before programming the transmission. It can then be re-used immediately once the function returns.
Return value: see the SDK header
fhost_ftm(resp_queue, fvif_idx, res)
Start FTM measurements on a given interface This function is blocking until the FTM procedure is finished. The results of the measurements are written to the dedicated structure passed as parameter.
Return value: < 0 if an error occurred, 0 otherwise.
lwIP Socket
lwip_socket_thread_init()
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: None
lwip_socket_thread_cleanup()
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: None
fcntl(s, cmd, ...)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_accept(s, addr, addrlen)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_bind(s, name, namelen)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
📎 Device name lookup: Supported Device Names (BL616)
Return value: see the SDK header
lwip_shutdown(s, how)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_getpeername(s, name, namelen)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
📎 Device name lookup: Supported Device Names (BL616)
Return value: see the SDK header
lwip_getsockname(s, name, namelen)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
📎 Device name lookup: Supported Device Names (BL616)
Return value: see the SDK header
lwip_getsockopt(s, level, optname, optval, optlen)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_setsockopt(s, level, optname, optval, optlen)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_close(s)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_connect(s, name, namelen)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
📎 Device name lookup: Supported Device Names (BL616)
Return value: see the SDK header
lwip_listen(s, backlog)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_recv(s, mem, len, flags)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_read(s, mem, len)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_readv(s, iov, iovcnt)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_recvfrom(s, mem, len, flags, from, fromlen)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_recvmsg(s, message, flags)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_send(s, dataptr, size, flags)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_sendmsg(s, message, flags)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_sendto(s, dataptr, size, flags, to, tolen)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_socket(domain, type, protocol)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_write(s, dataptr, size)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_writev(s, iov, iovcnt)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_select(maxfdp1, readset, writeset, exceptset, timeout)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_poll(fds, nfds, timeout)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_ioctl(s, cmd, argp)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_fcntl(s, cmd, val)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_inet_pton(af, src, dst)
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
Return value: see the SDK header
lwip_inet_ntop(af, src, dst, size)
Convert an IP address structure to a string (lwIP)
Return value: see the SDK header
Have questions?
For any other questions, visit the unified Q&A and discussion board: Ai-Thinker Discussions

