Datasheet

Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
The Webserver and HTTPApp.c
The webserver is a great feature of Flyport. It permits monitoring and controlling Flyport's functions
using a simple web browser. The browser can be installed on a PC, a smartphone or a tablet. The
webserver service is performed by HTTPApp.c and webserver files, which use dynamic variables. The
webserver task is independent from the user task, so they may be seen as separate systems (like two
different software programs running on a the same PC).
What is a Webserver and How It Works
A webserver is a html page that a browser interprets and display with text, graphics and interactive
contents. The final result is generally a combination of html code and multimedia files, as well as
“smart” scripts.
The access of content between a webserver and a Client (the web browser) is a file exchange. All the
HTML pages, images, sounds and scripts are files that the Client downloads from the Server and
displays as a web page. To download these files, the Client requests them from the Server that
handles the data exchanges. Once the Client has enough information, it renders the page on at the
screen of a PC , tablet or smartphone.
Flyport Webserver and How It Works
The Flyport webserver is no different than a conventional webserver. Flyport plays the role of Server
when a browser tries to render its webpage and sends its webserver files to Clients. Files can be
images, htm, scripts and so on.
The only difference between Flyport and conventional webservers is in the hardware structure. An
embedded device is not a professional server; it remains an embedded device and its memory, its
bandwidth and its calculation power are limited... don't try to stream 2hours of HD video with a
16MIPS microcontroller, it could be a bad experience!
As with other webservers, Flyport also stores files in its memory as an “index.htm” page or
“Openpicus.jpgimage or “status.xml” or “mchp.js” for example. The files should be as small as
possible due to the limited internal memory of Flyport PIC microcontroller.
QUESTION: How can I create a webserver page?
Every HTML page can be written using any simple text writing tool, for example Notepad or
Notepad++. There are lots of dedicated software programs for htm code writing, and they could be
used as well.
The openPicus IDE helps developers with the tedious import phase by using a simple helper tool
(derived from Microchip's MPFS file system generator) called “Web pages”. It permits the user to
select a folder to import. After pressing the button “Generate,” the website inside the folder will be
automatically converted and compiled to be used with openPicus Framework and Flyport module.
56