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.

Storing the IP address, Gateway, Sub-net mask etc. set in the web-page of the browser into the serial flash of the CC3200.

Other Parts Discussed in Thread: CC3200, CC3100

Hi, i am relatively new to using the CC3200 LaunchPad. I am referring to the sample codes provided in the CC3200-SDK. 

In the example "httpserver", the CC3200 acts as AP and connects to the browser(client).

There is communication between the CC3200 and the client, and all changes done in the web-page are reflected in the CC3200.

I want to store the IP address, Gateway, Sub-net mask etc. set in the web-page of the browser into the serial flash of the CC3200.

Please help me where i can find these parameters while debugging my source code(httpserver).

Thank you in advance. 

  • Hi Abhishek,

    First of all, welcome to the SimpleLink WiFi users family.

    Second, I highly recommend that you will read through our programmers guide that can be found in the following link: http://processors.wiki.ti.com/index.php/CC32xx_Programmers_Guide

    Specifically, please refer to the "CC3100\CC3200 SimpleLink™ Wi-Fi® Network Processor Subsystem" guide; Chapter 12 refers to the HTTP server, your answer would be found in sub-chapters 12.10 and 12.8.

    Please let us know if after reading those chapters, you have any further questions.

    Thanks,
    Alon

  • Thank you so much for replying Alon, really appreciate your response.

    I went through the document and understood that GET is used for getting tokens from browser to the CC3200 device while POST is used to send the tokens from the browser to the CC3200. Is that correct ??

    Furthermore, if i want to get the SSID name(__SL_G_PN1) set in the browser into the CC3200, how should i go about it ??

    Is the following code correct ??

    /*HTTP Server Callback example */
    void SimpleLinkHttpServerCallback(SlHttpServerEvent_t *pHttpServerEvent,
    SlHttpServerResponse_t *pHttpServerResponse)
    {
    switch (pHttpServerEvent->Event)
    {
    /* Handle Get token value */
    case SL_NETAPP_HTTPGETTOKENVALUE:
    {
    char * tokenValue;


    tokenValue = GetTokenValue (pHttpServerEvent >EventData.__SL_G_PN1);


    /* Response using driver memory - Copy the token value to the Event response
    Important - Token value len should be < MAX_TOKEN_VALUE_LEN (64 bytes) */


    strcpy (pHttpServerResponse->ResponseData.token_value.data, tokenValue);

    pHttpServerResponse->ResponseData.token_value.len = strlen (tokenValue);
    }
    break;

    If this is incorrect, kindly guide me on how to get the SSID name set in the browser into mthe CC3200 device.

    I will do the same for other tokens which i want to store in CC3200.

    Thank you.

  • Thank you.

    I figured this one out.

    I defined some tokens myself, created my own webpage, and sent data accordingly.

    Now, i am able to receive IP address, DNS server, Gateway etc set in the browser into my CC3200 code.

    Thank you for inputs.

    Regards,

    Abhishek.