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 netapp/webserver how to change the files on the board

Other Parts Discussed in Thread: UNIFLASH, CC3200, CC3100

Hello, I don't know very well how to explain my question, but I will give the best try.


I have understand that in the netapps folder there's a webserver project that we can import. This project seems to have the basic configurations of the web server, like what to do when it gets a GET request etc... I would like to know how to reupload this files to the board.


I had try to change the files on the folder, rebuild them and then rebuild the project I'm working at (one of those who use the server) but nothing seems to be different. Like I can even change one of the main functions of the webserver, it will work like worked before. Do I have to reupload the files to the board, or do something in my project?


Best Wishes

  • Hi,

    You need to upload those files using Uniflash. See, Uniflash wiki processors.wiki.ti.com/.../CC31xx_&_CC32xx_UniFlash

    I do not know about webserver project in netapps folder. But, I suggest you see httpserver example program if you want to learn about webserver at CC3200.

    See, also the "CC3100\CC3200 SimpleLink™ Wi-Fi® Network Processor Subsystem Programmer's Guide".

    - kel
  • Hi, thanks for the answer but

    The thing is I changed the file HttpStatic.c, you can found it in "netapps/http/server" folder. I'm changing the function HttpStatic_InitRequest like, where it says www/main.html (guess its to say the page to access by default is main.html) to acess another page, I build the project.

    Then I rebuild my own project, and try to acess the server, but it sends me to the main.html page again.
  • Hi,


    You need to re-compile library and application after changes. Flash the updated binary and web page at www/ that you want to access as default webpage.


    Regards,
    Aashish
  • Hi,

    Already had done that.

    What I do was:

    Change webserver project ->Rebuilt it; Rebuilt simplelink, driverlib, oslib, ti_rtos_config.

    Rebuilt my own project.

    Reupload the project to the board. And Still nothing :/

    Any idea?
  • Hi,


    Please share changes you made in HttpStatic_InitRequest() API.


    Regards,
    Aashish
  • Sure. BTW I'm using the project wlan_ap, a little bit changed, but nothing too serious. Changes I made in bold

    int HttpStatic_InitRequest(UINT16 uConnection, struct HttpBlob resource)
    {
        char *pcWWWFsDir = "www";
        memset(g_cFileName,'\0',40);

        if(resource.uLength ==1 && *(resource.pData)=='/')
        {
            strcpy(g_cFileName,"www/networks.html");
        }
        else
        {    
            strcpy(g_cFileName,pcWWWFsDir);
            strncat(g_cFileName,(char*)resource.pData,resource.uLength);
            strcpy(g_cFileName,"www/networks.html");
        }

        if(sl_FsOpen((unsigned char*)g_cFileName,FS_MODE_OPEN_READ,NULL,&glFileHandle)<0)
            return 0;
        else
        {
            return 1;
        }
    }

    Basically I was expecting the server always give me the same page. And Yes, the page is upload on the board, cause if I do simplelink.net/networks.html it shows the page

    Thanks :)

  • Hi,


    Please make sure to disable internal http server by calling sl_NetAppStop() and running netapp http server by calling HttpServerInitAndRun(). Pleas refer HttpServerAppTask() in websock_camera\httpserverapp.c


    Regards,
    Aashish