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.

Can not open html pages from SD-CRD in TI-RTOS , HTTP Server Sample program

Dear All,

I am new on TI-RTOS and HTTP.

I am working on  sample program of HTTP Server with SD card  but i am getting HTTP/1.0 404 - File Not Found

error.

I have DK-TM4C129X series board, i had tried http server program and it's working fine.Using that code accessed  one html page using IP.

Now i want to use sd card for html pages , i have copied Index.html and Index_withCGI.h to SD card and modified the code as per Todd Mullanix presentation.

also changed ffconf.h for LFN.

please find attached zip for project and ffconf.h.

please help to short out this problem.

Waiting for your reply , Thank you.

Regards,

Rohit6518.httpServer_withSD.rar

  • Hi,

    Please see the following related thread which may help you:

    e2e.ti.com/.../1029640

    Steve
  • Thank you Steven,


    I had referred link shared by you , but i think it's different from my case.

    I don't want to include .h file for html page , i want to place both html page and .h file in sd card , and from that i want to access from browser.

    And in your referred link , added .h file and html page in sd card.

    Please help me to access html page from browser stored in sd card.

    Waiting for your replay.

    Regards,

    Rohit

  • Hi Rohit,

    I see that you have included and modified ffconf.h in your project.

    You need to make these changes in your TI-RTOS installation and then rebuild TIRTOS and also your app.

    This is detailed in step #2 of slide 41 (found in the zip file).  You can also find directions for how to rebuild TIRTOS in the User's Guide (section "Rebuilding TI-RTOS").

    Can you try doing that?


    Steve

  • Thank you steven,

    I had already rebuild the TI-RTOS and tested that code by % ../<xdctools>/gmake –f tirtos.mak and again today i had retried to rebuild the TI-RTOS by % ../<xdctools>/gmake -f tirtos.mak all command , but i just get fail to access page in browser. Same error 404 file not found.

    If any body had tried this to access html pages and header files from SD card , please guide me , it will greatly helpful to me.

    If any directory should to be declare some ware in code from where bios finds html pages , or should any folder to be create in sd card?

    Waiting for your replay.

    Thanks & Regards,

    Rohit   

  • Hi Rohit,

    Are you able to open the "ipaddr>/chip.jpg " file?

    Yashpal Patel49892 said:
    I had already rebuild the TI-RTOS and tested that code by % ../<xdctools>/gmake –f tirtos.mak and again today i had retried to rebuild the TI-RTOS by % ../<xdctools>/gmake -f tirtos.mak all command

    How did you rebuild TI-RTOS?  Did you make a copy of your TI-RTOS install and then update and rebuild that copy?

    If so, did you update your project to use your rebuilt copy of TI-RTOS?  I just want to make sure you are using the proper TI-RTOS (that you rebuilt with the changes to ffconf.h).

    ----
    Can you also try putting a break point at "efs_open"?   Do you hit this function?

    If so, you should next hit fopen() and then ffcio_open().  Can you verify that you hit those functions next?  (you could do that by single stepping into the code of efs_open, or setting break points for these functions)

    Steve

  • Hi,Steven,

    I had not created copy of TI-RTOS , i had rebuild the same installed TI-RTOS.

    I have one more configuration that if i want access jpg from sd card i have to write <ip add>xxx.jpg but can't access that jpg.

    i had tried to put break point at efs_open() , it works.below is the screen shot.

    prefixName is not complete it shows inde , not full name. fopen returns 0.

    Can help in this?

    Thanks & Regards,

    Rohit

  • Hi Rohit,


    This morning I went ahead and rebuilt the TIRTOS 2.16.01.14 drivers for LFN support (drivers version tidrivers_tivac_2_16_01_13).

    One thing I noticed is there is a typo in the HTTP slides.   _CODE_PAGE in FATFS should be set to 437 (slides show 432, but there’s no option for that).  So I want to verify that you set this to 432.

    I then updated the standard TCP echo example (for the DK-TM4C129X) with the changes found in the HTTP slide's corresponding zip file (from the httpServer_withSD finished project).

    Finally, I made sure to copy the index.html file, and the index_withcgi.html file to the SD card and inserted the card into the slot on the Tiva board (I'm sure that you did this but please double check)

    I ran the example and successfully got an IP address.

    I opened my browser and typed in:

    http://<IP ADDRESS>/index_withcgi.html


    I could see the page successfully.  I could also run the CGI function to get the time successfully.


    I've attached both my project and the entire install of TI-RTOS that was rebuilt for the LFN support.  Please find the attachments.

    Can you try running the attached app and see if it works for you?

    Can you try rebuilding your application against the updated TI-RTOS that's attached and verify that it works for you?

    If it's not working, then I would suggest that you run a comparison of these attachements vs. what you have on your PC to see what's different.

    Cheers,

    Steve

    3060.tcpEcho_update_webserver_SD_card.zip

  • Sorry, the forums won't allow me to upload the TIRTOS zip.

    Here's one of just the rebuilt FATFS library.  You can copy it over your existing FATFS library and then rebuild your app:

    3568.fatfs.zip