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.

CCS/CC3220SF-LAUNCHXL: AP can not always connected after configuring it before.

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

Tool/software: Code Composer Studio

Hi, I am using CC3220SF-LAUNCHXL and want to change out-of-box codes. I used the APP to configure the board so it could connect the AP , and it succeeded.

After that when I powered off the board and powered on again , the board connected the AP automatically . However, if I powered it on after hours , it cannot connect by itself. I want to save the WIFI password on the board so I don't have to configure it every time . What can I do ?

  • Hi,

    What example are you working off of? With the examples featuring provisioning such as the out-of-box example, you should be adding a Wi-Fi profile to the CC3220 as part of provisioning. When you also have auto connect enabled, the CC3220 will scan for nearby access points on sl_Start() and then connect to the highest priority saved profile.

    Also, can you clarify what you mean when you mentioned that if you "powered it on after hours" it will no longer automatically reconnect? If you can reconnect after a power cycle, then the profile + autoconnect should be working. The length of time you are powered off should not matter, unless the AP you are trying to connect to is no longer active.

    Regards,
    Michael
  • hi Michael,
    My problem is exactly the length of time affecting the AP connection.

    At the beginning, I connect the board to the AP through the APP and it says provision succeed.
    When the AP connected , the led D10 will on . However, when I powered on after a long time about a day , D10 was blinking all the time, and the terminal didn't show anything. When I opened the simple link app and clicked 'Start configuratin', the terminal showed :

    EVENT] IP Acquired: IP=10.123.45.1 , Gateway=10.123.45.1

    ============================================
    out of box Example Ver: 1.00.00.09
    ============================================

    CHIP: 0x30000019
    MAC: 2.0.0.0
    PHY: 2.2.0.6
    NWP: 3.9.0.6
    ROM: 0
    HOST: 3.0.1.41
    MAC address: 08:00:28:11:22:33

    ============================================

    [Provisioning task] Wake up on Power ON
    [NETAPP EVENT] IP Acquired: IP=10.123.45.1 , Gateway=10.123.45.1
    [Provisioning task] Device started as STATION
    [Provisioning task] Cannot connect to AP or profile does not exist
    [Provisioning task] detected device is CC3220SF
    [NETAPP EVENT] IP Acquired: IP=10.123.45.1 , Gateway=10.123.45.1
    [Provisioning task] Device is configured in default state
    [Provisioning task] Device started in AP role
    [NETAPP EVENT] IP Acquired: IP=10.123.45.1 , Gateway=10.123.45.1
    [Provisioning task] Host Driver Version: 3.0.1.41
    [Provisioning task] Build Version 3.9.0.6.31.2.0.0.0.2.2.0.6
    [Provisioning task] Starting Provisioning - [Provisioning task] in mode 2 (0 = AP, 1 = SC, 2 = AP+SC)
    [Provisioning task] Provisioning Started. Waiting to be provisioned..!!

    I use the example codes of Out-of-box and burn it into the board.
    It seems the profile lost and I am sure the AP works well.

  • Hi,

    From the terminal output that you have posted, it seems as if the application restarted and then either cleared the profile itself or couldn't connect to the AP somehow. What do you see on the terminal if you leave it running after successful provisioning? When going from the connected (LED on) state to the provisioning (LED blinking) there will be several prints on the terminal indicating what is happening to the CC3220. You mentioned that the terminal didn't show anything, but do you mean that nothing was printed out between successful provisioning and the bad state, or do you mean that you didn't see any terminal output after reopening your terminal application and restarting the provisioning procedure?

    Regards,
    Michael
  • Hi Michael,
    When I leave it running after successful provisioning,The terminal shows:

    [WLAN EVENT] Profile Added
    [WLAN EVENT] Connection to AP succeeded
    [WLAN EVENT] IP address acquired
    [WLAN EVENT] Confirmation Success!
    [WLAN EVENT] Provisioning stopped
    [WLAN EVENT] - WLAN Connection Status:3
    [WLAN EVENT] - Connected to SSID:LAPTOP-4D9OTR22
    [Provisioning task] Provisioning completed successfully..!
    [Provisioning task] IP address is 192.168.137.58
    [Link local task] the netAppRequest AppID is: 1[Link local task] NetApp Request Received - handle from main context AppId = 1, Type = 1, Handle = 257
    [Link local task] Metadata len = 66
    [Link local task] HTTP GET Request
    [Link local task] characteristic is: appname
    [Provisioning task] detected device is CC3220SF
    [Link local task] the netAppRequest AppID is: 1[Link local task] NetApp Request Received - handle from main context AppId = 1, Type = 1, Handle = 273
    [Link local task] Metadata len = 281
    [Link local task] HTTP GET Request

    When I reopen the board , there is nothing shown on the terminal until I start configure it again .And it shows :
    [Provisioning task] Wake up on Power ON
    =======================================
    out of box Example Ver: 1.00.00.09
    ============================================

    CHIP: 0x30000019
    MAC: 2.0.0.0
    PHY: 2.2.0.6
    NWP: 3.9.0.6
    ROM: 0
    HOST: 3.0.1.41
    MAC address: 98:84:e3:f5:fe:67

    ============================================

    [Provisioning task] Wake up on Power ON
    [WLAN EVENT] STA Connected to the AP: LAPTOP-4D9OTR22 ,BSSID: a:28:19:d8:4e:1b
    [WLAN ERROR]Device disconnected from the AP AP: LAPTOP-4D9OTR22,BSSID: a:28:19:d8:4e:1b on an ERROR..!!
    [Provisioning task] Cannot connect to AP or profile does not exist
    [Provisioning task] detected device is CC3220SF
    [NETAPP EVENT] IP Acquired: IP=10.123.45.1 , Gateway=10.123.45.1
    [Provisioning task] Device is configured in default state
    [Provisioning task] Device started in AP role
    [NETAPP EVENT] IP Acquired: IP=10.123.45.1 , Gateway=10.123.45.1
    [Provisioning task] Host Driver Version: 3.0.1.41
    [Provisioning task] Build Version 3.9.0.6.31.2.0.0.0.2.2.0.6
    [Provisioning task] Starting Provisioning - [Provisioning task] in mode 2 (0 = AP, 1 = SC, 2 = AP+SC)
    [Provisioning task] Provisioning Started. Waiting to be provisioned..!!

    I tried to restart provisioning and reopen the board several times . I find that at the first several times , the AP can be connected when reopen it , but after 4 to 5 times ,it shows AP or profile does not exist .

    Regards,
    Jiao

  • Hi Jiao,

    What AP are you using? It looks like from the terminal output that the cc3220 actually connects to the programmed profile, but then disconnects immediately without getting an IP address. This connection failure then causes the profile to be erased. Can you try using a different AP and seeing if you still encounter this issue?

    Regards,
    Michael
  • Thank you. I changed an AP and it works well.