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.

CC3200 fails to auto-connect to wlan after hibernate

Other Parts Discussed in Thread: CC3200

My CC3200 Launchpad fals to auto-connect back to the wlan after it comes out of hibernation.  The connection policy was set to Auto + SmartConfig.  If I manually reset the device while waiting for the auto-connect it will work perfectly.

I terminate the wlan connection and stop the NWP device with a 5 second (5000 ms) delay prior to starting hibernation. 

I can successfully config it with my iPhone during this 2 minute wait period.

Here is a snap of pressing reset.  Obviously the profile and connection policy is still set OK.  There is something in the NWP that is treating a hibernation restart differently to a normal restart

This seems to make the hibernation feature pretty useless unless the customer is always handy with his smart phone app whenever hibernation occurs :-)

Peter

  • Peter,

    Can you please confirm the following-

    - Profile is not get deleted (sl_WlanProfileDel) anywhere in the code flow.

    - Set wlan policy (sl_WlanPolicySet) with 'SL_CONNECTION_POLICY(1, 0, 0, 0, 1)' policy. (you may have done this)

    - After device is coming up from hibernate,try to check wlan policy (sl_WlanPolicyGet). Is this same which has been set to device?

    Regards,

    Jitendra

  • I think with your first two bullets, if either were the case it wouldn't work when I press "Reset".

    I will do a PolicyGet on restart from hibernate and post what I see.  It may be Monday before I get to that though

    Thanks

    Peter

  • Hi Peter,

    I have tried the same scenario here, where application does-

    1. If reset cause not hibernate

    a. sl_start

    b. policy set to Auto+Smartconfg (SL_CONNECTION_POLICY(1, 0, 0, 0, 1)) while calling wl_WlanPolicySet

    c. reset NWP (sl_stop + sl_start) to let network policy come in effect.

    2. This is common either device comes up from hibernate/reboot

    a. sl_start  (after this start Wi-Fi Starter application 1st time)

    b. Loop till connect and IP_acquire event arrives.

    c. after connect to an AP, send some TCP/UDP packet to any pre-defined client 

    d. AP disconnect and switch off the NWP (sl_stop)

    3. Goto hibernate with wake time set.

    It works here for multiple iteration in hibernate case.

    Check your steps in case you are missing something and inform us.

    Regards,

    Jitendra

  • Jiendra

    Well step 2b is the problem:

    The IP acquire event never arrives after hibernate.  If I power cycle or press the reset button it works flawlessly

    Everything else listed I do.  It all basically copied from  your wlan_station demo code.

    I've tried:

    1. On  hibernation restart I've tried reenabling/reestablishing Connection Policy and DHCP, doing a SOCReset and delaying 30 seconds before doing sl_start, all to no avail.

    Peter

  • Issue is solved

    The code I have in the WLAB_Start function is:

    	VOGW_Console_Log ("<<< Wireless Lan recovery started >>>");
    	status = sl_Start(0,0, 0);				// start the WLan
    	sysStatus |= VOGW_WLAN_STARTED;
    
    	if (status != ROLE_STA) {

    and over in the WLAN_Event handler:

    oid SimpleLinkWlanEventHandler(SlWlanEvent_t *wlanEvent) {
    	int		i;
    	char	msg[50];
    
    	if (!(sysStatus & VOGW_WLAN_STARTED))
    		return;
    
        switch(wlanEvent->Event) {
            case SL_WLAN_CONNECT_EVENT:
            	sysStatus |= VOGW_WLAN_CONNECTED;

    The Fix is:

    	sysStatus |= VOGW_WLAN_STARTED;
    	status = sl_Start(0,0, 0);			// start the WLan
    	if (status != ROLE_STA) {
    

    WLAN_STARTED flag is to ensure that spurious WLAN events are discarded unless the WLAN is started.  Howerver on a hibernation restart, the WLAN connected event is received before the WLAN_STARTED flag is set.  Setting the flag immediately before, rather than immediately after issuing the sl_start solved the problem