smartconfig配网失败,问题是出在哪呢

[复制链接]
查看572 | 回复3 | 2024-11-7 09:49:55 | 显示全部楼层 |阅读模式
main代码
  1. #include <FreeRTOS.h>
  2. #include <task.h>
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include "blog.h"
  6. #include <aos/yloop.h>
  7. #include <aos/kernel.h>
  8. #include <lwip/tcpip.h>
  9. #include <wifi_mgmr_ext.h>
  10. #include <hal_wifi.h>
  11. #include "smartconfig.h"
  12. #include "sc_wifi_mgr.h"
  13. #include "timers.h"
  14. #include "queue.h"
  15. #include <lwip/netdb.h>
  16. #include <utils_log.h>
  17. #include "WifiConfig_hal_sys_api.h"
  18. #include "bl60x_fw_api.h"
  19. #include "at_airkiss.h"
  20. #include <stdint.h>
  21. #include <cli.h>
  22. #include <hosal_uart.h>
  23. #include "timers.h"

  24. wifi_evt_cb wificonfigTmpCallBack=NULL;

  25. typedef enum{
  26.         smartconfig,
  27.         airkiss,
  28. }wifi_network_configuration_mode;

  29. wifi_network_configuration_mode network_configuration_mode=smartconfig;                //select network configuration mode you need

  30. static wifi_conf_t conf =
  31. {
  32.     .country_code = "CN",
  33. };

  34. static AI_ConnectStatus g_WifiConnectStatus=AI_CONNECT_STATUS_DISCONNECT;        //记录当前模组的STA的连接状态


  35. static void smart_airkiss_stop(void *data)
  36. {
  37.         if(network_configuration_mode==smartconfig)
  38.         {
  39.                 printf("stop smartconfig\r\n");
  40.                 wifi_smartconfig_v1_stop();
  41.         }
  42.         else if(network_configuration_mode==airkiss)
  43.         {
  44.                 printf("stop airkiss\r\n");
  45.                 wifi_airkiss_v1_stop();
  46.         }
  47. }


  48. static void event_cb_wifi_event(input_event_t* event, void* private_data)
  49. {
  50.         switch (event->code){
  51.                 case CODE_WIFI_ON_INIT_DONE:        //wif初始化完毕
  52.                         {
  53.                                 wifi_mgmr_start_background(&conf);
  54.                                 g_WifiConnectStatus=AI_CONNECT_STATUS_DISCONNECT;
  55.                 printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_INIT_DONE\r\n");
  56.                         }
  57.                         break;
  58.                 case CODE_WIFI_ON_MGMR_DONE:
  59.                         {
  60.                                 /*************start smartconfig or airkiss*************/
  61.                                 if(network_configuration_mode==smartconfig)
  62.                                 {
  63.                                         printf("start smartconfig\r\n");
  64.                                         wifi_smartconfig_v1_start();
  65.                                 }
  66.                                 else if(network_configuration_mode==airkiss)
  67.                                 {
  68.                                         printf("start airkiss\r\n");
  69.                                         wifi_airkiss_v1_start();
  70.                                 }

  71.                         }
  72.                         break;
  73.                 case CODE_WIFI_ON_SCAN_DONE:        //wifi扫描完成事件
  74.                         {
  75.                                 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");
  76.                         }
  77.                         break;
  78.                 case CODE_WIFI_ON_DISCONNECT:        //wifi断开事件s
  79.                         {
  80.                 printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: %s\r\n",__func__,__LINE__, wifi_mgmr_status_code_str(event->value), event->value);
  81.                                 if (event->value == WLAN_FW_4WAY_HANDSHAKE_ERROR_PSK_TIMEOUT_FAILURE ||
  82.                                                 event->value == WLAN_FW_AUTH_OR_ASSOC_RESPONSE_TIMEOUT_FAILURE){
  83.                                         //连接超时
  84.                                         g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECT_TIMEOUT;
  85.                     printf("[%s()-%d][WIFI] [EVT] wifi connect timeout\r\n",__func__,__LINE__);
  86.                                 }else if (event->value == WLAN_FW_4WAY_HANDSHAKE_TX_DEAUTH_FRAME_TRANSMIT_FAILURE ||
  87.                                                 event->value == WLAN_FW_4WAY_HANDSHAKE_TX_DEAUTH_FRAME_ALLOCATE_FAIILURE ||
  88.                                                 event->value == WLAN_FW_DEAUTH_BY_AP_WHEN_NOT_CONNECTION){
  89.                                         //密码错误
  90.                                         g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECT_PW_ERROR;
  91.                     printf("[%s()-%d][WIFI] [EVT] password error\r\n",__func__,__LINE__);
  92.                                 }else if (event->value == WLAN_FW_SCAN_NO_BSSID_AND_CHANNEL){
  93.                                         //没有发现热点
  94.                                         g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECT_NOT_FOUND_AP;
  95.                     printf("[%s()-%d][WIFI] [EVT] not found AP\r\n",__func__,__LINE__);
  96.                                 }else if ((event->value == WLAN_FW_DEAUTH_BY_AP_WHEN_CONNECTION) || (event->value == WLAN_FW_DISCONNECT_BY_USER_WITH_DEAUTH)){
  97.                                         //WiFi断开
  98.                     printf("[%s()-%d][WIFI] [EVT] wifi disconnect\r\n",__func__,__LINE__);
  99.                                         g_WifiConnectStatus=AI_CONNECT_STATUS_DISCONNECT;
  100.                                 }else{
  101.                                         //连接失败
  102.                                         g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECT_FAIL;
  103.                     printf("[%s()-%d][WIFI] [EVT]connect error\r\n",__func__,__LINE__);
  104.                                 }
  105.                         }
  106.                         break;
  107.                 case CODE_WIFI_ON_CONNECTING:        //wifi 连接中
  108.                         {
  109.                                 g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECTING;
  110.                 printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_CONNECTING\r\n",__func__,__LINE__);
  111.                         }
  112.                         break;
  113.                 case CODE_WIFI_CMD_RECONNECT:
  114.                         {
  115.                                 printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT\r\n",__func__,__LINE__);
  116.                         }
  117.                         break;
  118.                 case CODE_WIFI_ON_CONNECTED:        //WIFI连接成功
  119.                         {
  120.                                 g_WifiConnectStatus=AI_CONNECT_STATUS_CONNECTED;
  121.                                 printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_CONNECTED\r\n",__func__,__LINE__);
  122.                         }
  123.                         break;


  124.                 case CODE_WIFI_ON_GOT_IP:        //STA获取了DHCP IP
  125.                         {
  126.                                 printf("[%s()-%d][WIFI] [EVT] CODE_WIFI_ON_GOT_IP\r\n",__func__,__LINE__);

  127.                                 /******************************printf wifi info if you need****************************************
  128.                                 wifi_mgmr_sta_connect_ind_stat_info_t wifi_info;
  129.                                 wifi_mgmr_sta_connect_ind_stat_get(&wifi_info);
  130.                                 printf("wifi_info:ssid:%s,password:%s\r\n",wifi_info.ssid,wifi_info.passphr);
  131.                                 **************************************************************************************************/

  132.                                 struct timer_adpt *timer=bl_os_timer_create(smart_airkiss_stop,NULL);
  133.                             uint32_t delay_ms=2000;
  134.                             bl_os_timer_start_once(timer,(delay_ms / 1000),((delay_ms % 1000) * 1e6));
  135.                         }
  136.                         break;
  137.                 default:
  138.                         {
  139.                                 printf("[%s()-%d][WIFI] [EVT] Unknown code %u\r\n",__func__,__LINE__,event->code);
  140.                                 /*nothing*/
  141.                         }
  142.                         break;
  143.     }
  144.         if(NULL!=wificonfigTmpCallBack){        //WIFI 配网的事件回调函数
  145.                 wificonfigTmpCallBack(event->code, event->value);
  146.         }
  147. }

  148. static void proc_main_entry(void* pvParameters)
  149. {
  150.     aos_register_event_filter(EV_WIFI, event_cb_wifi_event, NULL);
  151.     hal_wifi_start_firmware_task();
  152.     aos_post_event(EV_WIFI, CODE_WIFI_ON_INIT_DONE, 0);
  153.     vTaskDelete(NULL);
  154. }

  155. uint8_t USART0_Init(void)
  156. {
  157.     hosal_uart_dev_t uart_dev_log = {
  158.         .config = {
  159.             .uart_id = 0,
  160.             .tx_pin = 16, // TXD GPIO
  161.             .rx_pin = 7,  // RXD GPIO
  162.             .cts_pin = 255,
  163.             .rts_pin = 255,
  164.             .baud_rate = 115200,
  165.             .data_width = HOSAL_DATA_WIDTH_8BIT,
  166.             .parity = HOSAL_NO_PARITY,
  167.             .stop_bits = HOSAL_STOP_BITS_1,
  168.             .mode = HOSAL_UART_MODE_POLL,
  169.         },
  170.     };
  171.     /* Uart init device */
  172.     hosal_uart_init(&uart_dev_log);
  173.     blog_info("Uart Demo Start");

  174.   return 0;
  175. }

  176. void main()
  177. {
  178.         USART0_Init();
  179.     puts("[OS] Starting TCP/IP Stack...");
  180.     tcpip_init(NULL, NULL);
  181.     puts("[OS] proc_main_entry task...");
  182.     xTaskCreate(proc_main_entry, (char*)"main_entry", 1024, NULL, 15, NULL);
  183. }
