b.liu | 68a94c9 | 2025-05-24 12:53:41 +0800 | [diff] [blame^] | 1 | #include "sta_cli.h" |
| 2 | #include "lynq_wifi.h" |
| 3 | |
| 4 | #include <stdio.h> |
| 5 | #include <stdlib.h> |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | #define MAX_LEN 15 |
| 11 | |
| 12 | |
| 13 | void lynq_wifi_event_handle_sta_demo(lynq_wifi_sta_scan_list_t *event) |
| 14 | { |
| 15 | int i = 0; |
| 16 | for (i = 0; i < event->cnt; i++) |
| 17 | { |
| 18 | printf("[lynq-wifi-demo] %s : ap[%d]:%s,%d,%d,%d,%s,%d,%d,%d\n", __func__, i, |
| 19 | event->info[i].essid, event->info[i].auth, |
| 20 | event->info[i].cipher, event->info[i].channel, event->info[i].bssid, |
| 21 | event->info[i].signal_level,event->info[i].frequency,event->info[i].signal); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | |
| 26 | |
| 27 | int main(int argc, char const *argv[]) |
| 28 | { |
| 29 | lynq_wifi_sta_param_t sta_param; |
| 30 | lynq_wifi_sta_status_t sta_status; |
| 31 | |
| 32 | qser_wifi_enable(); |
| 33 | qser_wifi_sta_param_get(&sta_param); |
| 34 | qser_wifi_register_handle(NULL, lynq_wifi_event_handle_sta_demo, NULL); |
| 35 | qser_wifi_sta_start_scan(); |
| 36 | qser_wifi_sta_start(); |
| 37 | qser_wifi_sta_get_status(&sta_status); |
| 38 | |
| 39 | |
| 40 | // qser_wifi_sta_stop(); |
| 41 | |
| 42 | // qser_wifi_disable(); |
| 43 | |
| 44 | //qser_wifi_sta_param_get(&sta_param); |
| 45 | /* |
| 46 | strcpy(sta_param.ssid, "test"); |
| 47 | strcpy(sta_param.passwd, "123456"); |
| 48 | printf("test111"); |
| 49 | qser_wifi_sta_param_set(&sta_param); |
| 50 | */ |
| 51 | |
| 52 | |
| 53 | |
| 54 | return 0; |
| 55 | } |