Due to the U.S. Thanksgiving holiday, please expect delayed responses during the week of 11/22.

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-LAUNCHXL: CC3200-LAUNCHXL

Part Number: CC3200-LAUNCHXL
Other Parts Discussed in Thread: CC3100, CC3200, UNIFLASH, CC3200SDK

Hi,

I got my CC3200 launchpad XL and started exploring and testing examples from SDK and CC3100/CC3200 SimpleLinkTm Wi-Fi®
Internet-on-a-Chip User Guide. I was interested in AP mode and started testing the WLAN_AP example with the code example from the User guide mentioned earlier. It did not work and I got multiple errors.

After that and went back to the original code of the wlan_ap example, but unfortunately, I was not able to connect my iPhone to the AP on CC3200. I have no clue since I have now experience in WiFi and wireless boards.

Anyone out there who has some idea to share? would appreciate it.

Regards,

Rawi

  • int main()
    {
    int SockID;
    unsigned char outLen = sizeof(SlNetAppDhcpServerBasicOpt_t);
    unsigned char channel, hidden, dtim, sec_type, wps_state, ssid[32],
    password[65], country[3];
    unsigned short beacon_int, config_opt, config_len;
    SlNetAppDhcpServerBasicOpt_t dhcpParams;
    _NetCfgIpV4Args_t ipV4;
    sl_Start(NULL, NULL, NULL);
    Sleep(100);
    // Set AP IP params
    ipV4.ipV4 =
    SL_IPV4_VAL(192,168,1,1);
    ipV4.ipV4Gateway =
    SL_IPV4_VAL(192,168,1,1);
    ipV4.ipV4DnsServer = SL_IPV4_VAL(192,168,1,1);
    ipV4.ipV4Mask = SL_IPV4_VAL(255,255,255,0);
    sl_NetCfgSet( SL_IPV4_AP_P2P_GO_STATIC_ENABLE,
    1
    ,sizeof(_NetCfgIpV4Args_t),
    (unsigned char *)&ipV4);
    //Set AP mode
    sl_WlanSetMode(ROLE_AP);
    //Set AP SSID
    sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SSID, strlen("cc_ap_test1"),
    (unsigned char *)"cc_ap_test1");
    //Set AP country code
    sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,
    WLAN_GENERAL_PARAM_OPT_COUNTRY_CODE, 2,(unsigned char *)"US");
    //Set AP Beacon interval
    beacon_int = 100;
    sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_BEACON_INT, 2, (unsigned char *)
    &beacon_int);
    //Set AP channel
    channel = 8;
    sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_CHANNEL, 1, (unsigned char *)
    &channel);
    //Set AP hidden/broadcast configuraion
    hidden = 0;
    sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_HIDDEN_SSID, 1, (unsigned char *)
    &hidden);
    //Set AP DTIM period
    dtim = 2;
    sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_DTIM_PERIOD, 1, (unsigned char *)
    &dtim);
    //Set AP security to WPA and password
    sec_type = SL_SEC_TYPE_WPA;
    sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SECURITY_TYPE, 1, (unsigned char *)
    &sec_type);
    sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_PASSWORD,
    strlen("password123"), (unsigned char *)"password123");
    sl_Stop(100);
    sl_Start(NULL, NULL, NULL);
    //Retrive all params to confirm setting
    //Get AP SSID
    sendLog("**********************AP parameters***********************\n");
    config_opt = WLAN_AP_OPT_SSID;
    config_len = MAXIMAL_SSID_LENGTH;
    sl_WlanGet(SL_WLAN_CFG_AP_ID,
    &config_opt , &config_len, (unsigned char*) ssid);
    sendLog("SSID: %s\n",ssid);
    //Get AP country code
    config_opt = WLAN_GENERAL_PARAM_OPT_COUNTRY_CODE;
    config_len = 3;
    sl_WlanGet(SL_WLAN_CFG_GENERAL_PARAM_ID,
    &config_opt, &config_len,(unsigned char*) country);
    sendLog("Country code: %s\n",country);
    //Get AP beacon interval
    config_opt = WLAN_AP_OPT_BEACON_INT;
    config_len = 2;
    sl_WlanGet(SL_WLAN_CFG_AP_ID,
    &config_opt, &config_len, (unsigned char*) &beacon_int);
    sendLog("Beacon interval: %d\n",beacon_int);
    //Get AP channel
    config_opt = WLAN_AP_OPT_CHANNEL;
    config_len = 1;
    sl_WlanGet(SL_WLAN_CFG_AP_ID,
    &config_opt, &config_len, (unsigned char*) &channel);
    sendLog("Channel: %d\n",channel);
    //Get AP hidden configuraion
    config_opt = WLAN_AP_OPT_HIDDEN_SSID;
    config_len = 1;
    sl_WlanGet(SL_WLAN_CFG_AP_ID,
    &config_opt, &config_len, (unsigned char*) &hidden);
    sendLog("Hidden: %d\n",hidden);
    //Get AP DTIM period
    config_opt = WLAN_AP_OPT_DTIM_PERIOD;
    config_len = 1;
    sl_WlanGet(SL_WLAN_CFG_AP_ID,
    &config_opt, &config_len, (unsigned char*) &dtim);
    sendLog("DTIM period: %d\n",dtim);
    //Get AP security type
    config_opt = WLAN_AP_OPT_SECURITY_TYPE;
    config_len = 1;
    sl_WlanGet(SL_WLAN_CFG_AP_ID,
    &config_opt, &config_len, (unsigned char*) &sec_type);
    sendLog("Security type: %d\n",sec_type);
    //Get AP password
    config_opt = WLAN_AP_OPT_PASSWORD;
    config_len = 64;
    sl_WlanGet(SL_WLAN_CFG_AP_ID,
    &config_opt, &config_len, (unsigned char*) password);
    sendLog("Password: %s\n",password);
    //Get AP WPS state
    config_opt = WLAN_AP_OPT_WPS_STATE;
    config_len = 1;
    sl_WlanGet(SL_WLAN_CFG_AP_ID,
    &config_opt, &config_len, (unsigned char*) &wps_state);
    // Set AP DHCP params
    //configure dhcp addresses to: 192.168.1.10 - 192.168.1.20, lease time
    4096 seconds
    dhcpParams.lease_time = 4096;
    dhcpParams.ipv4_addr_start = SL_IPV4_VAL(192,168,1,10);
    dhcpParams.ipv4_addr_last = SL_IPV4_VAL(192,168,1,20);
    outLen = sizeof(SlNetAppDhcpServerBasicOpt_t);
    sl_NetAppStop(SL_NET_APP_DHCP_SERVER_ID);
    sl_NetAppSet(SL_NET_APP_DHCP_SERVER_ID, NETAPP_SET_DHCP_SRV_BASIC_OPT,
    outLen, (unsigned char*)&dhcpParams);
    sl_NetAppStart(SL_NET_APP_DHCP_SERVER_ID);
    // Get AP DHCP params
    sl_NetAppGet(SL_NET_APP_DHCP_SERVER_ID, NETAPP_SET_DHCP_SRV_BASIC_OPT,
    &outLen, (unsigned char*)&dhcpParams);
    }

  • Hi Rawi,

    When you load and run the default wlan_ap example from the SDK, can you share your steps?

    Keep in mind, if you are loading an example using the debugger (like with Code Composer Studio), the image will not be retained on reset (resetting the board or unplugging it). To retain in the image, you will have to flash it using a tool like UniFlash v3.4.1.

    Best regards,

    Sarah

  • Hi ,

    I followed the steps in "CC3200 SimpleLink Wi-Fi and IoT Solution With
    MCU LaunchPad Getting Started Guide",

    I have tried to flash the image using uniflash but I could not do it, do you have some tips on how to use Uniflash?

    /Rawi

  • Hi Rawi,

    Are you printing out logs to the terminal? Is the CC3200 AP network visible on your phone or other device?

    See the CC3100, CC3200 UniFlash User's Guide. You must use UniFlash version 3.4.1 with CC3200 devices. The most recent version of UniFlash will not work with CC3200.

    Best regards,

    Sarah

  • Hi,

    I am, all is good but the code is waiting a client to connect to CC3200, which is the problem. 

    It is good to know that newer Uniflash versions dose not support CC3200.

    Best regards,

  • I tried to go through this Out of box example "https://software-dl.ti.com/ecs/CC3200SDK/1_5_0/exports/cc3200-sdk/example/out_of_box/README.html", i load the out_of_box.usf to Uniflash, but I got an error when trying to verify or program "Encountered a problem loading file: C:\ti\CC3200SDK_1.5.0\cc3200-sdk\example\out_of_box\html\out_of_box.usf
    Could not determine target type of file".

    Any idea?

    Thank you,

    Rawi

  • Hi Rawi,

    Can you attach a screenshot of when this UniFlash error occurs?

    Best regards,

    Sarah

  • Hi Rawi,

    You are trying to load the program over the debug interface, which is not correct. You need to choose the CC3x serial UART interface in order to flash the CC3200. Also be sure your SOP pins are set to 100. See the UniFlash guide I linked to above.

    To load a .usf file, choose "open target configuration" instead of new.

    Best regards,

    Sarah

  • Hi Sarah P,

    Thank you for the clarification!

    I did read the Uniflash guide but not too much to pick from there.

    I did as you suggested and i am getting an error( kindly see image attached):

    Now, my concern is how to reset the chip to the "factory default" mode, is there any way to do it?

    Best regards,

    Rawi

  • Hi Rawi,

    The path to the application binary is likely wrong. Click on /sys/mcuimg.bin and change the file path. It should be cc3200-sdk/example/out_of_box/ccs/Release/out_of_box.bin. This is in section 8.2 of the UniFlash guide.

    "Factory default" would be formatting the serial flash using Format. After that, a recent servicepack is required. You can load this using Service Pack Programming. 

    Best regards,

    Sarah

  • Hi Sarah,

    I am able to connect to my CC3200 now, thank you for your help!

    Best regards,