This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC3301:R7 版本中的通道特定扫描功能

Guru**** 2558250 points
Other Parts Discussed in Thread: CC3301

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1571605/cc3301-channel-specific-scanning-feature-in-r7-version

器件型号:CC3301


工具/软件:

在当前的 R7 wifi 驱动程序中、wifi scan 使用以下 API 来执行全频谱扫描:
RET = ctrlCmdFw_WLSendCommand (WLAN_SCAN、&cmd、sizeof (WLAN_SCAN_cmd_t)、&complete、sizeof (WLAN_SCAN_COMPLE_t);


这种方法有几个局限性:

性能: 全频谱扫描既耗时又耗时
可靠性: 有时在扫描结果中找不到我们预期的 AP

我们希望 TI 提供增强的 API 来提高扫描稳定性和性能:
特定于通道的扫描: 仅扫描特定信道、避免对所有信道进行不必要的扫描
特定于 SSID 的扫描: 仅使用 SSID 扫描指定的 AP。
MAC 特定扫描: 仅使用 MAC 地址扫描指定的 AP。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    对于连接 API、我们也有 相同的要求。

    WiFi 连接 API 具有以下参数:

    typedef 结构

    CMD_HEADER_t HDR;
    signed char pname[33];//SSID、最多 32 个字符+空终止
    INT NameLen;
    unsigned char pMacAddr[6];
    字符 secType;
    char pPass[64];//密码短语可以是 8-63 个字符长+空终止
    Char PassLen;
    字符填充[3];
    }wlan_connect_cmd_t;


    此 API 有一个限制:在开始连接之前、它将执行扫描操作以查找 AP 的信道。

    我们需要为信道添加参数(我们可以提供)、如果 FW 知道 AP 的信道、则可以在连接过程中跳过扫描操作或加快扫描操作。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我们的总体目标是尽可能快速可靠地连接。 CC3301 似乎首先在所有通道上使用通配符 SSID 进行扫描。 然后、在听到请求的 SSID 后、它就会连接。 这并不是最佳选择、因为我们已经知道通道。 在本例中、通过在正确的通道上立即使用正确的 SSID 执行 ProbeReq、连接速度可以至少加快~1s。

    16:35:16.846] WiFi: MAC address: xx:xx:xx:xx:xx:xx                                                                               
    16:35:16.849] WiFi: Requested country_code: DE, using EU instead.                                                                
    16:35:16.850] WiFi: Updated ssid in context:xx-xxxxxx, country code:EU                                                           
    16:35:16.850] WiFi: WIFI config saved                                                                                            
    16:35:16.868] WiFi: Connecting...                                                                                                
    16:35:16.871] WiFi: Updating wifi status: CONNECTING  error: 0 isp_error: ISP_ERR_OK(0) rssi: 16777215                           
    16:35:16.890] WiFi: ISP Wifi transitioning from state DISCONNECTED to CONNECTING                                                 
    16:35:16.894] WiFi: Pending action: CONNECT                                                                                      
    16:35:16.895] WiFi: Updating wifi status: CONNECTING  error: 0 isp_error: ISP_ERR_OK(0) rssi: 16777215                           
    16:35:16.895] WiFi: Initializing network stack...                                                                                
    16:35:16.895] WiFi: Starting network...                                                                                          
    16:35:16.902] CC33xx wifi driver version: R_7                                                                                    
    16:35:16.906] select scio 2                                                                                                      
    16:35:17.135] scio_init2: pre_init failed, got to reset init                                                                     
    16:35:17.139] sdio_change_clk: set sdio clock 25000000                                                                           
    16:35:17.139] sdio_set_buswidth_4bit: card_bus_width_switch to 4bit                                                              
    16:35:17.140] sdio function num=2, wifi_run_flag=0, err = 0                                                                      
    16:35:17.140] sdio_wifi_init sdio2 ret=0                                                                                         
    16:35:17.141] Hardware init DONE!                                                                                                
    16:35:17.141] Starting FW download.....                                                                                          
    16:35:17.396] Download RAM-BTL                                                                                                   
    16:35:17.400] Download FW                                                                                                        
    16:35:17.448] cc33xx_rev: 1.7.6.310                                                                                              
    16:35:18.709] Download IniParams                                                                                                 
    16:35:18.714] FW Download complete                                                                                               
    16:35:18.714] wifi init done                                                                                                     
    16:35:18.722] Wlan_Start: set mac xx:xx:xx:xx:xx:xx                                                                              
    16:35:18.726] Chosen domain is EU                                                                                                
    16:35:18.727] Wlan_RoleUp ROLE_STA!                                                                                              
    16:35:18.743] WiFi: [wl0] NETIF_LINK_STATUS_UP                                                                                   
    16:35:18.747] WiFi: [wl0] NETIF_LINK_STATUS_DOWN                                                                                 
    16:35:18.747] WiFi: [wl0] Link is down as part of re-/activation                                                                 
    16:35:18.755] [WLAN EVENT] Device disconnected from the AP, ReasonCode: 200                                                      
    16:35:19.409] scan 10 find ssid xx-xxxxxx (len 9)                                                                                
    16:35:19.421] security type: WPA2_PLUS                                                                                           
    16:35:19.422] connect to xx-xxxxxx, sectype: 11                                                                                  
    16:35:29.415] connect timeout                                                                                                    
    16:35:29.425] connect to xx-xxxxxx, sectype: 11                                                                                  
    16:35:39.416] connect timeout                                                                                                    
    16:35:39.427] connect to xx-xxxxxx, sectype: 11                                                                                  
    16:35:40.159] connect SSID: xx-xxxxxx                                                                                            
    16:35:40.170] BSSID: xx:xx:xx:xx:xx:xx                                                                                           
    16:35:40.171] WiFi: [wl0] NETIF_LINK_STATUS_ON                                                                                   
    16:35:40.172] WiFi: [wl0] Setting manual IP config (ip=192.168.x.xx, netmask=255.255.255.0, gateway=192.168.x.x, dns=192.168.x.x)
    16:35:40.172] WiFi: [wl0] NETIF_LINK_STATUS_UP                                                                                   
    16:35:40.176] WIFI Connected!                                                                                                    
    16:35:40.177] WiFi: Connected                                                                                                    

    在以上日志中、连接为 23.308 秒 即使扫描所有信道、这也需要很长时间。 CC3301 是否一直在扫描?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我们正在研究这些请求的可行性、并将向您提供最新信息