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.

LAUNCHXL-CC3235S: Connecting manually to an AP from the launchpad

Part Number: LAUNCHXL-CC3235S
Other Parts Discussed in Thread: CC3235S

Hi

i have the CC3235S launchpad, the sole onboard profile is created when i perform the provisioning/configuration via the TI iPhone SimpleLink app.

The CC3235 then auto connects to the network when the device is reset.

Question 1:

Now via my own onboard program, i delete that sole profile.

Then, when i try to programmatically reconnect to the network sl_WlanConnect() returns error SL_ERROR_WLAN_INVALID_ROLE.

The CC3235 is in station mode yet i get this error....why is that?

Question 2:

If , however, i leave that sole profile intact, I found that as soon as i programmatically disconnected from the 1st network it would auto connect before i could initiate a connection to another network (the other network has no onboard profile)......in this scenario both networks are able to be received by the launchpad at equal power.

So how would i disconnect from that 1st network to connect to the other network?

thanks in advance

  • Hi Moshe,

    Are you building off of an example or demo from the SDK? Are you sure you are in STA mode? 

    as soon as i programmatically disconnected from the 1st network it would auto connect before i could initiate a connection to another network (the other network has no onboard profile)

    This is the expected behavior. If you want to switch networks then you should create a new profile and swap positions with the current profile. 

  • Hi Sabeeh

    Yes, originally this was the OOB program stripped of everything i didn't need & added to with stuff i did need.

    Yes, am in STA mode.

    And yes, what i subsequently discovered was that "if" i have the profile of the 2nd network stored then i could switch networks simply by calling sl_WlanConnect() with the necessary data of the other network and the cc3235 would auto disconnect from the 1st network & connect with the 2nd network.

    However in SimpleLink Wifi CC3x20, CC3x3x Network Processor (swru455) section 4.3.3.3 titled "Manual Connection", no mention is made of the fact that a profile for the 'manual' network must exist before it can be connected to else you will receive a "SL_ERROR_WLAN_INVALID_ROLE" return from sl_WlanConnect()....which is really the wrong error return to give....but i can live with it knowing that.

    As an exercise...i have just tried (12hrs after my post) to connect to a 3rd network which did NOT have an onboard profile by simply calling sl_WlanConnect() whilst STILL connected to one of the profiled networks....i did connect!!??....what the heck??...was yesterdays issue an aberration???

    Various subsequent scenarios showed that if i disconnected from that 3rd network the cc3235 would auto-connect to the 1st profile...which makes perfect sense.

    However, If i tried this scenario...
    i connected to my 2nd network then disabled the WiFi on my 1st network, and then tried to (manually) connect to the 1st network i got the following callback...
    SL_WLAN_EVENT_DISCONNECT,  I did NOT receive a SL_NETAPP_EVENT_IPV4_LOST...it did not revert back to the 2nd network....
    Then, once i reenabled the wifi of the 1st network the CC3235 connected automatically...

    so does that mean, for this scenario, that it will keep trying the 1st network forever??

    Incidentally, if in that last scenario i tried this...
    i connected to my 2nd network then disabled the WiFi on my 1st network, and then (manually) disconnected from the 2nd network the cc3235 lost its IP address, disconnected from the 2nd network, tried to connect to the 1st network, couldnt connect & reverted to the 2nd network and reacquired its IP address back.....this makes perfect sense and works as expected!