TuyaOS
|
Common process 更多...
结构体 | |
struct | PROBE_REQUEST_FIX_S |
类型定义 | |
typedef unsigned char | BC_DA_CHAN_T |
typedef struct WLAN_FRAME_S * | P_WLAN_FRAME_S |
枚举 | |
enum | MIMO_TYPE_E { MIMO_TYPE_NORMAL = 0 , MIMO_TYPE_HT40 , MIMO_TYPE_2X2 , MIMO_TYPE_LDPC , MIMO_TYPE_NUM } |
enum | WLAN_FRM_TP_E { WFT_PROBE_REQ = 0x40 , WFT_PROBE_RSP = 0x50 , WFT_AUTH = 0xB0 , WFT_BEACON = 0x80 , WFT_DATA = 0x08 , WFT_QOS_DATA = 0x88 , WFT_MIMO_DATA = 0xff } |
函数 | |
OPERATE_RET | tal_fast_station_connect (FAST_CONNECTED_INFO_T *fast_ap_info) |
: fast connect 更多... | |
OPERATE_RET | tal_wifi_all_ap_scan (AP_IF_S **ap_ary, UINT_T *num) |
scan current environment and obtain all the ap infos in current environment 更多... | |
OPERATE_RET | tal_wifi_ap_start (WF_AP_CFG_IF_S *cfg) |
start a soft ap 更多... | |
OPERATE_RET | tal_wifi_ap_stop (VOID_T) |
stop a soft ap 更多... | |
OPERATE_RET | tal_wifi_assign_ap_scan (SCHAR_T *ssid, AP_IF_S **ap) |
scan current environment and obtain the specific ap info. 更多... | |
OPERATE_RET | tal_wifi_get_bssid (UCHAR_T *mac) |
get wifi bssid 更多... | |
OPERATE_RET | tal_wifi_get_connected_ap_info (FAST_CONNECTED_INFO_T **fast_ap_info) |
: get ap info for fast connect 更多... | |
OPERATE_RET | tal_wifi_get_cur_channel (UCHAR_T *chan) |
get wifi interface work channel 更多... | |
OPERATE_RET | tal_wifi_get_ip (WF_IF_E wf, NW_IP_S *ip) |
get wifi ip info.when wifi works in ap+station mode, wifi has two ips. 更多... | |
OPERATE_RET | tal_wifi_get_ipv6 (WF_IF_E wf, NW_IP_TYPE type, NW_IP_S *ip) |
OPERATE_RET | tal_wifi_get_last_disconnect_reason (WF_IF_E wf, WF_DISCONN_REASON_E *reason) |
wifi get last disconnect reason 更多... | |
OPERATE_RET | tal_wifi_get_mac (WF_IF_E wf, NW_MAC_S *mac) |
get wifi mac info.when wifi works in ap+station mode, wifi has two macs. 更多... | |
OPERATE_RET | tal_wifi_get_work_mode (WF_WK_MD_E *mode) |
get wifi work mode 更多... | |
OPERATE_RET | tal_wifi_init (WIFI_EVENT_CB cb) |
set wifi station event changed callback 更多... | |
OPERATE_RET | tal_wifi_ioctl (WF_IOCTL_CMD_E cmd, VOID *args) |
wifi ioctl 更多... | |
OPERATE_RET | tal_wifi_lp_disable (VOID_T) |
disable wifi lowpower 更多... | |
OPERATE_RET | tal_wifi_lp_enable (VOID_T) |
enable wifi lowpower 更多... | |
OPERATE_RET | tal_wifi_register_recv_mgnt_callback (BOOL_T enable, WIFI_REV_MGNT_CB recv_cb) |
register receive wifi management callback 更多... | |
OPERATE_RET | tal_wifi_release_ap (AP_IF_S *ap) |
release the memory malloced in <tuya_hal_wifi_all_ap_scan> and <tuya_hal_wifi_assign_ap_scan> if needed. tuya-sdk will call this function when the ap info is no use. 更多... | |
BOOL_T | tal_wifi_rf_calibrated (VOID_T) |
do wifi calibration 更多... | |
OPERATE_RET | tal_wifi_send_mgnt (UCHAR_T *buf, UINT_T len) |
send wifi management 更多... | |
OPERATE_RET | tal_wifi_set_country_code (CHAR_T *country_code) |
set wifi country code 更多... | |
OPERATE_RET | tal_wifi_set_cur_channel (UCHAR_T chan) |
set wifi interface work channel 更多... | |
VOID_T | tal_wifi_set_lps_dtim (UINT_T dtim) |
set the wifi low power dtim. 更多... | |
OPERATE_RET | tal_wifi_set_mac (WF_IF_E wf, NW_MAC_S *mac) |
set wifi mac info.when wifi works in ap+station mode, wifi has two macs. 更多... | |
OPERATE_RET | tal_wifi_set_work_mode (WF_WK_MD_E mode) |
set wifi work mode 更多... | |
OPERATE_RET | tal_wifi_sniffer_set (BOOL_T en, SNIFFER_CALLBACK cb) |
enable / disable wifi sniffer mode. if wifi sniffer mode is enabled, wifi recv from packages from the air, and user shoud send these packages to tuya-sdk with callback <cb>. 更多... | |
OPERATE_RET | tal_wifi_station_connect (SCHAR_T *ssid, SCHAR_T *passwd) |
connect wifi with ssid and passwd 更多... | |
OPERATE_RET | tal_wifi_station_connect_with_channel (SCHAR_T *ssid, SCHAR_T *passwd, UINT8_T channel) |
connect wifi with ssid,passwd,channel 更多... | |
OPERATE_RET | tal_wifi_station_disconnect (VOID_T) |
disconnect wifi from connect ap 更多... | |
OPERATE_RET | tal_wifi_station_get_conn_ap_rssi (SCHAR_T *rssi) |
get wifi connect rssi 更多... | |
OPERATE_RET | tal_wifi_station_get_err_stat (WF_STATION_STAT_E *stat) |
get wifi error station work status 更多... | |
OPERATE_RET | tal_wifi_station_get_status (WF_STATION_STAT_E *stat) |
get wifi station work status 更多... | |
Common process
enum WLAN_FRM_TP_E |
OPERATE_RET tal_fast_station_connect | ( | FAST_CONNECTED_INFO_T * | fast_ap_info | ) |
: fast connect
[in] | fast_ap_info |
OPERATE_RET tal_wifi_all_ap_scan | ( | AP_IF_S ** | ap_ary, |
UINT_T * | num | ||
) |
scan current environment and obtain all the ap infos in current environment
[out] | ap_ary | current ap info array |
[out] | num | the num of ar_ary |
OPERATE_RET tal_wifi_ap_start | ( | WF_AP_CFG_IF_S * | cfg | ) |
start a soft ap
[in] | cfg | the soft ap config |
OPERATE_RET tal_wifi_ap_stop | ( | VOID_T | ) |
stop a soft ap
OPERATE_RET tal_wifi_assign_ap_scan | ( | SCHAR_T * | ssid, |
AP_IF_S ** | ap | ||
) |
scan current environment and obtain the specific ap info.
[in] | ssid | the specific ssid |
[out] | ap | the ap info |
OPERATE_RET tal_wifi_get_bssid | ( | UCHAR_T * | mac | ) |
get wifi bssid
[out] | mac | uplink mac |
OPERATE_RET tal_wifi_get_connected_ap_info | ( | FAST_CONNECTED_INFO_T ** | fast_ap_info | ) |
: get ap info for fast connect
[out] | fast_ap_info |
OPERATE_RET tal_wifi_get_cur_channel | ( | UCHAR_T * | chan | ) |
get wifi interface work channel
[out] | chan | the channel wifi works |
OPERATE_RET tal_wifi_get_ip | ( | WF_IF_E | wf, |
NW_IP_S * | ip | ||
) |
get wifi ip info.when wifi works in ap+station mode, wifi has two ips.
[in] | wf | wifi function type |
[out] | ip | the ip addr info |
OPERATE_RET tal_wifi_get_last_disconnect_reason | ( | WF_IF_E | wf, |
WF_DISCONN_REASON_E * | reason | ||
) |
wifi get last disconnect reason
[in] | wf | wifi function type |
[out] | reason | reason code of wifi last disconnect |
OPERATE_RET tal_wifi_get_mac | ( | WF_IF_E | wf, |
NW_MAC_S * | mac | ||
) |
get wifi mac info.when wifi works in ap+station mode, wifi has two macs.
[in] | wf | wifi function type |
[out] | mac | the mac info |
OPERATE_RET tal_wifi_get_work_mode | ( | WF_WK_MD_E * | mode | ) |
get wifi work mode
[out] | mode | wifi work mode |
OPERATE_RET tal_wifi_init | ( | WIFI_EVENT_CB | cb | ) |
set wifi station event changed callback
[in] | cb | the wifi station event changed callback |
OPERATE_RET tal_wifi_ioctl | ( | WF_IOCTL_CMD_E | cmd, |
VOID * | args | ||
) |
wifi ioctl
[in] | cmd | refer to WF_IOCTL_CMD_E |
[in] | args | args associated with the command |
OPERATE_RET tal_wifi_lp_disable | ( | VOID_T | ) |
disable wifi lowpower
[in] | none |
OPERATE_RET tal_wifi_lp_enable | ( | VOID_T | ) |
enable wifi lowpower
[in] | none |
OPERATE_RET tal_wifi_register_recv_mgnt_callback | ( | BOOL_T | enable, |
WIFI_REV_MGNT_CB | recv_cb | ||
) |
register receive wifi management callback
[in] | enable | |
[in] | recv_cb | receive callback |
OPERATE_RET tal_wifi_release_ap | ( | AP_IF_S * | ap | ) |
release the memory malloced in <tuya_hal_wifi_all_ap_scan> and <tuya_hal_wifi_assign_ap_scan> if needed. tuya-sdk will call this function when the ap info is no use.
[in] | ap | the ap info |
BOOL_T tal_wifi_rf_calibrated | ( | VOID_T | ) |
do wifi calibration
OPERATE_RET tal_wifi_send_mgnt | ( | UCHAR_T * | buf, |
UINT_T | len | ||
) |
send wifi management
[in] | buf | pointer to buffer |
[in] | len | length of buffer |
OPERATE_RET tal_wifi_set_country_code | ( | CHAR_T * | country_code | ) |
set wifi country code
[in] | ccode | country code |
OPERATE_RET tal_wifi_set_cur_channel | ( | UCHAR_T | chan | ) |
set wifi interface work channel
[in] | chan | the channel to set |
VOID_T tal_wifi_set_lps_dtim | ( | UINT_T | dtim | ) |
set the wifi low power dtim.
OPERATE_RET tal_wifi_set_mac | ( | WF_IF_E | wf, |
NW_MAC_S * | mac | ||
) |
set wifi mac info.when wifi works in ap+station mode, wifi has two macs.
[in] | wf | wifi function type |
[in] | mac | the mac info |
OPERATE_RET tal_wifi_set_work_mode | ( | WF_WK_MD_E | mode | ) |
set wifi work mode
[in] | mode | wifi work mode |
OPERATE_RET tal_wifi_sniffer_set | ( | BOOL_T | en, |
SNIFFER_CALLBACK | cb | ||
) |
enable / disable wifi sniffer mode. if wifi sniffer mode is enabled, wifi recv from packages from the air, and user shoud send these packages to tuya-sdk with callback <cb>.
[in] | en | enable or disable |
[in] | cb | notify callback |
OPERATE_RET tal_wifi_station_connect | ( | SCHAR_T * | ssid, |
SCHAR_T * | passwd | ||
) |
connect wifi with ssid and passwd
[in] | ssid | |
[in] | passwd |
OPERATE_RET tal_wifi_station_connect_with_channel | ( | SCHAR_T * | ssid, |
SCHAR_T * | passwd, | ||
UINT8_T | channel | ||
) |
connect wifi with ssid,passwd,channel
[in] | ssid | |
[in] | passwd | |
[in] | channel |
OPERATE_RET tal_wifi_station_disconnect | ( | VOID_T | ) |
disconnect wifi from connect ap
OPERATE_RET tal_wifi_station_get_conn_ap_rssi | ( | SCHAR_T * | rssi | ) |
get wifi connect rssi
[out] | rssi | the return rssi |
OPERATE_RET tal_wifi_station_get_err_stat | ( | WF_STATION_STAT_E * | stat | ) |
get wifi error station work status
[out] | stat | the wifi station work status |
OPERATE_RET tal_wifi_station_get_status | ( | WF_STATION_STAT_E * | stat | ) |
get wifi station work status
[out] | stat | the wifi station work status |