Hello
I have the demo ARMCM4-STM32F407-LWIP-FATFS-USB running on the STM32-E407 board perfectly.
I want to turn on and off an LED from a web page, so I've seen I have to use CGI.
Someone can guide me as would have to configure cgi?? or some example?
thank you!
Lwip + HTML CGI + LED
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Lwip + HTML CGI + LED
Hi,
The very simple HTML server included in the demo does not allow for such complex things. You could parse the HTTP transaction "command line", the path that usually follows the domain name, and call specific functions when you decode certain patterns, this would be like implementing a CGI.
For example:
http://127.0.0.1/led=0
http://127.0.0.1/led=1
Giovanni
The very simple HTML server included in the demo does not allow for such complex things. You could parse the HTTP transaction "command line", the path that usually follows the domain name, and call specific functions when you decode certain patterns, this would be like implementing a CGI.
For example:
http://127.0.0.1/led=0
http://127.0.0.1/led=1
Giovanni
Re: Lwip + HTML CGI + LED
The httpserver_raw app included in lwip contribution is ready for cgi callback : http://ftp.igh.cnrs.fr/pub/nongnu//lwip ... -1.4.1.zip
just call the httpd_init() function in the thread.
just call the httpd_init() function in the thread.