RW612 WiFi - Connect to an access point with BSSID instead of SSID Hi, I have an application for RW612 using the NXP MCUXpresso SDK for all WiFi things. Everything works fine when picking an access point to connect to using its SSID. So if I have one of my APs named "Point01" and it has 2.4 GHz and 5 GHz, and I do WPL_AddNetwork() then WPL_Join() it always connects to the 5 GHz channel, never the 2.4 GHz channel. I am trying to add an option to force the 2.4 GHz channel, and I assumed I could use the BSSID from the WiFi scan results. I have modified WPL_AddNetworkWithSecurity() to add a bssid parameter to the function call, then in the function it sets the flag bssid_specific to '1'. But this doesn't work, it says it connects but then netif_default is never filled in, and nothing else works, then I just get LINK LOST callbacks. Am I on the right track? Is bssid_specific flag good for anything? Or should I be using channel_specific? That seems like a worse option. Thanks in advance! Re: RW612 WiFi - Connect to an access point with BSSID instead of SSID Hello @MattKow-Firefly, hope you are doing well.
I have tested the "wifi_cli" demo with SDK version 25.06.00 and it is working as expected when I try to connect to any 2.4GHz AP as shown in the image below (the AP has dual-band support):
I would suggest to test the demo with the Ublox IRIS Evaluation Board, just take into account that there is a difference in the memories of the boards, to modify the example according to your Ublox module, please see the Migration from FRDM-RW612 to third-party module memories post on the Application Code Hub to adapt the demo to your module.
Please let me know if this information is useful. Re: RW612 WiFi - Connect to an access point with BSSID instead of SSID I also tried the param "acs_band 0" without setting param bssid, but setting acs_band to 0 or 1, it always connects to the 5 GHz as seen via wlan-info, it shows the channel 149 and the 5 GHz bssid in both cases. Re: RW612 WiFi - Connect to an access point with BSSID instead of SSID So the "frdmrw612_wifi_cli" demo runs fine on our custom board, just changed the flash config and the UART from 3 to 2, and it runs fine. It is the same problem I'm having, here is a snippet of the console, where I changed the ssid and password, but there is an access point, both 2.4 and 5 GHz show separately after "wifi_scan" and I am using the BSSIDs from the scan results. It connects fine if I don't give a bssid, and it connects fine if I give the 5 GHz bssid. But when I give the 2.4 GHz bssid, it never gets the IP address, it goes through a loop just like my original post. I just need to know if this is a problem with the SDK, or is it some setting on my access point? I'll continue to look into this, thanks! Here's the snippet: # wlan-add fire ssid SAMPLESSID bssid A2:2A:6F:26:DE:3B wpa2 psk SAMPLEPASS Added "fire" # wlan-connect fire Connecting to network... Use 'wlan-stat' for current connection status. # board_type: 2, board_type mapping: 0----QFN 1----CSP 2----BGA app_cb: WLAN: authenticated to network app_cb: WLAN: connected to network Connected to following BSS: SSID = [Firefly_02] IPv4 Address: [192.168.42.71] wlan-disconnect app_cb: disconnected # wlan-remove fire Removed "fire" # wlan-add fire ssid SAMPLESSID bssid 9E:2A:6F:26:DE:3C wpa2 psk SAMPLEPASS Added "fire" # wlan-connect fire Connecting to network... Use 'wlan-stat' for current connection status. # board_type: 2, board_type mapping: 0----QFN 1----CSP 2----BGA board_type: 2, board_type mapping: 0----QFN 1----CSP 2----BGA board_type: 2, board_type mapping: 0----QFN 1----CSP 2----BGA Re: RW612 WiFi - Connect to an access point with BSSID instead of SSID Hi Roman, I am working with a custom board and a custom app using RW612 SDK 25.06.00. I started with the SDK example app "frdmrw612_wifi_httpsrv". Soon, when I get the time, I will try to load up the "wifi_cli" example app and try that. And I'll check UG10171. Aside from our custom board, I also have 2x Ublox IRIS W1 Evaluation Board that I can test with. But everything else is running fine on our custom board, and I haven't made any odd changes to the WiFi code, so I anticipate the results would be similar. I will do the items and report back, thanks! Re: RW612 WiFi - Connect to an access point with BSSID instead of SSID Hi @MattKow-Firefly, hope you are doing well.
Could you please confirm if you are working with an example from the SDK, and if so, which version you are working with? This will allow me to try to recreate your issue.
You should be able to connect to a network by specifying its BSSID if you are working with any CLI example from the SDK as stated in the UG10171 - NXP Wi-Fi and Bluetooth Demo Applications for FRDM-RW61x in section 3.1.6.4.
Please let me know if the information is useful and the details of your working setup. Re: RW612 WiFi - Connect to an access point with BSSID instead of SSID Some more info: I have been changing the code in WPL_Join() so instead of searching for an AP with a better RSSI, it just finds the 2.4 GHz network with the correct SSID and tries to connect. Normally it would find the 2.4, then keep trying and find the 5 GHz with a better RSSI, and use that every time. So, when I force it to connect to the 2.4 network, I am getting this output from wlcm: Connecting[wlcm] taking the scan lock (connect scan) [wlcm] got the scan lock (connect scan) [wlcm] got wifi message: 69 0 1 [wlcm] starting connection to network: 1 [wlcm] initiating scan for network "xxxxxxxx" ...[wlcm] got wifi message: 9 0 0 [wlcm] got event: scan result [wlcm] : Match successful [wlcm] Unexpected security nw param [wlcm] starting association to "xxxxxxxx" [wlcm] configuring WPA3 SAE security [wlcm] adding SSID and WPA3 SAE PASSWORD to supplicant cache ..[wlcm] SM: returned to associating [wlcm] releasing scan lock (connect scan) [wlcm] got wifi message: 12 2 0 [wlcm] got event: association result: failure [wlcm] association failed, re-scanning [wlcm] initiating scan for network "xxxxxxxx" ....[wlcm] got wifi message: 9 0 0 [wlcm] got event: scan result [wlcm] : Match successful [wlcm] Unexpected security nw param [wlcm] starting association to "xxxxxxxx" [wlcm] configuring WPA3 SAE security [wlcm] adding SSID and WPA3 SAE PASSWORD to supplicant cache ...[wlcm] SM: returned to associating [wlcm] releasing scan lock (connect scan) [wlcm] got wifi message: 12 2 0 [wlcm] got event: association result: failure [wlcm] association failed, re-scanning [wlcm] initiating scan for network "xxxxxxxx" ....[wlcm] got wifi message: 9 0 0 [wlcm] got event: scan result [wlcm] : Match successful [wlcm] Unexpected security nw param [wlcm] starting association to "xxxxxxxx" [wlcm] configuring WPA3 SAE security [wlcm] adding SSID and WPA3 SAE PASSWORD to supplicant cache ...[wlcm] SM: returned to associating [wlcm] releasing scan lock (connect scan) [wlcm] got wifi message: 12 2 0 [wlcm] got event: association result: failure [wlcm] association failed, re-scanning Occasionally it will go through with the connection, but then go right back into the loop of "association failed". Again, there are no problems with our APs that only have 2.4 GHz enabled, and no problems with auto-choosing the 5 GHz network. Only occurs when connecting to an AP that has both 2.4 and 5 turned on, and when trying to choose the 2.4. I'm not sure what to try next, I'm going to look into the AP settings.
查看全文