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: Hibernate with WPS

Other Parts Discussed in Thread: CC3200

Hello,

I am using CC3200 for an IoT based application where it needs to be in hibernate mode. It should wake and connect to a WPS router when a particular GPIO gets high. 

I am able do wake it up through GPIO13 and set the connection policy to auto mode as mentioned below.

sl_WlanPolicySet(SL_POLICY_CONNECTION,SL_CONNECTION_POLICY(1,0,0,0,0),NULL,0);

But somehow it is not getting connected to the WPS router automatically after coming out of the hibernate mode. I need to press the WPS switch every time it wakes up.

Any help is appreciated.

Thanks,

Sameer 

  • Hi Sameer,

    Please make sure that after waking up from hibernate you don't call the sl_WlanConnect() API once more, but just let the system connect automatically.
    You shouldn't call sl_WlanPolicySet() every time as well, but just set it once.
    In general, you should set your system to auto connection policy as you are doing and perform the WPS sequence once, using sl_WlanConnect() API.
    On any future boot the system will just automatically connect.
    If you will call sl_WlanConnect() again, it will trigger the WPS activity again, which will require you to press the AP button every time.

    Thanks,
    Alon
  • Hello Alon,

    Thanks for the information.

    I tried to program it according to your suggestions but still it is not working. I have few more doubts kindly help me with that. 

    1. You said "On any future boot the system will just automatically connect", which API or function will be responsible to reconnect it to the router automatically?

    2. Do I also need to reset the state of the machine (using Network_IF_ResetMCUStateMachine()) after every waking up?

    3. Do I also need to start the drivers and config it to station mode (using Network_IF_InitDriver(ROLE_STA)) after every wake up?

    Thanks,

    Sameer

  • Hi Sameer,

    1. The auto-connection policy will automatically make the system try to connect to an existing profile upon every sl_Start(). Please check your profile and make sure its still there.
    2. The Network_IF_ResetMCUStateMachine() function call is not an actual Simplelink API. It's part of the common code that's being shared by many SDK example applications, loacted in examples/common/network_if.c. Please look into this function and modify it based on your needs.
    3. (same as above)
  • Hello,

    Thanks for the response. Now it is working properly. 

    Thanks,

    Sameer