| #include "sta_cli.h" |
| #include "lynq_wifi.h" |
| |
| #include <stdio.h> |
| #include <stdlib.h> |
| |
| |
| |
| |
| #define MAX_LEN 15 |
| |
| |
| void lynq_wifi_event_handle_sta_demo(lynq_wifi_sta_scan_list_t *event) |
| { |
| int i = 0; |
| for (i = 0; i < event->cnt; i++) |
| { |
| printf("[lynq-wifi-demo] %s : ap[%d]:%s,%d,%d,%d,%s,%d,%d,%d\n", __func__, i, |
| event->info[i].essid, event->info[i].auth, |
| event->info[i].cipher, event->info[i].channel, event->info[i].bssid, |
| event->info[i].signal_level,event->info[i].frequency,event->info[i].signal); |
| } |
| } |
| |
| |
| |
| int main(int argc, char const *argv[]) |
| { |
| lynq_wifi_sta_param_t sta_param; |
| lynq_wifi_sta_status_t sta_status; |
| |
| qser_wifi_enable(); |
| qser_wifi_sta_param_get(&sta_param); |
| qser_wifi_register_handle(NULL, lynq_wifi_event_handle_sta_demo, NULL); |
| qser_wifi_sta_start_scan(); |
| qser_wifi_sta_start(); |
| qser_wifi_sta_get_status(&sta_status); |
| |
| |
| // qser_wifi_sta_stop(); |
| |
| // qser_wifi_disable(); |
| |
| //qser_wifi_sta_param_get(&sta_param); |
| /* |
| strcpy(sta_param.ssid, "test"); |
| strcpy(sta_param.passwd, "123456"); |
| printf("test111"); |
| qser_wifi_sta_param_set(&sta_param); |
| */ |
| |
| |
| |
| return 0; |
| } |