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.

CC3235MODSF: Fast connect force rescan

Part Number: CC3235MODSF

Hi,

I'm currently using auto+fast connect on our product which works fine in 99% of cases as our products are stationary.

However when a device is configured initially close to an access point, and then installed to the limit of this same access point's range, the device will still connect to it as long as it is detected (even when a much better AP is available). Same thing happens when the dynamic power management of the access points changes their power.

I have tried various strategy to force a rescan:

1: Delete /tmp/fcon.ssid (Which I suppose stores the BSSID for the fast connect) => Does not work due to it being a system file

2: Set SL_WLAN_CONNECTION_POLICY to auto instead of auto+fast => It continues to use the previous BSSID instead of the one with the best rssi.

3: Force a scan, read result with sl_WlanGetNetworkList and connect manually to BSSID with best rssi => This works but seems overcomplicated

My questions:

Is it expected that if a fast connect profile has been stored it is used even if SL_WLAN_CONNECTION_POLICY  is set to "auto" only? Can you reproduce it?

Is it possible to include in next releases a way to erase the fast connect profile?

Thanks,

Cédric

  • Hi Cédric,

    Are you disconnecting from the current AP? sl_WlanDisconnect() should remove the fast connect profile and trigger the auto connection policy to run.

    If you're still connecting to that AP, can you compare the details of your saved WLAN profiles? The auto-connection policy should select a profile based on the priority first, then security type, and then signal strength.

    I also suggest checking out the soft-roaming and trigger-roaming features in the NWP guide.

    Best regards,

    Sarah

  • Hi Sarah,

    Thanks for your feedback!

    No I am not using  sl_WlanDisconnect. My typical sequence is:

    wake up from hibernate
    sl_start
    if first connection:
        Configure and connect to AP
    else
       Wait until connection to AP is done
    
    Do_something
    sl_Stop Hibernate

    I have just now tried to use sl_WlanDisconnect and still see the connection to the previous BSSID even though another better BSSID is available.

    See the output I get:

    The device was connected to 78:8a:20:2a:a3:ad, I forced a disconnection, and to make sure that the scan is performed I listed all AP found with sl_WlanGetNetworkList. We can indeed see that there is a better AP e4:0e:ee:e4:bb:83 but it was not used.

    2021-03-01 12:01:13,906 INFO COM8: b'Starting\r\n'
    2021-03-01 12:01:14,341 INFO COM8: 'sl_WlanDisconnect to find best AP\r\n'
    2021-03-01 12:01:14,459 WARNING COM8: b'Lost connection to WAP "ROOMZ", WAP\'s MAC: 78:8a:20:2a:a3:ad, on ERROR, reason [1]\r\n'
    2021-03-01 12:01:16,550 INFO COM8: b'Listing AP with sl_WlanGetNetworkList \r\n'
    2021-03-01 12:01:16,550 INFO COM8: b'MAC: e4:0e:ee:e4:bb:83 SEC: 0x1488 RSSI: -35 SSID: ROOMZ Channel: 01\r\n'
    2021-03-01 12:01:16,568 INFO COM8: b'MAC: 78:8a:20:2a:a3:ad SEC: 0x1488 RSSI: -51 SSID: ROOMZ Channel: 06\r\n'
    2021-03-01 12:01:16,568 INFO COM8: b'Wait until connected\r\n'
    2021-03-01 12:01:17,335 INFO COM8: b'STA Connected to the AP: ROOMZ , BSSID: 78:8a:20:2a:a3:ad\r\n'

    Regarding the profiles, I use only one, and when checking with sl_WlanProfileGet its mac is set to 00:00:00:00:00:00.

    According to the swru455: "Soft roaming is enabled only if FAST connection policy is disabled". I suppose it's the same for trigger roaming. 

    Best regards,

    Cédric

  • Hi Cédric,

    Right before you call sl_WlanGetNetworkList, can you also print the results of sl_WlanProfileGet?

    Best regards,

    Sarah

  • Hi Sarah,

    Here it is:

    return 2

    pName: ROOMZ

    secParams.Type: 2

    SlWlanGetSecParamsExt_t: unused in this case

    Priority: 7

    Mac: 00:00:00:00:00:00

    This is for profile 0, to be sure that a second profile was not registered I tried with profile 1 and got as expected return -2074 SL_ERROR_WLAN_GET_PROFILE_INVALID_INDEX

    Best regards,

    Cédric

  • Hi Cédric,

    Thanks for the details. That behavior does look incorrect.

    What servicepack version are you using? Can you capture NWP logs with the latest servicepack (sp_4.9.0.2_3.7.0.1_3.1.0.26)? That will help me report this issue.

    Best regards,

    Sarah

  • Hi Sarah,

    I'm using service pack  sp_4.9.0.2_3.7.0.1_3.1.0.26

    Extracting the nwp log is a bit tricky (especially since we use our own custom board), but I should be able to do it tomorrow or next week. 

    Best regards,

    Cédric

  • Thanks Cédric,

    I've reported the details you've provided so far. As a follow-up, can you switch the channels used by the APs? Can you try switching which AP has the higher RSSI and see if that changes the behavior?

    Best regards,

    Sarah

  •  Hi Sarah,

    As you suggested I tried playing with the channels. When using the same channel 6 for both AP it did switch correctly to the best AP. But when another channel (6 and 1, or 6 and 11) was used, it kept connecting to the previous AP with channel 6 and lower RSSI. So there seem to an issue here. I am not explicitly configuring anything channel related on the device and the device does connect to the other AP if there is no other choice.

     

     

    Here is the nwp log. 

    You should see  2 wakeup from hibernate, at the second wakeup the device was disconnected from 78:8a:20:2a:a3:ad and should have connected to e4:0e:ee:e4:bb:83 but did not.

    The result of the scan was.

    2021-03-08 16:20:16,702 INFO COM8: b'MAC: e4:0e:ee:e4:bb:83 SEC: 0x1488 RSSI: -32 SSID: ROOMZ Chnnel: 01\r\n'
    2021-03-08 16:20:16,725 INFO COM8: b'MAC: 78:8a:20:2a:a3:ad SEC: 0x1488 RSSI: -41 SSID: ROOMZ Channel: 06\r\n'

     

    I hope it helps,

    Best regards,

    Cédric

     

     /cfs-file/__key/communityserver-discussions-components-files/968/FastConnect_5F00_issue.log

  • Hi Cédric,

    Thank you for the log, and for the information about the channels. We will look into this further.

    This type of issue will likely require a fix to the servicepack, and due to our quarterly testing and release cycles, may not be available for a few months. In the meantime, I do recommend the manual workaround you mentioned in your first post (#3).

    Best regards,

    Sarah

  • Hi Sarah,

    Thank you! 

    Best regards,

    Cédric