复制代码
日志
  1. [OS] Starting aos_loop_proc task...
  2. [OS] Starting OS Scheduler...
  3. INFO (5)[main.c: 220] Uart Demo Start
  4. [OS] Starting TCP/IP Stack...-------------------->>>>>>>> LWIP tcp_port 63034
  5. [OS] proc_main_entry task...1th channel,lo_vco_freq_cw=145
  6. 2th channel,lo_vco_freq_cw=144
  7. 3th channel,lo_vco_freq_cw=143
  8. 4th channel,lo_vco_freq_cw=141
  9. 5th channel,lo_vco_freq_cw=140
  10. 6th channel,lo_vco_freq_cw=139
  11. 7th channel,lo_vco_freq_cw=138
  12. 8th channel,lo_vco_freq_cw=137
  13. 9th channel,lo_vco_freq_cw=135
  14. 10th channel,lo_vco_freq_cw=134
  15. 11th channel,lo_vco_freq_cw=133
  16. 12th channel,lo_vco_freq_cw=132
  17. 13th channel,lo_vco_freq_cw=131
  18. 14th channel,lo_vco_freq_cw=129
  19. 15th channel,lo_vco_freq_cw=128
  20. 16th channel,lo_vco_freq_cw=127
  21. 17th channel,lo_vco_freq_cw=126
  22. 18th channel,lo_vco_freq_cw=125
  23. 19th channel,lo_vco_freq_cw=123
  24. 20th channel,lo_vco_freq_cw=122
  25. 21th channel,lo_vco_freq_cw=121
  26. 0th channel,vco_idac_cw=10
  27. 1th channel,vco_idac_cw=10
  28. 2th channel,vco_idac_cw=10
  29. 3th channel,vco_idac_cw=9
  30. 4th channel,vco_idac_cw=9
  31. 5th channel,vco_idac_cw=9
  32. 6th channel,vco_idac_cw=9
  33. 7th channel,vco_idac_cw=9
  34. 8th channel,vco_idac_cw=9
  35. 9th channel,vco_idac_cw=9
  36. 10th channel,vco_idac_cw=9
  37. 11th channel,vco_idac_cw=9
  38. 12th channel,vco_idac_cw=9
  39. 13th channel,vco_idac_cw=9
  40. 14th channel,vco_idac_cw=9
  41. 15th channel,vco_idac_cw=9
  42. 16th channel,vco_idac_cw=8
  43. 17th channel,vco_idac_cw=8
  44. 18th channel,vco_idac_cw=8
  45. 19th channel,vco_idac_cw=8
  46. 20th channel,vco_idac_cw=8
  47. LO locked 9 135
  48. rosdac_i_gc3=37
  49. rosdac_i_gc2=37
  50. rosdac_i_gc1=37
  51. rosdac_i_gc0=37
  52. rosdac_q_gc3=31
  53. rosdac_q_gc2=31
  54. rosdac_q_gc1=31
  55. rosdac_q_gc0=31
  56. rbb_cap1_fc_i=29,rbb_cap2_fc_i=29,rbb_cap1_fc_q=28,rbb_cap2_fc_q=28
  57. new rbb_cap1_fc_i=53,rbb_cap2_fc_i=53,rbb_cap1_fc_q=53,rbb_cap2_fc_q=53
  58. LO locked 9 135
  59. amp=128,step=32,adc_mean_i=70
  60. amp=160,step=16,adc_mean_i=108
  61. tmx_cs=0, tmxcs_pwr_avg=20504, tmxcs_pwr_avg>>10=20
  62. tmx_cs=1, tmxcs_pwr_avg=31675, tmxcs_pwr_avg>>10=30
  63. tmx_cs=2, tmxcs_pwr_avg=48905, tmxcs_pwr_avg>>10=47
  64. tmx_cs=3, tmxcs_pwr_avg=72181, tmxcs_pwr_avg>>10=70
  65. tmx_cs=4, tmxcs_pwr_avg=97167, tmxcs_pwr_avg>>10=94
  66. tmx_cs=5, tmxcs_pwr_avg=110023, tmxcs_pwr_avg>>10=107
  67. tmx_cs=6, tmxcs_pwr_avg=97071, tmxcs_pwr_avg>>10=94
  68. tmx_cs=7, tmxcs_pwr_avg=71650, tmxcs_pwr_avg>>10=69
  69. tmx_cs_max=5, tmxcs_pwr_max=110023, tmxcs_pwr_max>>10=107
  70. amp=256,step=64,adc_mean_i=160
  71. amp=320,step=32,adc_mean_i=314
  72. tosdac_i=29,tosdac_q=30,tx_iq_gain_comp=1028,tx_iq_phase_comp=-10
  73. tosdac_i=32,tosdac_q=31,tx_iq_gain_comp=1026,tx_iq_phase_comp=-11
  74. tosdac_i=29,tosdac_q=31,tx_iq_gain_comp=1021,tx_iq_phase_comp=-9
  75. tosdac_i=26,tosdac_q=31,tx_iq_gain_comp=1013,tx_iq_phase_comp=-12
  76. tosdac_i=27,tosdac_q=29,tx_iq_gain_comp=1015,tx_iq_phase_comp=-10
  77. tosdac_i=29,tosdac_q=26,tx_iq_gain_comp=1012,tx_iq_phase_comp=-12
  78. tosdac_i=28,tosdac_q=35,tx_iq_gain_comp=1006,tx_iq_phase_comp=-13
  79. tosdac_i=27,tosdac_q=35,tx_iq_gain_comp=1002,tx_iq_phase_comp=-12
  80. [WF] [KEY] [CFG] nVAP is 2, endidx 12, startidx 8
  81. td_init
  82. td_reset idx=0
  83. td_reset idx=1


  84. [BL] Initi Wi-Fi with MAC #### 00:00:00:00:00:00 ####
  85.      hostname: Bouffalolab_BL602-000000
  86. [WF] country code CN used, num of channel 13
  87. -----------------------------------------------------
  88. [IPC] [TX] Low level size 204, driver size 100, total size 304
  89. Enable BMX IRQ
  90. [WF] [KEY] [CFG] nVAP is 2, endidx 12, startidx 8
  91. td_init
  92. td_reset idx=0
  93. td_reset idx=1
  94. [version] lmac 5.4.0.0
  95. [version] version_machw_1 000055FB
  96. [version] version_machw_2 000001B3
  97. [version] version_phy_1 00822111
  98. [version] version_phy_2 00000000
  99. [version] features 001089DF
  100. [ME] HT supp 1, VHT supp 0
  101. [WF][SM] reload tsen
  102. [WF][SM] Exiting ifaceDown state
  103. [WF][SM] State Action ###ifaceDown### --->>> ###idle###
  104. [WF][SM] Entering idle state
  105. [()-10][WIFI] [EVT] CODE_WIFI_ON_INIT_DONE
  106. start smartconfig
  107. [axk_hal_wifi_mode_set()-137]mode=1 auto_conn=0
  108. ------>>>>>> Scan CMD

  109. [09:28:20.489]收←◆[WIFI] [IND] SCAN Done
  110. wifi_mgmr_scan_complete_callback: scan complete
  111. sc scan complete:2
  112. [SC] scan finish
  113. [WF][SM] Exiting idle state
  114. [WF][SM] State Action ###idle### --->>> ###sniffer###
  115. [WF][SM] Entering sniffer state
  116. set channel 11, 40Mhz 1
  117. [SC] Unknown code 2
  118. [event_cb_wifi_event()-116][WIFI] [EVT] CODE_WIFI_ON_SCAN_DONE  SCAN Result: OK
  119. [SC] Unknown code 9

  120. [09:28:20.657]收←◆set channel 1, 40Mhz 1

  121. [09:28:20.728]收←◆[SC]new channel:1

  122. [09:28:20.807]收←◆set channel 11, 40Mhz 1

  123. [09:28:20.957]收←◆set channel 1, 40Mhz 1

  124. [09:28:21.107]收←◆set channel 11, 40Mhz 1

  125. [09:28:21.258]收←◆set channel 1, 40Mhz 1

  126. [09:28:21.407]收←◆set channel 11, 40Mhz 1

  127. [09:28:21.557]收←◆set channel 1, 40Mhz 1

  128. [09:28:21.708]收←◆set channel 11, 40Mhz 1

  129. [09:28:21.857]收←◆set channel 1, 40Mhz 1

  130. [09:28:22.008]收←◆set channel 11, 40Mhz 1
  131. [SC]new channel:11

  132. [09:28:22.157]收←◆set channel 1, 40Mhz 1

  133. [09:28:22.181]收←◆[SC]new channel:1

  134. [09:28:22.308]收←◆set channel 11, 40Mhz 1

  135. [09:28:22.451]收←◆[SC]new channel:11
  136. set channel 1, 40Mhz 1

  137. [09:28:22.607]收←◆set channel 11, 40Mhz 1

  138. [09:28:22.758]收←◆set channel 1, 40Mhz 1
  139. [SC]new channel:1

  140. [09:28:22.907]收←◆set channel 11, 40Mhz 1

  141. [09:28:23.057]收←◆set channel 1, 40Mhz 1

  142. [09:28:23.207]收←◆set channel 11, 40Mhz 1

  143. [09:28:23.358]收←◆set channel 1, 40Mhz 1

  144. [09:28:23.507]收←◆set channel 11, 40Mhz 1

  145. [09:28:23.657]收←◆set channel 1, 40Mhz 1

  146. [09:28:23.807]收←◆set channel 11, 40Mhz 1

  147. [09:28:23.957]收←◆set channel 1, 40Mhz 1

  148. [09:28:24.107]收←◆set channel 11, 40Mhz 1

  149. [09:28:24.257]收←◆set channel 1, 40Mhz 1

  150. [09:28:24.407]收←◆set channel 11, 40Mhz 1

  151. [09:28:24.557]收←◆set channel 1, 40Mhz 1

  152. [09:28:24.707]收←◆set channel 11, 40Mhz 1

  153. [09:28:24.858]收←◆set channel 1, 40Mhz 1

  154. [09:28:25.007]收←◆set channel 11, 40Mhz 1

  155. [09:28:25.157]收←◆set channel 1, 40Mhz 1

  156. [09:28:25.307]收←◆set channel 11, 40Mhz 1

  157. [09:28:25.457]收←◆set channel 1, 40Mhz 1

  158. [09:28:25.607]收←◆set channel 11, 40Mhz 1

  159. [09:28:25.757]收←◆set channel 1, 40Mhz 1

  160. [09:28:25.907]收←◆set channel 11, 40Mhz 1

  161. [09:28:26.057]收←◆set channel 1, 40Mhz 1

  162. [09:28:26.206]收←◆set channel 11, 40Mhz 1

  163. [09:28:26.357]收←◆set channel 1, 40Mhz 1

  164. [09:28:26.506]收←◆set channel 11, 40Mhz 1

  165. [09:28:26.657]收←◆set channel 1, 40Mhz 1

  166. [09:28:26.807]收←◆set channel 11, 40Mhz 1

  167. [09:28:26.957]收←◆set channel 1, 40Mhz 1

  168. [09:28:27.106]收←◆set channel 11, 40Mhz 1

  169. [09:28:27.257]收←◆set channel 1, 40Mhz 1

  170. [09:28:27.407]收←◆set channel 11, 40Mhz 1

  171. [09:28:27.469]收←◆[SC]new channel:11
  172. [R][T] push 593 317d
  173. [R][F] push 591 317d
  174. [R][T] push 592 317d
  175. [R][F] push 590 317d
  176. [R][T] push 591 317d
  177. [R][F] push 589 317d
  178. [SC] source:54:71:dd:5d:7d:31
  179. [SC] bssid:22:32:4b:3b:d7:9b
  180. [SC][10282] lock type: type:0 offset:78
  181. [R][T] push 590 317d
  182. [SC][10288] lock type: type:1 offset:76
  183. [R][F] push 588 317d

  184. [09:28:29.513]收←◆[R][T] crc data:41 100 66
  185. [R][T] data:41-100-66 data:16 index:0
  186. [R][F] fr crc data:41 100 66
  187. [R][F] data:41-100-66 data:16 index:0
  188. [R][T] crc data:e0 101 c9
  189. [R][T] data:e0-101-c9 data:09 index:1
  190. [R][F] fr crc data:e0 101 c9
  191. [R][F] data:e0-101-c9 data:09 index:1
  192. [R][T] crc data:1b 102 46
  193. [R][T] data:1b-102-46 data:b6 index:2
  194. [R][F] fr crc data:1b 102 46
  195. [R][F] data:1b-102-46 data:b6 index:2
  196. [R][T] crc data:bb 103 53
  197. [R][T] data:bb-103-53 data:b3 index:3
  198. [R][F] fr crc data:bb 103 53
  199. [R][F] data:bb-103-53 data:b3 index:3
  200. [R][T] crc data:fb 104 22
  201. [R][T] data:fb-104-22 data:b2 index:4
  202. [R][F] fr crc data:fb 104 22
  203. [R][F] data:fb-104-22 data:b2 index:4
  204. [R][T] crc data:12 116 02
  205. [R][T] data:12-116-02 data:22 index:22
  206. [R][F] fr crc data:12 116 8c
  207. [R][T] crc data:8c 105 b0
  208. [R][T] data:8c-105-b0 data:c0 index:5
  209. [R][F] fr crc data:8c 105 b0
  210. [R][F] data:8c-105-b0 data:c0 index:5
  211. [R][T] crc data:4a 106 58
  212. [R][T] data:4a-106-58 data:a8 index:6
  213. [R][F] fr crc data:4a 106 58
  214. [R][F] data:4a-106-58 data:a8 index:6
  215. [R][T] crc data:18 107 e9
  216. [R][T] data:18-107-e9 data:89 index:7
  217. [R][F] fr crc data:18 107 e9
  218. [R][F] data:18-107-e9 data:89 index:7
  219. [R][T] crc data:a3 117 22
  220. [R][T] data:a3-117-22 data:32 index:23
  221. [R][F] fr crc data:a3 117 22
  222. [R][F] data:a3-117-22 data:32 index:23
  223. [R][T] crc data:46 108 4e
  224. [R][T] data:46-108-4e data:6e index:8
  225. [R][F] fr crc data:46 108 4e
  226. [R][F] data:46-108-4e data:6e index:8
  227. [R][T] crc data:73 109 51
  228. [R][T] data:73-109-51 data:31 index:9
  229. [R][F] fr crc data:73 109 51
  230. [R][F] data:73-109-51 data:31 index:9
  231. [R][T] crc data:c3 10a 22
  232. [R][T] data:c3-10a-22 data:32 index:10
  233. [R][F] fr crc data:c3 10a 22
  234. [R][F] data:c3-10a-22 data:32 index:10
  235. [R][T] crc data:e4 118 7b
  236. [R][T] data:e4-118-7b data:4b index:24
  237. [R][F] fr crc data:e4 118 7b
  238. [R][F] data:e4-118-7b data:4b index:24
  239. [R][T] crc data:53 10b 83
  240. [R][T] data:53-10b-83 data:33 index:11
  241. [R][F] fr crc data:53 10b 83
  242. [R][F] data:53-10b-83 data:33 index:11
  243. [R][T] crc data:b3 10c 54
  244. [R][T] data:b3-10c-54 data:34 index:12
  245. [R][F] fr crc data:b3 10c 54
  246. [R][F] data:b3-10c-54 data:34 index:12
  247. [R][T] crc data:23 10d f5
  248. [R][T] data:23-10d-f5 data:35 index:13
  249. [R][F] fr crc data:23 10d f5
  250. [R][F] data:23-10d-f5 data:35 index:13
  251. [R][T] crc data:03 119 fb
  252. [R][T] data:03-119-fb data:3b index:25
  253. [R][F] fr crc data:03 119 fb
  254. [R][F] data:03-119-fb data:3b index:25
  255. [R][T] crc data:93 10e 86
  256. [R][T] data:93-10e-86 data:36 index:14
  257. [R][F] fr crc data:93 10e 86
  258. [R][F] data:93-10e-86 data:36 index:14
  259. [R][T] crc data:03 10f 27
  260. [R][T] data:03-10f-27 data:37 index:15
  261. [R][F] fr crc data:03 10f 27
  262. [R][F] data:03-10f-27 data:37 index:15
  263. [R][T] crc data:c3 110 68
  264. [R][T] data:c3-110-68 data:38 index:16
  265. [R][F] fr crc data:c3 110 68
  266. [R][F] data:c3-110-68 data:38 index:16
  267. [R][T] crc data:dd 11a 57
  268. [R][T] data:dd-11a-57 data:d7 index:26
  269. [R][F] fr crc data:dd 11a 57
  270. [R][F] data:dd-11a-57 data:d7 index:26
  271. [R][T] crc data:53 111 c9
  272. [R][T] data:53-111-c9 data:39 index:17
  273. [12858] recv data
  274. 0x16 0x09 0xb6 0xb3 0xb2 0xc0 0xa8 0x89 0x6e 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39
  275. ap info:
  276. ip:192.168.137.110
  277. pwd:123456789
  278. ssid:qiao
  279. bssid:22:32:4b:3b:d7:9b
  280. Smart get wifi info
  281. ssid:qiao
  282. password:123456789
  283. ak_wifi_connetct:ssid=qiao pwd=123456789
  284. ---------STA enable
  285. [lwip] netif status callback
  286.   IP: 0.0.0.0
  287.   MK: 0.0.0.0
  288.   GW: 0.0.0.0
  289. [WF][SM] Exiting sniffer state
  290. [WF][SM] State Action ###sniffer### --->>> ###idle###
  291. [WF][SM] Entering idle state
  292. [WF][SM] currentState is idle
  293. [WF] MM_ADD_IF_REQ Sending: STA
  294. td_start idx=0
  295. [WF] MM_ADD_IF_REQ Done
  296. [WF] vif_index from LAMC is 0
  297. [WF][SM] Exiting idle state
  298. [WF][SM] Action Connect
  299.         ssid qiao
  300.         ssid len 4
  301.         passphr 123456789
  302.         passphr len 9
  303.         psk
  304.         psk len 0
  305.         band 0
  306.         freq 0
  307.         bssid 00:00:00:00:00:00
  308.         dhcp status: true
  309.         flags: 0
  310. [WF][PF] Adding and Using profile, idx is @0
  311. [WF][SM] State Action ###idle### --->>> ###connecting###
  312. connecting using vif_idx 0
  313. ===start sm_get_bss_params===
  314. bssid[0] = 0xffff
  315. bssid[1] = 0xffff
  316. bssid[2] = 0xffff
  317. search ssid = qiao
  318. result ssid index = -1
  319. ===end sm_get_bss_params===
  320. [WF][SM] Entering connecting state
  321. [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
  322. [SC] Unknown code 8

  323. [09:28:33.073]收←◆===start sm_get_bss_params===
  324. bssid[0] = 0xffff
  325. bssid[1] = 0xffff
  326. bssid[2] = 0xffff
  327. search ssid = qiao
  328. result ssid index = 0
  329. ===end sm_get_bss_params===
  330. --- OPT rxu_mgmt_ind is detected

  331. [09:28:36.233]收←◆ind ix 0x4201eac4, chan_ctxt is 0x42015350
  332. connect failure, ssid = qiao, index = 0
  333. from sm_connect_ind to scanu_rm_exist_ssid
  334. [RX] Connection Status
  335. [RX]   status_code 11
  336. [RX]   reason_code 65535
  337. [RX]   connect result: auth or associate frame response timeout failure
  338. [RX]   MAC 22:32:4B:3B:D7:9B
  339. [RX]   vif_idx 0
  340. [RX]   ap_idx 0
  341. [RX]   ch_idx 0
  342. [RX]   qos 1
  343. [RX]   acm 0
  344. [RX]   assoc_req_ie_len 0
  345. [RX]   assoc_rsp_ie_len 0
  346. [RX]   aid 0
  347. [RX]   band 0
  348. [RX]   center_freq 2462
  349. [RX]   width 0
  350. [RX]   center_freq1 2462
  351. [RX]   center_freq2 0
  352. [RX]   tlv_ptr first 0x00000000
  353. [WF][SM] Exiting connecting state
  354. [WF][SM] State Action ###connecting### --->>> ###disconnect###
  355. [WF][SM] Entering disconnect state
  356. [WF][SM] Will retry connect after 2 seconds ...
  357. [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
  358. [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
  359. [SC] disconn, value:11

  360. [09:28:38.292]收←◆[WF][PF] Getting profile by index, idx is @0
  361. [WF][SM] Retry Again --->>> retry connect
  362. [WF][SM] Exiting disconnect state
  363. Delete Timer.
  364. [WF][SM] State Action ###disconnect### --->>> ###connecting###
  365. [WF][SM] Action Connect
  366.         ssid qiao
  367.         ssid len 4
  368.         passphr 123456789
  369.         passphr len 9
  370.         psk
  371.         psk len 0
  372.         band 0
  373.         freq 0
  374.         bssid 00:00:00:00:00:00
  375.         dhcp status: true
  376.         flags: 0
  377. connecting using vif_idx 0
  378. ===start sm_get_bss_params===
  379. bssid[0] = 0xffff
  380. bssid[1] = 0xffff
  381. bssid[2] = 0xffff
  382. search ssid = qiao
  383. result ssid index = -1
  384. ===end sm_get_bss_params===
  385. [WF][SM] Entering connecting state
  386. [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
  387. [SC] Unknown code 3
  388. [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
  389. [SC] Unknown code 8

  390. [09:28:41.245]收←◆===start sm_get_bss_params===
  391. bssid[0] = 0xffff
  392. bssid[1] = 0xffff
  393. bssid[2] = 0xffff
  394. search ssid = qiao
  395. result ssid index = 0
  396. ===end sm_get_bss_params===
  397. --- OPT rxu_mgmt_ind is detected

  398. [09:28:44.404]收←◆ind ix 0x4201e914, chan_ctxt is 0x42015370
  399. connect failure, ssid = qiao, index = 0
  400. from sm_connect_ind to scanu_rm_exist_ssid
  401. [RX] Connection Status
  402. [RX]   status_code 11
  403. [RX]   reason_code 65535
  404. [RX]   connect result: auth or associate frame response timeout failure
  405. [RX]   MAC 22:32:4B:3B:D7:9B
  406. [RX]   vif_idx 0
  407. [RX]   ap_idx 1
  408. [RX]   ch_idx 0
  409. [RX]   qos 1
  410. [RX]   acm 0
  411. [RX]   assoc_req_ie_len 0
  412. [RX]   assoc_rsp_ie_len 0
  413. [RX]   aid 0
  414. [RX]   band 0
  415. [RX]   center_freq 2462
  416. [RX]   width 0
  417. [RX]   center_freq1 2462
  418. [RX]   center_freq2 0
  419. [RX]   tlv_ptr first 0x00000000
  420. [WF][SM] Exiting connecting state
  421. [WF][SM] State Action ###connecting### --->>> ###disconnect###
  422. [WF][SM] Entering disconnect state
  423. [WF][SM] Will retry connect after 2 seconds ...
  424. [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
  425. [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
  426. [SC] disconn, value:11

  427. [09:28:46.464]收←◆[WF][PF] Getting profile by index, idx is @0
  428. [WF][SM] Retry Again --->>> retry connect
  429. [WF][SM] Exiting disconnect state
  430. Delete Timer.
  431. [WF][SM] State Action ###disconnect### --->>> ###connecting###
  432. [WF][SM] Action Connect
  433.         ssid qiao
  434.         ssid len 4
  435.         passphr 123456789
  436.         passphr len 9
  437.         psk
  438.         psk len 0
  439.         band 0
  440.         freq 0
  441.         bssid 00:00:00:00:00:00
  442.         dhcp status: true
  443.         flags: 0
  444. connecting using vif_idx 0
  445. ===start sm_get_bss_params===
  446. bssid[0] = 0xffff
  447. bssid[1] = 0xffff
  448. bssid[2] = 0xffff
  449. search ssid = qiao
  450. result ssid index = -1
  451. ===end sm_get_bss_params===
  452. [WF][SM] Entering connecting state
  453. [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
  454. [SC] Unknown code 3
  455. [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
  456. [SC] Unknown code 8

  457. [09:28:49.418]收←◆===start sm_get_bss_params===
  458. bssid[0] = 0xffff
  459. bssid[1] = 0xffff
  460. bssid[2] = 0xffff
  461. search ssid = qiao
  462. result ssid index = 0
  463. ===end sm_get_bss_params===
  464. --- OPT rxu_mgmt_ind is detected

  465. [09:28:52.577]收←◆ind ix 0x4201e914, chan_ctxt is 0x42015390
  466. connect failure, ssid = qiao, index = 0
  467. from sm_connect_ind to scanu_rm_exist_ssid
  468. [RX] Connection Status
  469. [RX]   status_code 11
  470. [RX]   reason_code 65535
  471. [RX]   connect result: auth or associate frame response timeout failure
  472. [RX]   MAC 22:32:4B:3B:D7:9B
  473. [RX]   vif_idx 0
  474. [RX]   ap_idx 2
  475. [RX]   ch_idx 0
  476. [RX]   qos 1
  477. [RX]   acm 0
  478. [RX]   assoc_req_ie_len 0
  479. [RX]   assoc_rsp_ie_len 0
  480. [RX]   aid 0
  481. [RX]   band 0
  482. [RX]   center_freq 2462
  483. [RX]   width 0
  484. [RX]   center_freq1 2462
  485. [RX]   center_freq2 0
  486. [RX]   tlv_ptr first 0x00000000
  487. [WF][SM] Exiting connecting state
  488. [WF][SM] State Action ###connecting### --->>> ###disconnect###
  489. [WF][SM] Entering disconnect state
  490. [WF][SM] Will retry connect after 2 seconds ...
  491. [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
  492. [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
  493. [SC] disconn, value:11

  494. [09:28:54.637]收←◆[WF][PF] Getting profile by index, idx is @0
  495. [WF][SM] Retry Again --->>> retry connect
  496. [WF][SM] Exiting disconnect state
  497. Delete Timer.
  498. [WF][SM] State Action ###disconnect### --->>> ###connecting###
  499. [WF][SM] Action Connect
  500.         ssid qiao
  501.         ssid len 4
  502.         passphr 123456789
  503.         passphr len 9
  504.         psk
  505.         psk len 0
  506.         band 0
  507.         freq 0
  508.         bssid 00:00:00:00:00:00
  509.         dhcp status: true
  510.         flags: 0
  511. connecting using vif_idx 0
  512. ===start sm_get_bss_params===
  513. bssid[0] = 0xffff
  514. bssid[1] = 0xffff
  515. bssid[2] = 0xffff
  516. search ssid = qiao
  517. result ssid index = -1
  518. ===end sm_get_bss_params===
  519. [WF][SM] Entering connecting state
  520. [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
  521. [SC] Unknown code 3
  522. [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
  523. [SC] Unknown code 8

  524. [09:28:57.590]收←◆===start sm_get_bss_params===
  525. bssid[0] = 0xffff
  526. bssid[1] = 0xffff
  527. bssid[2] = 0xffff
  528. search ssid = qiao
  529. result ssid index = 0
  530. ===end sm_get_bss_params===
  531. --- OPT rxu_mgmt_ind is detected

  532. [09:29:00.750]收←◆ind ix 0x4201e914, chan_ctxt is 0x42015350
  533. connect failure, ssid = qiao, index = 0
  534. from sm_connect_ind to scanu_rm_exist_ssid
  535. [RX] Connection Status
  536. [RX]   status_code 11
  537. [RX]   reason_code 65535
  538. [RX]   connect result: auth or associate frame response timeout failure
  539. [RX]   MAC 22:32:4B:3B:D7:9B
  540. [RX]   vif_idx 0
  541. [RX]   ap_idx 3
  542. [RX]   ch_idx 0
  543. [RX]   qos 1
  544. [RX]   acm 0
  545. [RX]   assoc_req_ie_len 0
  546. [RX]   assoc_rsp_ie_len 0
  547. [RX]   aid 0
  548. [RX]   band 0
  549. [RX]   center_freq 2462
  550. [RX]   width 0
  551. [RX]   center_freq1 2462
  552. [RX]   center_freq2 0
  553. [RX]   tlv_ptr first 0x00000000
  554. [WF][SM] Exiting connecting state
  555. [WF][SM] State Action ###connecting### --->>> ###disconnect###
  556. [WF][SM] Entering disconnect state
  557. [WF][SM] Will retry connect after 2 seconds ...
  558. [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
  559. [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
  560. [SC] disconn, value:11

  561. [09:29:02.809]收←◆[WF][PF] Getting profile by index, idx is @0
  562. [WF][SM] Retry Again --->>> retry connect
  563. [WF][SM] Exiting disconnect state
  564. Delete Timer.
  565. [WF][SM] State Action ###disconnect### --->>> ###connecting###
  566. [WF][SM] Action Connect
  567.         ssid qiao
  568.         ssid len 4
  569.         passphr 123456789
  570.         passphr len 9
  571.         psk
  572.         psk len 0
  573.         band 0
  574.         freq 0
  575.         bssid 00:00:00:00:00:00
  576.         dhcp status: true
  577.         flags: 0
  578. connecting using vif_idx 0
  579. ===start sm_get_bss_params===
  580. bssid[0] = 0xffff
  581. bssid[1] = 0xffff
  582. bssid[2] = 0xffff
  583. search ssid = qiao
  584. result ssid index = -1
  585. ===end sm_get_bss_params===
  586. [WF][SM] Entering connecting state
  587. [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
  588. [SC] Unknown code 3
  589. [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
  590. [SC] Unknown code 8

  591. [09:29:05.762]收←◆===start sm_get_bss_params===
  592. bssid[0] = 0xffff
  593. bssid[1] = 0xffff
  594. bssid[2] = 0xffff
  595. search ssid = qiao
  596. result ssid index = 0
  597. ===end sm_get_bss_params===
  598. --- OPT rxu_mgmt_ind is detected

  599. [09:29:08.922]收←◆ind ix 0x4201e914, chan_ctxt is 0x42015370
  600. connect failure, ssid = qiao, index = 0
  601. from sm_connect_ind to scanu_rm_exist_ssid
  602. [RX] Connection Status
  603. [RX]   status_code 11
  604. [RX]   reason_code 65535
  605. [RX]   connect result: auth or associate frame response timeout failure
  606. [RX]   MAC 22:32:4B:3B:D7:9B
  607. [RX]   vif_idx 0
  608. [RX]   ap_idx 4
  609. [RX]   ch_idx 0
  610. [RX]   qos 1
  611. [RX]   acm 0
  612. [RX]   assoc_req_ie_len 0
  613. [RX]   assoc_rsp_ie_len 0
  614. [RX]   aid 0
  615. [RX]   band 0
  616. [RX]   center_freq 2462
  617. [RX]   width 0
  618. [RX]   center_freq1 2462
  619. [RX]   center_freq2 0
  620. [RX]   tlv_ptr first 0x00000000
  621. [WF][SM] Exiting connecting state
  622. [WF][SM] State Action ###connecting### --->>> ###disconnect###
  623. [WF][SM] Entering disconnect state
  624. [WF][SM] Will retry connect after 2 seconds ...
  625. [event_cb_wifi_event()-121][WIFI] [EVT] CODE_WIFI_ON_DISCONNECT Reason: auth or associate frame response timeout failure
  626. [event_cb_wifi_event()-126][WIFI] [EVT] wifi connect timeout
  627. [SC] disconn, value:11

  628. [09:29:10.981]收←◆[WF][PF] Getting profile by index, idx is @0
  629. [WF][SM] Retry Again --->>> retry connect
  630. [WF][SM] Exiting disconnect state
  631. Delete Timer.
  632. [WF][SM] State Action ###disconnect### --->>> ###connecting###
  633. [WF][SM] Action Connect
  634.         ssid qiao
  635.         ssid len 4
  636.         passphr 123456789
  637.         passphr len 9
  638.         psk
  639.         psk len 0
  640.         band 0
  641.         freq 0
  642.         bssid 00:00:00:00:00:00
  643.         dhcp status: true
  644.         flags: 0
  645. connecting using vif_idx 0
  646. ===start sm_get_bss_params===
  647. bssid[0] = 0xffff
  648. bssid[1] = 0xffff
  649. bssid[2] = 0xffff
  650. search ssid = qiao
  651. result ssid index = -1
  652. ===end sm_get_bss_params===
  653. [WF][SM] Entering connecting state
  654. [event_cb_wifi_event()-156][WIFI] [EVT] CODE_WIFI_CMD_RECONNECT
  655. [SC] Unknown code 3
  656. [event_cb_wifi_event()-151][WIFI] [EVT] CODE_WIFI_ON_CONNECTING
  657. [SC] Unknown code 8
复制代码
看日志应该是WIFI信息已经传输给模组了,但是不知道为什么模组一直连接失败。



回复

使用道具 举报

爱笑 | 2024-11-7 09:59:12 | 显示全部楼层
马上抓个技术给你瞧瞧
用心做好保姆工作
回复 支持 反对

使用道具 举报

123456 | 2024-11-7 11:37:29 | 显示全部楼层
手机连接的热点使用人数较多。

手机连接的热点信号质量较差。

路由器不转发组播数据。

路由器开启了双频合一,手机连接到 5G 频段。
回复 支持 反对

使用道具 举报

Q1570127950 | 2024-11-7 14:12:02 | 显示全部楼层
123456 发表于 2024-11-7 11:37
手机连接的热点使用人数较多。

手机连接的热点信号质量较差。

这个网络我用ESP12F连接是没问题的,现在用WB212F一直连接不上,还有一个网络配网后模组就一直接收不到WIFI的信息,那个网络用ESP12F连接也是没问题的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则