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.

wlan_ap demo not changing SSID

Other Parts Discussed in Thread: CC3200, UNIFLASH

I have a problem where setting the SSID on my CC3200 LaunchPad does not change the SSID.

I am running the wlan_ap demo on the CC3200 LaunchPad. On the console, it asks for the SSID.  After typing the name, it prints "Device is configured in AP mode" but when I use my PC or phone to scan for APs, it still only finds "mysimplelink-111F8C", not the one I just typed in.

When I connect to this AP, it prints out a message in the console and starts the ping test.

What is wrong here? Where does the "mysimplelink-11F8C" name come from in the first place?

  • Here is the code I use to set the SSID

        /* Change mode to access point */
        configValue = sl_WlanSetMode(ROLE_AP);
    
     
        // Set SSID name for AP mode
        unsigned char  str[33] = "YourAPname";
        unsigned short  length = strlen((const char *)str);
        sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SSID, length, str);
    
     
        // Set security type for AP mode
        //Security options are:
        //Open security: SL_SEC_TYPE_OPEN
        //WEP security:  SL_SEC_TYPE_WEP
        //WPA security:  SL_SEC_TYPE_WPA
        unsigned char  val = SL_SEC_TYPE_OPEN;
        sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SECURITY_TYPE, 1, (unsigned char *)&val);
    
     
        //Set Password for for AP mode (for WEP or for WPA) example:
        //Password - for WPA: 8 - 63 characters
        //           for WEP: 5 / 13 characters (ascii)
        // unsigned char  strpw[65] = "passWORD";
        // unsigned short  len = strlen((const char *)strpw);
        // memset(strpw, 0, 65);
        // memcpy(strpw, "passWORD", len);
        // sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_PASSWORD, len, (unsigned char *)strpw);
    
     
        /* Restart the network processor */
        configValue = sl_Stop(0);
        configValue = sl_Start(NULL, NULL, NULL);

    Glenn

  • Hi Glenn,

    Thanks for the code but my question was not for code that sets the device in AP mode.  I am using the out-of-box wlan_ap example code and it does not work.  Are you suggesting that the example code does not work?

    I have also written my own code to set the AP and print some more debug information and I get the same result.

    I've also patched your code in to mine and I get the exact same result.  The SSID of the device stays the same.  What am I doing wrong?

  • Pieter Winter said:
    I've also patched your code in to mine and I get the exact same result.  The SSID of the device stays the same.  What am I doing wrong?

    I am not sure, I provided code so you could set the SSID to what ever you wished. The below code performs the SSID name change.

    // Set SSID name for AP mode
    unsigned char  str[33] = "YourAPname";
    unsigned short  length = strlen((const char *)str);
    sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SSID, length, str);

    The other parts of the code set the device to AP mode and then restart the network processor. I guess you could step through your code to make sure the relevant lines are being called.

    As for the example code, I do not remember seeing any reports of that example not functioning as expected.

    Glenn.

  • Hi Peter,

         The out of box demo is by default set to Access Point mode with the jumper placed at P58-VCC. I have not tried the out of box demo in station mode, but to make the out of box demo run in station mode, you need to remove the jumper placed at P58-VCC. 

        Your, access point details should also be set at common.h.

    Pieter Winter said:
    What is wrong here? Where does the "mysimplelink-11F8C" name come from in the first place?

    There is nothing wrong here. The mysimplelink-11F8C is AP name of your CC3200 Launchpad. You are able to see this at your smartphone, if your CC3200 Launchpad is configured in AP mode.

    - kel

  • Hi Pieter,

    Could you try these steps to make sure that wlan_ap feature doesn't work properly at your setup.

    1. Start wlan_ap example (debug from IAR/CCS), set AP name and complete the test.
    2. Start mode_config example and it will print the AP name first which has set in above step. Does it print wrong AP name compare to what you have set in step 1 ?

    or

    Try back to back mode_config example to set it in AP mode and check if last name given is printed and visible in network to connect any client.

    Regards,

    Jitendra

  • I am seeing this same issue. Debugging mode_config just gets you to the loop_forever in the main function and nothing shows up in my WLAN list.

    I would also note that the application note for mode_config example has a screenshot of terminal with last line as "please restart the device", while the sample code & my terminal ends with "Restarting network device..."


    I'm going to be looking through the sample code and try to figure this out.

    EDIT: I added debugging code to the wlan_ap code and it doesn't seem to be able to update the ssid:

                     *************************************************
                           CC3200 WLAN AP Application
                     *************************************************
    
    
    
    Host Driver Version: 1.0.0.1
    Build Version 2.2.7.1.31.1.2.4.2.1.5.3.23
    Device is configured in default state
    Device started as STATION
    Enter the AP SSID name: MyNewAP
    Got AP SSID name as: MyNewAP
    Device is configured in AP mode
    AP name: mysimplelink-111FC0
    Connect a client to Device
    

    The "AP name" part just before "Connect a client..." is the following code directly injected into WlanAPmode task:

        //
        // Display current mode and ssid name(for AP mode)
        //
        // For getting SSID from existing configuration
        char    pcNewSsidName[33];
        unsigned short mylen;
        mylen = 32;
        lRetVal = sl_WlanGet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SSID , &mylen, (unsigned char*) pcNewSsidName);
    
        UART_PRINT("AP name: %s\n\r",pcNewSsidName);
    

  • Fix that worked for me: Using Uniflash format the device (16MB, unsecured) and apply latest service pack.


    SSID can be changed now.

  • Markus Robinson said:
    Fix that worked for me: Using Uniflash format the device (16MB, unsecured) and apply latest service pack.

    CC3200 Launchpad Serial Flash size is 1 MB.

    - kel

  • Hi Pieter,

    Are you able to change the SSID of the AP?

  • Hi Kaushal,

    Yes, after first erasing, then applying the latest service pack, I got the example to work as advertised.

    Regards,

    Pieter