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.

EK-TM4C1294XL: Webserver documentation

Part Number: EK-TM4C1294XL

Tool/software:

Hi, 

I am new with TI and I am struggling a lot to find documentation for help. 

I was able to execute the example provided in https://www.ti.com/lit/zip/spma080 and went trough the document 4C129x Ethernet Applications for Socket-Based TI-RTOS NDK. However there no much thing about SSI, CGI and all how everything works.

I also run enet_io and enet_lwip with success. I made some change to the HTML file just for fun and test purposes with /tools/bin/makefsfile -i fs -o io_fsdata.h -r -h -q.

I was able to make a Static IP without any problem. 

Now my goal is to interact with the EK-TM4C1294XL via a web page. I know the code in enet_io does allow it but I can't find the logic behind of it. I do not know where I can find the documentation to make my own webpage and to interact directly with the board.

I did go to http://savannah.nongnu.org/projects/lwip/ as suggested from the example but once again I am completely lost. 

So my main question is. How can I interact from a web server to the EK-TM4C1294XL and let say just make a blinking light from a port I decided. 

Thanks.

  • Now my goal is to interact with the EK-TM4C1294XL via a web page. I know the code in enet_io does allow it but I can't find the logic behind of it. I do not know where I can find the documentation to make my own webpage and to interact directly with the board.

    So my main question is. How can I interact from a web server to the EK-TM4C1294XL and let say just make a blinking light from a port I decided. 

    Hi,

      enet_io certainly is the best example to demonstrate how to blink a LED on the board based on a HTTP request from a client (e.g. a browser). 

      I will suggest you put a breakpoint at line 85 where the LED is toggled using the io_set_led() function in the io_fs.c file. You can then use the callstack to see how the chain of functions are called to finally arrive at io_set_led(). Basically, the example will parse the HTTP request from the browser. The handling of HTTP request is done in the file C:\ti\TivaWare_C_Series-2.2.0.295\third_party\lwip-1.4.1\apps\httpserver_raw\httpd.c. Note that HTTP demo is part of the lwIP release. 

  • Thanks for the quick reply Charles,

    While waiting for any suggestion, I dive into the JS file and realize from the demo 1 SET function are made this way

    req.open("GET", "/cgi-bin/xxxxx...."..) 

    and GET function without the "cgi-bin". 

    From the fs folder I do not see any cgi-bin 

    Do you have any link that could explain that ?

    Thanks.

  • I will suggest you use Wireshark to look at the network traffic. The cgi-bin comes from the payload sent by the browser. 

  • from my understanding it been pass because we send the XMLHTTPrequest with that link.

    I was wondering if I need absolutely use this format to send a some kind of specific request to the webserver ? 

  • I don't  think you need to use the exact format. While I don't know what other formats you want to use, it should work if the firmware interpreting it knows the format. You are free to modify the example for your needs. 

  • Thanks for your time Charles