main代码
- #include <FreeRTOS.h>
- #include <task.h>
- #include <stdio.h>
- #include <string.h>
- #include "blog.h"
- #include <aos/yloop.h>
- #include <aos/kernel.h>
- #include <lwip/tcpip.h>
- #include <wifi_mgmr_ext.h>
- #include <hal_wifi.h>
- #include "smartconfig.h"
- #include "sc_wifi_mgr.h"
- #include "timers.h"
- #include "queue.h"
- #include <lwip/netdb.h>
- #include <utils_log.h>
- #include "WifiConfig_hal_sys_api.h"
- #include "bl60x_fw_api.h"
- #include "at_airkiss.h"
- #include <stdint.h>
- #include <cli.h>
- #include <hosal_uart.h>
- #include "timers.h"
- wifi_evt_cb wificonfigTmpCallBack=NULL;
- typedef enum{
- smartconfig,
- airkiss,
- }wifi_network_configuration_mode;
- wifi_network_configuration_mode network_configuration_mode=smartconfig; //select network configuration mode you need
- static wifi_conf_t conf =
- {
- .country_code = "CN",
- };
- static AI_ConnectStatus g_WifiConnectStatus=AI_CONNECT_STATUS_DISCONNECT; //记录当前模组的STA的连接状态
- static void smart_airkiss_stop(void *data)
- {
- if(network_configuration_mode==smartconfig)
- {
- printf("stop smartconfig\r\n");
- wifi_smartconfig_v1_stop();
- }
- else if(network_configuration_mode==airkiss)
- {
- printf("stop airkiss\r\n");
- wifi_airkiss_v1_stop();
- }
- }
- static void event_cb_wifi_event(input_event_t* event, void* private_data)
- {
- switch (event->code){
- case CODE_WIFI_ON_INIT_DONE: //wif初始化完毕
- {
- wifi_mgmr_start_background(&conf);
- g_WifiConnectStatus=AI_CONNECT_STATUS_DISCONNECT;
- printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_INIT_DONE\r\n");
- }
- break;
- case CODE_WIFI_ON_MGMR_DONE:
- {
- /*************start smartconfig or airkiss*************/
- if(network_configuration_mode==smartconfig)
- {
- printf("start smartconfig\r\n");
- wifi_smartconfig_v1_start();
- }
- else if(network_configuration_mode==airkiss)
- {
- printf("start airkiss\r\n");
- wifi_airkiss_v1_start();
- }
- }
- break;
- case CODE_WIFI_ON_SCAN_DONE: //wifi扫描完成事件
- {
- printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_SCAN_DONE SCAN Result: %s\r\n",__func__,__LINE__, WIFI_SCAN_DONE_EVENT_OK == event->value ? "OK" : "Busy now");
- }
- break;
- case CODE_WIFI_ON_DISCONNECT: //wifi断开事件s
- {
- printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: %s\r\n",__func__,__LINE__, wifi_mgmr_status_code_str(event->value), event->value);
- if (event->value == WLAN_FW_4WAY_HANDSHAKE_ERROR_PSK_TIMEOUT_FAILURE ||
- event->value == WLAN_FW_AUTH_OR_ASSOC_RESPONSE_TIMEOUT_FAILURE){
- //连接超时
- g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECT_TIMEOUT;
- printf("[%s()-%d][WIFI] [EVT] wifi connect timeout\r\n",__func__,__LINE__);
- }else if (event->value == WLAN_FW_4WAY_HANDSHAKE_TX_DEAUTH_FRAME_TRANSMIT_FAILURE ||
- event->value == WLAN_FW_4WAY_HANDSHAKE_TX_DEAUTH_FRAME_ALLOCATE_FAIILURE ||
- event->value == WLAN_FW_DEAUTH_BY_AP_WHEN_NOT_CONNECTION){
- //密码错误
- g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECT_PW_ERROR;
- printf("[%s()-%d][WIFI] [EVT] password error\r\n",__func__,__LINE__);
- }else if (event->value == WLAN_FW_SCAN_NO_BSSID_AND_CHANNEL){
- //没有发现热点
- g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECT_NOT_FOUND_AP;
- printf("[%s()-%d][WIFI] [EVT] not found AP\r\n",__func__,__LINE__);
- }else if ((event->value == WLAN_FW_DEAUTH_BY_AP_WHEN_CONNECTION) || (event->value == WLAN_FW_DISCONNECT_BY_USER_WITH_DEAUTH)){
- //WiFi断开
- printf("[%s()-%d][WIFI] [EVT] wifi disconnect\r\n",__func__,__LINE__);
- g_WifiConnectStatus=AI_CONNECT_STATUS_DISCONNECT;
- }else{
- //连接失败
- g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECT_FAIL;
- printf("[%s()-%d][WIFI] [EVT]connect error\r\n",__func__,__LINE__);
- }
- }
- break;
- case CODE_WIFI_ON_CONNECTING: //wifi 连接中
- {
- g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECTING;
- printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_CONNECTING\r\n",__func__,__LINE__);
- }
- break;
- case CODE_WIFI_CMD_RECONNECT:
- {
- printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT\r\n",__func__,__LINE__);
- }
- break;
- case CODE_WIFI_ON_CONNECTED: //WIFI连接成功
- {
- g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECTED;
- printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_CONNECTED\r\n",__func__,__LINE__);
- }
- break;
- case CODE_WIFI_ON_GOT_IP: //STA获取了DHCP IP
- {
- printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_GOT_IP\r\n",__func__,__LINE__);
- /******************************printf wifi info if you need****************************************
- wifi_mgmr_sta_connect_ind_stat_info_t wifi_info;
- wifi_mgmr_sta_connect_ind_stat_get(&wifi_info);
- printf("wifi_info:ssid:%s,password:%s\r\n",wifi_info.ssid,wifi_info.passphr);
- **************************************************************************************************/
- struct timer_adpt *timer=bl_os_timer_create(smart_airkiss_stop,NULL);
- uint32_t delay_ms=2000;
- bl_os_timer_start_once(timer,(delay_ms / 1000),((delay_ms % 1000) * 1e6));
- }
- break;
- default:
- {
- printf("[%s()-%d][WIFI] [EVT] Unknown code %u\r\n",__func__,__LINE__,event->code);
- /*nothing*/
- }
- break;
- }
- if(NULL!=wificonfigTmpCallBack){ //WIFI 配网的事件回调函数
- wificonfigTmpCallBack(event->code, event->value);
- }
- }
- static void proc_main_entry(void* pvParameters)
- {
- aos_register_event_filter(EV_WIFI, event_cb_wifi_event, NULL);
- hal_wifi_start_firmware_task();
- aos_post_event(EV_WIFI, CODE_WIFI_ON_INIT_DONE, 0);
- vTaskDelete(NULL);
- }
- uint8_t USART0_Init(void)
- {
- hosal_uart_dev_t uart_dev_log = {
- .config = {
- .uart_id = 0,
- .tx_pin = 16, // TXD GPIO
- .rx_pin = 7, // RXD GPIO
- .cts_pin = 255,
- .rts_pin = 255,
- .baud_rate = 115200,
- .data_width = HOSAL_DATA_WIDTH_8BIT,
- .parity = HOSAL_NO_PARITY,
- .stop_bits = HOSAL_STOP_BITS_1,
- .mode = HOSAL_UART_MODE_POLL,
- },
- };
- /* Uart init device */
- hosal_uart_init(&uart_dev_log);
- blog_info("Uart Demo Start");
- return 0;
- }
- void main()
- {
- USART0_Init();
- puts("[OS] Starting TCP/IP Stack...");
- tcpip_init(NULL, NULL);
- puts("[OS] proc_main_entry task...");
- xTaskCreate(proc_main_entry, (char*)"main_entry", 1024, NULL, 15, NULL);
- }
复制代码 日志
- [OS] Starting aos_loop_proc task...
- [OS] Starting OS Scheduler...
- [32mINFO (5)[main.c: 220] Uart Demo Start[0m
- [OS] Starting TCP/IP Stack...-------------------->>>>>>>> LWIP tcp_port 63034
- [OS] proc_main_entry task...1th channel,lo_vco_freq_cw=145
- 2th channel,lo_vco_freq_cw=144
- 3th channel,lo_vco_freq_cw=143
- 4th channel,lo_vco_freq_cw=141
- 5th channel,lo_vco_freq_cw=140
- 6th channel,lo_vco_freq_cw=139
- 7th channel,lo_vco_freq_cw=138
- 8th channel,lo_vco_freq_cw=137
- 9th channel,lo_vco_freq_cw=135
- 10th channel,lo_vco_freq_cw=134
- 11th channel,lo_vco_freq_cw=133
- 12th channel,lo_vco_freq_cw=132
- 13th channel,lo_vco_freq_cw=131
- 14th channel,lo_vco_freq_cw=129
- 15th channel,lo_vco_freq_cw=128
- 16th channel,lo_vco_freq_cw=127
- 17th channel,lo_vco_freq_cw=126
- 18th channel,lo_vco_freq_cw=125
- 19th channel,lo_vco_freq_cw=123
- 20th channel,lo_vco_freq_cw=122
- 21th channel,lo_vco_freq_cw=121
- 0th channel,vco_idac_cw=10
- 1th channel,vco_idac_cw=10
- 2th channel,vco_idac_cw=10
- 3th channel,vco_idac_cw=9
- 4th channel,vco_idac_cw=9
- 5th channel,vco_idac_cw=9
- 6th channel,vco_idac_cw=9
- 7th channel,vco_idac_cw=9
- 8th channel,vco_idac_cw=9
- 9th channel,vco_idac_cw=9
- 10th channel,vco_idac_cw=9
- 11th channel,vco_idac_cw=9
- 12th channel,vco_idac_cw=9
- 13th channel,vco_idac_cw=9
- 14th channel,vco_idac_cw=9
- 15th channel,vco_idac_cw=9
- 16th channel,vco_idac_cw=8
- 17th channel,vco_idac_cw=8
- 18th channel,vco_idac_cw=8
- 19th channel,vco_idac_cw=8
- 20th channel,vco_idac_cw=8
- LO locked 9 135
- rosdac_i_gc3=37
- rosdac_i_gc2=37
- rosdac_i_gc1=37
- rosdac_i_gc0=37
- rosdac_q_gc3=31
- rosdac_q_gc2=31
- rosdac_q_gc1=31
- rosdac_q_gc0=31
- rbb_cap1_fc_i=29,rbb_cap2_fc_i=29,rbb_cap1_fc_q=28,rbb_cap2_fc_q=28
- new rbb_cap1_fc_i=53,rbb_cap2_fc_i=53,rbb_cap1_fc_q=53,rbb_cap2_fc_q=53
- LO locked 9 135
- amp=128,step=32,adc_mean_i=70
- amp=160,step=16,adc_mean_i=108
- tmx_cs=0, tmxcs_pwr_avg=20504, tmxcs_pwr_avg>>10=20
- tmx_cs=1, tmxcs_pwr_avg=31675, tmxcs_pwr_avg>>10=30
- tmx_cs=2, tmxcs_pwr_avg=48905, tmxcs_pwr_avg>>10=47
- tmx_cs=3, tmxcs_pwr_avg=72181, tmxcs_pwr_avg>>10=70
- tmx_cs=4, tmxcs_pwr_avg=97167, tmxcs_pwr_avg>>10=94
- tmx_cs=5, tmxcs_pwr_avg=110023, tmxcs_pwr_avg>>10=107
- tmx_cs=6, tmxcs_pwr_avg=97071, tmxcs_pwr_avg>>10=94
- tmx_cs=7, tmxcs_pwr_avg=71650, tmxcs_pwr_avg>>10=69
- tmx_cs_max=5, tmxcs_pwr_max=110023, tmxcs_pwr_max>>10=107
- amp=256,step=64,adc_mean_i=160
- amp=320,step=32,adc_mean_i=314
- tosdac_i=29,tosdac_q=30,tx_iq_gain_comp=1028,tx_iq_phase_comp=-10
- tosdac_i=32,tosdac_q=31,tx_iq_gain_comp=1026,tx_iq_phase_comp=-11
- tosdac_i=29,tosdac_q=31,tx_iq_gain_comp=1021,tx_iq_phase_comp=-9
- tosdac_i=26,tosdac_q=31,tx_iq_gain_comp=1013,tx_iq_phase_comp=-12
- tosdac_i=27,tosdac_q=29,tx_iq_gain_comp=1015,tx_iq_phase_comp=-10
- tosdac_i=29,tosdac_q=26,tx_iq_gain_comp=1012,tx_iq_phase_comp=-12
- tosdac_i=28,tosdac_q=35,tx_iq_gain_comp=1006,tx_iq_phase_comp=-13
- tosdac_i=27,tosdac_q=35,tx_iq_gain_comp=1002,tx_iq_phase_comp=-12
- [WF] [KEY] [CFG] nVAP is 2, endidx 12, startidx 8
- td_init
- td_reset idx=0
- td_reset idx=1
- [BL] Initi Wi-Fi with MAC #### 00:00:00:00:00:00 ####
- hostname: Bouffalolab_BL602-000000
- [WF] country code CN used, num of channel 13
- -----------------------------------------------------
- [IPC] [TX] Low level size 204, driver size 100, total size 304
- Enable BMX IRQ
- [WF] [KEY] [CFG] nVAP is 2, endidx 12, startidx 8
- td_init
- td_reset idx=0
- td_reset idx=1
- [version] lmac 5.4.0.0
- [version] version_machw_1 000055FB
- [version] version_machw_2 000001B3
- [version] version_phy_1 00822111
- [version] version_phy_2 00000000
- [version] features 001089DF
- [ME] HT supp 1, VHT supp 0
- [WF][SM] reload tsen
- [WF][SM] Exiting ifaceDown state
- [WF][SM] State Action ###ifaceDown### --->>> ###idle###
- [WF][SM] Entering idle state
- [()-10][WIFI] [EVT] CODE_WIFI_ON_INIT_DONE
- start smartconfig
- [axk_hal_wifi_mode_set()-137]mode=1 auto_conn=0
- ------>>>>>> Scan CMD
- [09:28:20.489]收←◆[WIFI] [IND] SCAN Done
- wifi_mgmr_scan_complete_callback: scan complete
- sc scan complete:2
- [SC] scan finish
- [WF][SM] Exiting idle state
- [WF][SM] State Action ###idle### --->>> ###sniffer###
- [WF][SM] Entering sniffer state
- set channel 11, 40Mhz 1
- [SC] Unknown code 2
- [event_cb_wifi_event()-116][WIFI] [EVT] CODE_WIFI_ON_SCAN_DONE SCAN Result: OK
- [SC] Unknown code 9
- [09:28:20.657]收←◆set channel 1, 40Mhz 1
- [09:28:20.728]收←◆[SC]new channel:1
- [09:28:20.807]收←◆set channel 11, 40Mhz 1
- [09:28:20.957]收←◆set channel 1, 40Mhz 1
- [09:28:21.107]收←◆set channel 11, 40Mhz 1
- [09:28:21.258]收←◆set channel 1, 40Mhz 1
- [09:28:21.407]收←◆set channel 11, 40Mhz 1
- [09:28:21.557]收←◆set channel 1, 40Mhz 1
- [09:28:21.708]收←◆set channel 11, 40Mhz 1
- [09:28:21.857]收←◆set channel 1, 40Mhz 1
- [09:28:22.008]收←◆set channel 11, 40Mhz 1
- [SC]new channel:11
- [09:28:22.157]收←◆set channel 1, 40Mhz 1
- [09:28:22.181]收←◆[SC]new channel:1
- [09:28:22.308]收←◆set channel 11, 40Mhz 1
- [09:28:22.451]收←◆[SC]new channel:11
- set channel 1, 40Mhz 1
- [09:28:22.607]收←◆set channel 11, 40Mhz 1
- [09:28:22.758]收←◆set channel 1, 40Mhz 1
- [SC]new channel:1
- [09:28:22.907]收←◆set channel 11, 40Mhz 1
- [09:28:23.057]收←◆set channel 1, 40Mhz 1
- [09:28:23.207]收←◆set channel 11, 40Mhz 1
- [09:28:23.358]收←◆set channel 1, 40Mhz 1
- [09:28:23.507]收←◆set channel 11, 40Mhz 1
- [09:28:23.657]收←◆set channel 1, 40Mhz 1
- [09:28:23.807]收←◆set channel 11, 40Mhz 1
- [09:28:23.957]收←◆set channel 1, 40Mhz 1
- [09:28:24.107]收←◆set channel 11, 40Mhz 1
- [09:28:24.257]收←◆set channel 1, 40Mhz 1
- [09:28:24.407]收←◆set channel 11, 40Mhz 1
- [09:28:24.557]收←◆set channel 1, 40Mhz 1
- [09:28:24.707]收←◆set channel 11, 40Mhz 1
- [09:28:24.858]收←◆set channel 1, 40Mhz 1
- [09:28:25.007]收←◆set channel 11, 40Mhz 1
- [09:28:25.157]收←◆set channel 1, 40Mhz 1
- [09:28:25.307]收←◆set channel 11, 40Mhz 1
- [09:28:25.457]收←◆set channel 1, 40Mhz 1
- [09:28:25.607]收←◆set channel 11, 40Mhz 1
- [09:28:25.757]收←◆set channel 1, 40Mhz 1
- [09:28:25.907]收←◆set channel 11, 40Mhz 1
- [09:28:26.057]收←◆set channel 1, 40Mhz 1
- [09:28:26.206]收←◆set channel 11, 40Mhz 1
- [09:28:26.357]收←◆set channel 1, 40Mhz 1
- [09:28:26.506]收←◆set channel 11, 40Mhz 1
- [09:28:26.657]收←◆set channel 1, 40Mhz 1
- [09:28:26.807]收←◆set channel 11, 40Mhz 1
- [09:28:26.957]收←◆set channel 1, 40Mhz 1
- [09:28:27.106]收←◆set channel 11, 40Mhz 1
- [09:28:27.257]收←◆set channel 1, 40Mhz 1
- [09:28:27.407]收←◆set channel 11, 40Mhz 1
- [09:28:27.469]收←◆[SC]new channel:11
- [R][T] push 593 317d
- [R][F] push 591 317d
- [R][T] push 592 317d
- [R][F] push 590 317d
- [R][T] push 591 317d
- [R][F] push 589 317d
- [SC] source:54:71:dd:5d:7d:31
- [SC] bssid:22:32:4b:3b:d7:9b
- [SC][10282] lock type: type:0 offset:78
- [R][T] push 590 317d
- [SC][10288] lock type: type:1 offset:76
- [R][F] push 588 317d
- [09:28:29.513]收←◆[R][T] crc data:41 100 66
- [R][T] data:41-100-66 data:16 index:0
- [R][F] fr crc data:41 100 66
- [R][F] data:41-100-66 data:16 index:0
- [R][T] crc data:e0 101 c9
- [R][T] data:e0-101-c9 data:09 index:1
- [R][F] fr crc data:e0 101 c9
- [R][F] data:e0-101-c9 data:09 index:1
- [R][T] crc data:1b 102 46
- [R][T] data:1b-102-46 data:b6 index:2
- [R][F] fr crc data:1b 102 46
- [R][F] data:1b-102-46 data:b6 index:2
- [R][T] crc data:bb 103 53
- [R][T] data:bb-103-53 data:b3 index:3
- [R][F] fr crc data:bb 103 53
- [R][F] data:bb-103-53 data:b3 index:3
- [R][T] crc data:fb 104 22
- [R][T] data:fb-104-22 data:b2 index:4
- [R][F] fr crc data:fb 104 22
- [R][F] data:fb-104-22 data:b2 index:4
- [R][T] crc data:12 116 02
- [R][T] data:12-116-02 data:22 index:22
- [R][F] fr crc data:12 116 8c
- [R][T] crc data:8c 105 b0
- [R][T] data:8c-105-b0 data:c0 index:5
- [R][F] fr crc data:8c 105 b0
- [R][F] data:8c-105-b0 data:c0 index:5
- [R][T] crc data:4a 106 58
- [R][T] data:4a-106-58 data:a8 index:6
- [R][F] fr crc data:4a 106 58
- [R][F] data:4a-106-58 data:a8 index:6
- [R][T] crc data:18 107 e9
- [R][T] data:18-107-e9 data:89 index:7
- [R][F] fr crc data:18 107 e9
- [R][F] data:18-107-e9 data:89 index:7
- [R][T] crc data:a3 117 22
- [R][T] data:a3-117-22 data:32 index:23
- [R][F] fr crc data:a3 117 22
- [R][F] data:a3-117-22 data:32 index:23
- [R][T] crc data:46 108 4e
- [R][T] data:46-108-4e data:6e index:8
- [R][F] fr crc data:46 108 4e
- [R][F] data:46-108-4e data:6e index:8
- [R][T] crc data:73 109 51
- [R][T] data:73-109-51 data:31 index:9
- [R][F] fr crc data:73 109 51
- [R][F] data:73-109-51 data:31 index:9
- [R][T] crc data:c3 10a 22
- [R][T] data:c3-10a-22 data:32 index:10
- [R][F] fr crc data:c3 10a 22
- [R][F] data:c3-10a-22 data:32 index:10
- [R][T] crc data:e4 118 7b
- [R][T] data:e4-118-7b data:4b index:24
- [R][F] fr crc data:e4 118 7b
- [R][F] data:e4-118-7b data:4b index:24
- [R][T] crc data:53 10b 83
- [R][T] data:53-10b-83 data:33 index:11
- [R][F] fr crc data:53 10b 83
- [R][F] data:53-10b-83 data:33 index:11
- [R][T] crc data:b3 10c 54
- [R][T] data:b3-10c-54 data:34 index:12
- [R][F] fr crc data:b3 10c 54
- [R][F] data:b3-10c-54 data:34 index:12
- [R][T] crc data:23 10d f5
- [R][T] data:23-10d-f5 data:35 index:13
- [R][F] fr crc data:23 10d f5
- [R][F] data:23-10d-f5 data:35 index:13
- [R][T] crc data:03 119 fb
- [R][T] data:03-119-fb data:3b index:25
- [R][F] fr crc data:03 119 fb
- [R][F] data:03-119-fb data:3b index:25
- [R][T] crc data:93 10e 86
- [R][T] data:93-10e-86 data:36 index:14
- [R][F] fr crc data:93 10e 86
- [R][F] data:93-10e-86 data:36 index:14
- [R][T] crc data:03 10f 27
- [R][T] data:03-10f-27 data:37 index:15
- [R][F] fr crc data:03 10f 27
- [R][F] data:03-10f-27 data:37 index:15
- [R][T] crc data:c3 110 68
- [R][T] data:c3-110-68 data:38 index:16
- [R][F] fr crc data:c3 110 68
- [R][F] data:c3-110-68 data:38 index:16
- [R][T] crc data:dd 11a 57
- [R][T] data:dd-11a-57 data:d7 index:26
- [R][F] fr crc data:dd 11a 57
- [R][F] data:dd-11a-57 data:d7 index:26
- [R][T] crc data:53 111 c9
- [R][T] data:53-111-c9 data:39 index:17
- [12858] recv data
- 0x16 0x09 0xb6 0xb3 0xb2 0xc0 0xa8 0x89 0x6e 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39
- ap info:
- ip:192.168.137.110
- pwd:123456789
- ssid:qiao
- bssid:22:32:4b:3b:d7:9b
- Smart get wifi info
- ssid:qiao
- password:123456789
- ak_wifi_connetct:ssid=qiao pwd=123456789
- ---------STA enable
- [lwip] netif status callback
- IP: 0.0.0.0
- MK: 0.0.0.0
- GW: 0.0.0.0
- [WF][SM] Exiting sniffer state
- [WF][SM] State Action ###sniffer### --->>> ###idle###
- [WF][SM] Entering idle state
- [WF][SM] currentState is idle
- [WF] MM_ADD_IF_REQ Sending: STA
- td_start idx=0
- [WF] MM_ADD_IF_REQ Done
- [WF] vif_index from LAMC is 0
- [WF][SM] Exiting idle state
- [WF][SM] Action Connect
- ssid qiao
- ssid len 4
- passphr 123456789
- passphr len 9
- psk
- psk len 0
- band 0
- freq 0
- bssid 00:00:00:00:00:00
- dhcp status: true
- flags: 0
- [WF][PF] Adding and Using profile, idx is @0
- [WF][SM] State Action ###idle### --->>> ###connecting###
- connecting using vif_idx 0
- ===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = -1
- ===end sm_get_bss_params===
- [WF][SM] Entering connecting state
- [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
- [SC] Unknown code 8
- [09:28:33.073]收←◆===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = 0
- ===end sm_get_bss_params===
- --- OPT rxu_mgmt_ind is detected
- [09:28:36.233]收←◆ind ix 0x4201eac4, chan_ctxt is 0x42015350
- connect failure, ssid = qiao, index = 0
- from sm_connect_ind to scanu_rm_exist_ssid
- [RX] Connection Status
- [RX] status_code 11
- [RX] reason_code 65535
- [RX] connect result: auth or associate frame response timeout failure
- [RX] MAC 22:32:4B:3B:D7:9B
- [RX] vif_idx 0
- [RX] ap_idx 0
- [RX] ch_idx 0
- [RX] qos 1
- [RX] acm 0
- [RX] assoc_req_ie_len 0
- [RX] assoc_rsp_ie_len 0
- [RX] aid 0
- [RX] band 0
- [RX] center_freq 2462
- [RX] width 0
- [RX] center_freq1 2462
- [RX] center_freq2 0
- [RX] tlv_ptr first 0x00000000
- [WF][SM] Exiting connecting state
- [WF][SM] State Action ###connecting### --->>> ###disconnect###
- [WF][SM] Entering disconnect state
- [WF][SM] Will retry connect after 2 seconds ...
- [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
- [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
- [SC] disconn, value:11
- [09:28:38.292]收←◆[WF][PF] Getting profile by index, idx is @0
- [WF][SM] Retry Again --->>> retry connect
- [WF][SM] Exiting disconnect state
- Delete Timer.
- [WF][SM] State Action ###disconnect### --->>> ###connecting###
- [WF][SM] Action Connect
- ssid qiao
- ssid len 4
- passphr 123456789
- passphr len 9
- psk
- psk len 0
- band 0
- freq 0
- bssid 00:00:00:00:00:00
- dhcp status: true
- flags: 0
- connecting using vif_idx 0
- ===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = -1
- ===end sm_get_bss_params===
- [WF][SM] Entering connecting state
- [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
- [SC] Unknown code 3
- [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
- [SC] Unknown code 8
- [09:28:41.245]收←◆===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = 0
- ===end sm_get_bss_params===
- --- OPT rxu_mgmt_ind is detected
- [09:28:44.404]收←◆ind ix 0x4201e914, chan_ctxt is 0x42015370
- connect failure, ssid = qiao, index = 0
- from sm_connect_ind to scanu_rm_exist_ssid
- [RX] Connection Status
- [RX] status_code 11
- [RX] reason_code 65535
- [RX] connect result: auth or associate frame response timeout failure
- [RX] MAC 22:32:4B:3B:D7:9B
- [RX] vif_idx 0
- [RX] ap_idx 1
- [RX] ch_idx 0
- [RX] qos 1
- [RX] acm 0
- [RX] assoc_req_ie_len 0
- [RX] assoc_rsp_ie_len 0
- [RX] aid 0
- [RX] band 0
- [RX] center_freq 2462
- [RX] width 0
- [RX] center_freq1 2462
- [RX] center_freq2 0
- [RX] tlv_ptr first 0x00000000
- [WF][SM] Exiting connecting state
- [WF][SM] State Action ###connecting### --->>> ###disconnect###
- [WF][SM] Entering disconnect state
- [WF][SM] Will retry connect after 2 seconds ...
- [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
- [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
- [SC] disconn, value:11
- [09:28:46.464]收←◆[WF][PF] Getting profile by index, idx is @0
- [WF][SM] Retry Again --->>> retry connect
- [WF][SM] Exiting disconnect state
- Delete Timer.
- [WF][SM] State Action ###disconnect### --->>> ###connecting###
- [WF][SM] Action Connect
- ssid qiao
- ssid len 4
- passphr 123456789
- passphr len 9
- psk
- psk len 0
- band 0
- freq 0
- bssid 00:00:00:00:00:00
- dhcp status: true
- flags: 0
- connecting using vif_idx 0
- ===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = -1
- ===end sm_get_bss_params===
- [WF][SM] Entering connecting state
- [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
- [SC] Unknown code 3
- [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
- [SC] Unknown code 8
- [09:28:49.418]收←◆===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = 0
- ===end sm_get_bss_params===
- --- OPT rxu_mgmt_ind is detected
- [09:28:52.577]收←◆ind ix 0x4201e914, chan_ctxt is 0x42015390
- connect failure, ssid = qiao, index = 0
- from sm_connect_ind to scanu_rm_exist_ssid
- [RX] Connection Status
- [RX] status_code 11
- [RX] reason_code 65535
- [RX] connect result: auth or associate frame response timeout failure
- [RX] MAC 22:32:4B:3B:D7:9B
- [RX] vif_idx 0
- [RX] ap_idx 2
- [RX] ch_idx 0
- [RX] qos 1
- [RX] acm 0
- [RX] assoc_req_ie_len 0
- [RX] assoc_rsp_ie_len 0
- [RX] aid 0
- [RX] band 0
- [RX] center_freq 2462
- [RX] width 0
- [RX] center_freq1 2462
- [RX] center_freq2 0
- [RX] tlv_ptr first 0x00000000
- [WF][SM] Exiting connecting state
- [WF][SM] State Action ###connecting### --->>> ###disconnect###
- [WF][SM] Entering disconnect state
- [WF][SM] Will retry connect after 2 seconds ...
- [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
- [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
- [SC] disconn, value:11
- [09:28:54.637]收←◆[WF][PF] Getting profile by index, idx is @0
- [WF][SM] Retry Again --->>> retry connect
- [WF][SM] Exiting disconnect state
- Delete Timer.
- [WF][SM] State Action ###disconnect### --->>> ###connecting###
- [WF][SM] Action Connect
- ssid qiao
- ssid len 4
- passphr 123456789
- passphr len 9
- psk
- psk len 0
- band 0
- freq 0
- bssid 00:00:00:00:00:00
- dhcp status: true
- flags: 0
- connecting using vif_idx 0
- ===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = -1
- ===end sm_get_bss_params===
- [WF][SM] Entering connecting state
- [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
- [SC] Unknown code 3
- [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
- [SC] Unknown code 8
- [09:28:57.590]收←◆===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = 0
- ===end sm_get_bss_params===
- --- OPT rxu_mgmt_ind is detected
- [09:29:00.750]收←◆ind ix 0x4201e914, chan_ctxt is 0x42015350
- connect failure, ssid = qiao, index = 0
- from sm_connect_ind to scanu_rm_exist_ssid
- [RX] Connection Status
- [RX] status_code 11
- [RX] reason_code 65535
- [RX] connect result: auth or associate frame response timeout failure
- [RX] MAC 22:32:4B:3B:D7:9B
- [RX] vif_idx 0
- [RX] ap_idx 3
- [RX] ch_idx 0
- [RX] qos 1
- [RX] acm 0
- [RX] assoc_req_ie_len 0
- [RX] assoc_rsp_ie_len 0
- [RX] aid 0
- [RX] band 0
- [RX] center_freq 2462
- [RX] width 0
- [RX] center_freq1 2462
- [RX] center_freq2 0
- [RX] tlv_ptr first 0x00000000
- [WF][SM] Exiting connecting state
- [WF][SM] State Action ###connecting### --->>> ###disconnect###
- [WF][SM] Entering disconnect state
- [WF][SM] Will retry connect after 2 seconds ...
- [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
- [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
- [SC] disconn, value:11
- [09:29:02.809]收←◆[WF][PF] Getting profile by index, idx is @0
- [WF][SM] Retry Again --->>> retry connect
- [WF][SM] Exiting disconnect state
- Delete Timer.
- [WF][SM] State Action ###disconnect### --->>> ###connecting###
- [WF][SM] Action Connect
- ssid qiao
- ssid len 4
- passphr 123456789
- passphr len 9
- psk
- psk len 0
- band 0
- freq 0
- bssid 00:00:00:00:00:00
- dhcp status: true
- flags: 0
- connecting using vif_idx 0
- ===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = -1
- ===end sm_get_bss_params===
- [WF][SM] Entering connecting state
- [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
- [SC] Unknown code 3
- [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
- [SC] Unknown code 8
- [09:29:05.762]收←◆===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = 0
- ===end sm_get_bss_params===
- --- OPT rxu_mgmt_ind is detected
- [09:29:08.922]收←◆ind ix 0x4201e914, chan_ctxt is 0x42015370
- connect failure, ssid = qiao, index = 0
- from sm_connect_ind to scanu_rm_exist_ssid
- [RX] Connection Status
- [RX] status_code 11
- [RX] reason_code 65535
- [RX] connect result: auth or associate frame response timeout failure
- [RX] MAC 22:32:4B:3B:D7:9B
- [RX] vif_idx 0
- [RX] ap_idx 4
- [RX] ch_idx 0
- [RX] qos 1
- [RX] acm 0
- [RX] assoc_req_ie_len 0
- [RX] assoc_rsp_ie_len 0
- [RX] aid 0
- [RX] band 0
- [RX] center_freq 2462
- [RX] width 0
- [RX] center_freq1 2462
- [RX] center_freq2 0
- [RX] tlv_ptr first 0x00000000
- [WF][SM] Exiting connecting state
- [WF][SM] State Action ###connecting### --->>> ###disconnect###
- [WF][SM] Entering disconnect state
- [WF][SM] Will retry connect after 2 seconds ...
- [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
- [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
- [SC] disconn, value:11
- [09:29:10.981]收←◆[WF][PF] Getting profile by index, idx is @0
- [WF][SM] Retry Again --->>> retry connect
- [WF][SM] Exiting disconnect state
- Delete Timer.
- [WF][SM] State Action ###disconnect### --->>> ###connecting###
- [WF][SM] Action Connect
- ssid qiao
- ssid len 4
- passphr 123456789
- passphr len 9
- psk
- psk len 0
- band 0
- freq 0
- bssid 00:00:00:00:00:00
- dhcp status: true
- flags: 0
- connecting using vif_idx 0
- ===start sm_get_bss_params===
- bssid[0] = 0xffff
- bssid[1] = 0xffff
- bssid[2] = 0xffff
- search ssid = qiao
- result ssid index = -1
- ===end sm_get_bss_params===
- [WF][SM] Entering connecting state
- [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
- [SC] Unknown code 3
- [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
- [SC] Unknown code 8
复制代码 看日志应该是WIFI信息已经传输给模组了,但是不知道为什么模组一直连接失败。
|