PClient reference design HTTP server

The pclient reference design implements a complete HTTP server using the oWL Pico API. The HTTP server is an example on how to use the owl pico API to create network applications.

The HTTP server is automatically started when the Wi-Fi link is up an ip address is configured:

$ linkup hdwireless
ok 0 (success)
link_cb: link:1
$ set_dhcp 1
addr_cb ip:192.168.2.112
httpd started

The HTTP server is stopped when the wifi link goes down and/or the ip address is removed:

$ linkdown
ok 0 (success)
addr_cb ip:none
httpd stopped
link_cb link:0

When the HTTP server is running, a PC connected to the same network can be used to access the web server data. On the PC, open a web browser (e.g. explorer) and then enter the IP address of the HTTP server (192.168.2.112 in this case). The web browser should now promptly respond with the following page:

The buttons on the web page can be used to control LEDs on the host.

For information on the implementation of the HTTP server and for details on how to modify and tailor the HTTP server solution, see the source code in the httpd directory of the reference design. The HTTP server implementation is split into the files wlp_httpd.c, web_content.c, and match.c.

Topic attachments
I Attachment Action Size Date Who Comment
GIFgif http.gif manage 21.9 K 2011-02-04 - 14:37 AndersGrahn  
Topic revision: r3 - 2011-02-04 - 14:39:06 - AndersGrahn

Log In (Admin Only)

 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback