Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

How to switch automatically to another access point or router when internet goes down on one?

Other Parts Discussed in Thread: CC3200

Hi all,

I am new to TI community and have got started with using the CC3200 wifi+MCU module, hence also new to using TI chips. I need some guidance with what SimpleLink API's to use for a particular application feature and how to go about with the application flow for doing so. The application feature is as follows: The CC3200 will be connected to internet via the access point or router, but in situation when the internet goes down, the CC3200 should be able to switch automatically to another access point to connect to the internet. And, when the internet of the 1st router is back, the CC3200 should switch back to the 1st router. So, the application basically needs to have the following:

1. A method to store SSID and passwords of two access points---> What API can i use for this?

2. By default connect to the 1st access point

3. When internet is down by 1st router, switch to the second router where internet is available

4. Once internet is back on the first router, the CC3200 should switch back to it.

What is the flow to implement this feature and what are some of the useful Simplelink API's i can use for this purpose. I am new to using TI stuffs, hence any advise or guidance regarding this would be helpful. 

  • Hi,

    Welcome to the CC31xx/CC32xx WiFi forum. Just in brief. CC3200 have two connection strategies. One is manual connection and 2nd is using connection profiles. Connection profiles do almost that what you want to do. Connection profiles are "default" and can be set by internal webserver.

    Connection profiles you can imagine as table with multiple wifi connection settings (ssid, password, etc.). You can set into first profile parameters for your 1st AP, into 2nd profile parameters for your 2nd AP, etc. 1st profile have highest priority. When connection from 1st profile is not available, then 2nd profile will be used...
    But there is one issue. When CC3200 is connected to 2nd AP (due to 1st AP failed), then CC3200 can't automatically switch back to 1st AP when it become available again (it still use 2nd AP). But that is nothing what can't be done by few lines of your code. You can continuously scan for available APs and when you see back 1st AP, you can disconnect from 2nd AP and connect to 1st.

    Good start point for you can be this document (www.ti.com/lit/pdf/swru368) and connection_policy example in SDK.


    Jan
  • Hi Jan,

    I saw the connection policy example and did some reading . Let me check if my understanding is right based on your response:

    1. Since I need to use connection profiles, therefore I use the API Wlan_Policy(.....) by configuring it to Auto Connect.

    2. I delete the default profiles using WlanProfileDelete()

    3. I use the WlanProfileAdd to add details regarding my two access points with the help of SISecParams_t data structure along with the prior

    4. The I use WlanSetMode to change the CC3200 to station mode

    Is the above flow good to get going?.

    And I have few more doubts,

    1. Do we need to call the sl_WlanConnect API again specifying the SSID of the AP to connect to or it automatically connects to the AP with the highest priority?.

    2. How will the CC3200 know once the internet is back on the highest priority AP for it to switch?. As you said continuously scan, as in , did you mean by checking some status bit for that profile AP?. Do we need to use the API sl_WlanGetNetworkList to perform this scan? If not then how do I go about it. Can you please shed a little more light on this.
  • Hi,

    I am working on a Wifi based product not with CC3200. It is able to connect to other router automatically if it loses connection to the first router. The routers have same ssid and password. See, if the same can happen at CC3200.

    - kel
  • We can monitor the socket to check if the net is up using sl_select or sl_rec API's. Like jan said, the only extra layer I have to write is for the switching. Thank you all for support.

    ~VD