20 #include <sys/ioctl.h> 21 #include <netinet/in.h> int get_wifi_status_value(struct wpa_ctrl *ctrl, char *key, char *dest, int dest_size)
通过"STATUS"指令,获取所需参数。
char * ssid
wifi名称
Definition: tq_wifi.h:35
void release_wifi(struct WIFI *wifi)
释放WIFI指针
int connect_wifi(struct wpa_ctrl *ctrl, char *ssid, char *passwork)
连接wifi
用来存放一个WIFI的基本参数
Definition: tq_wifi.h:32
int scan(struct wpa_ctrl *ctrl)
扫描WIFI列表
int frequency
频率
Definition: tq_wifi.h:37
int scan_result(struct wpa_ctrl *ctrl, struct WIFI *wifi, int index)
获取WIFI扫描结果
char * flag
标志位
Definition: tq_wifi.h:39
const int IP_SIZE
IP地址长度
Definition: tq_wifi.h:23
char * bssid
MAC地址
Definition: tq_wifi.h:36
int send_command(struct wpa_ctrl *ctrl, char *cmd)
用于发送只返回OK,FAIL的指令
int reconnect_wifi(struct wpa_ctrl *ctrl)
开启WIFI使能
控制接口库的内部结构
Definition: wpa_ctrl.h:38
int Extract_information(char *src, char *dest, char *key, int dest_size)
提取特定类型的字符串
struct WIFI * init_wifi()
初始化WIFI结构体
int disconnect_wifi(struct wpa_ctrl *ctrl)
关闭WIFI使能
int signalLevel
信号强度
Definition: tq_wifi.h:38
int get_wifi_rssi(struct wpa_ctrl *ctrl)
获取已连接的wifi的信号强度