天嵌二次封装库使用手册  V2.1.2
tq_wifi.h
浏览该文件的文档.
1 
7 #ifndef LINUX_LIBV2_SOURCE_WIFI_TQ_WIFI_H_
8 #define LINUX_LIBV2_SOURCE_WIFI_TQ_WIFI_H_
9 
10 // Copyright 2024 广东省天嵌嵌入式技术股份有限公司
11 
12 #include <libhardware.h>
13 
14 #ifdef __cplusplus
15 #define WIFI_API extern "C"
16 #else
17 #define WIFI_API
18 #endif
19 
25  WIFI_API struct WIFI *tq_init_wifi();
30  WIFI_API void tq_release_wifi(struct WIFI *wifi);
41  WIFI_API int tq_Extract_information(char *src, char *dest, char *key, int dest_size);
51  WIFI_API int tq_send_command(struct wpa_ctrl *ctrl, char *cmd);
59  WIFI_API int tq_scan(struct wpa_ctrl *ctrl);
69  WIFI_API int tq_scan_result(struct wpa_ctrl *ctrl, struct WIFI *wifi, int index);
80  WIFI_API int tq_connect_wifi(struct wpa_ctrl *ctrl, char *ssid, char *passwork);
91  WIFI_API int tq_get_wifi_status_value(struct wpa_ctrl *ctrl, char *key, char *dest, int dest_size);
97  WIFI_API int tq_get_wifi_rssi(struct wpa_ctrl *ctrl);
105  WIFI_API int tq_disconnect_wifi(struct wpa_ctrl *ctrl);
113  WIFI_API int tq_reconnect_wifi(struct wpa_ctrl *ctrl);
114 
115  WIFI_API void tq_display_wifi(struct WIFI *wifi);
116 
117 #endif //TQ_WIFI_H
WIFI_API int tq_get_wifi_rssi(struct wpa_ctrl *ctrl)
获取已连接的wifi的信号强度
用来存放一个WIFI的基本参数
Definition: lib_wifi.h:27
#define WIFI_API
Definition: tq_wifi.h:17
WIFI_API int tq_send_command(struct wpa_ctrl *ctrl, char *cmd)
用于发送只返回OK,FAIL的指令
WIFI_API struct WIFI * tq_init_wifi()
初始化WIFI结构体
WIFI_API int tq_reconnect_wifi(struct wpa_ctrl *ctrl)
开启WIFI使能
控制接口库的内部结构
Definition: wpa_ctrl.h:38
WIFI_API int tq_disconnect_wifi(struct wpa_ctrl *ctrl)
关闭WIFI使能
WIFI_API int tq_scan_result(struct wpa_ctrl *ctrl, struct WIFI *wifi, int index)
获取WIFI扫描结果
WIFI_API int tq_scan(struct wpa_ctrl *ctrl)
扫描WIFI列表
WIFI_API void tq_display_wifi(struct WIFI *wifi)
char * ssid
wifi名称
Definition: lib_wifi.h:30
WIFI_API void tq_release_wifi(struct WIFI *wifi)
释放WIFI指针
WIFI_API int tq_get_wifi_status_value(struct wpa_ctrl *ctrl, char *key, char *dest, int dest_size)
通过"STATUS"指令,获取所需参数。
WIFI_API int tq_connect_wifi(struct wpa_ctrl *ctrl, char *ssid, char *passwork)
连接wifi
WIFI_API int tq_Extract_information(char *src, char *dest, char *key, int dest_size)
提取特定类型的字符串