Specifications

55
that the same message can be retransmitted, if required. The size of this buffer
can be specified.
2.7.9 Microchip HTTP Server
With Microchip‟s TCP/IP Stack comes a minimally implemented HTTP server.
The overburdened HTTP is stripped down to the essential features. The end
user is left to code their own features if more is needed. The HTTP server
incorporates a set of useful features to the user. The list below discusses these
features:
Supports multiple HTTP connections
Contains a simple file system (MPFS)
Supports Web pages located in either internal program memory or
external serial EEPROM
Includes a PC-based program to create MPFS images from a given
directory
Supports the HTTP method “GET” (other methods can be easily added)
Supports a modified Common Gateway Interface (CGI) to invoke
predefined functions from within the remote browser
Supports dynamic web page content generation
2.7.10 Implementation
In order to integrate the HTTP Server into a Suer application, the following must
be done:
1. Uncomment STACK_USE_HTTP_SERVER in the header file
“StackTsk.h” to enable HTTP Server related Code.
2. Set the desired MAX_HTTP_CONNECTIONS value in the “StackTsk.h”
header file
3. Include the files “http.c” and “mpfs.c” in the project
4. Depending where web pages are stored, uncomment either
MPFS_USE_PGRM, or MPFS_USE_EEPROM. If external data
EEPROM is used as a storage media, include the file “xeeprom.c” as well
5. Modify the main() function of the application to include the HTTP server.
The web pages needed to be stored on the server need to be generated in
advance and need to be converted into a compatible format for storage. The
page itself needs to be stored in a format that the server can readily read.
Provided by Microchip is the “Microchip File System” (MPFS). If the storage
space is being provided by EEPROM, the data can be uploaded via FTP. Figure
17 below shows an example of this.