This is a little HTTP Webserver and a FTP file server (DynDNS link at end of page).
The basic idea was to create a simple webserver but I wanted to be able to use real .htm and picture files and most important
to be able to update the pages through the LAN. One other issue was the configuration of the IP addresses and ports. This
data is stored on the SD card and can also be uploaded via FTP. The system automatically reboots when the config file has
been written anew. Just for fun I connected the VS1011 board to the uServer and actually managed to get it to play Shoutcast! Thus an
internet radio will follow soon.
The LAN and power connectors.
You can see how small it is compared with an SD card.
The device is built into a little plastic case. It has several status LED's for webserver, FTP server, SPI and
FAT activity. It has the LAN and power connectors on the rear side and the LED's and inlet for SD card in the
front. The parts are mounted on a small etched PCB.
The device is programmed in BASCOM-AVR that already includes the AVR-DOS FAT file system. The routines for
interfacing the W5100 are relatively simple.
The complete setup for the W5100 is stored on the SD-card. Changing ports or IP address is just a matter of changing the config file.
The data format of the config file allows comments:
0000:00 Common mode register
0001:c0 Gateway IP 192.168.0.10
0002:a8
0003:00
0004:01
0005:ff Subnet IP 255.255.255.0
0006:ff
0007:ff
0008:00
and so on...
The first words give the address in HEX and the byte the value.
The HTTP server (v1.0) currently only supports the GET command. Others will return the 501 "command not implemented". The webpages are stored in the "HTTP" folder on the SD card. Any files can be put in the folder and will dynamically be sent to the client according to the file name given in the GET-request. If the file is not found the famous 404 error is returned. It has a data-throughput of about 26Kb per second. In addition various information can be viewed by opening the "status.htm" file. This file is dynamicaly created by the system on startup or after a FTP session and gives IP addresses and file system information such as free disk space.
The basic server runs nicely but there is still a lot more to be implemented. Future features will be the possibility to update the firmware via FTP. The FTP is still a bit sensitive to wrong parameters. This will eventually be improved.
The Wiznet WIZ810MJ is a module that holds the W5100 IC. The W5100 is a full-featured Ethernet controller designed for embedded applications. It includes a hardwired TCP/IP stack and an Ethernet MAC & PHY. Supported protocols are TCP, UDP, IPv4, even PPPoE and others. It is either interfaced through a parallel bus or an SPI. Its performance is up to 2.6Mb per second and has 4 independent sockets.
To visit the WizNet homepage click here.
The FTP server functions to upload the HTTP files and also works as a file server. It supports guest login and admin login. In guest login only the USER folder can be browsed but not the CONF config folder or the folder that holds the website.
The following commands are currently implemented:
USER
PASS
QUIT
PWD
SYST
PASV
TYPE A/I
CDUP
CWD
MKD
RMD
DELE
STOR
RETR
LIST
SIZE
RNFR
RNTO
PORT
The program has been tested in local LAN with Total Commander and via GynDns over the internet.
Speed:
25 Kb/s download
2.5 Kb/s upload
The server runs a simple htm based website stored on the SD-card. It also has a mobile version. It uses jqeury mobile. With the JQM it is very simple to create a nice mobile webpage. There is also a demo interface of switching ports and receiving live data from the µServer. For a live demo please write an email because the µServer is not on all the time.
The device uses my own Dynamic DNS service called "GynDNS". The service and website of GynDNS is placed in a subdomain.
Please write me an email if you encounter any problems: tech@gearloose.net.
The complete setup for the W5100 is stored on the SD-card. Changing ports or IP address is just a matter of changing the config file.
The data format of the config file allows comments:
0000:00 Common mode register
0001:c0 Gateway IP 192.168.0.10
0002:a8
0003:00
0004:01
0005:ff Subnet IP 255.255.255.0
0006:ff
0007:ff
0008:00
and so on...
The first words give the address in HEX and the byte the value.
The HTTP server (v1.0) currently only supports the GET command. Others will return the 501 "command not implemented". The webpages are stored in the "HTTP" folder on the SD card. Any files can be put in the folder and will dynamically be sent to the client according to the file name given in the GET-request. If the file is not found the famous 404 error is returned. It has a data-throughput of about 26Kb per second. In addition various information can be viewed by opening the "status.htm" file. This file is dynamicaly created by the system on startup or after a FTP session and gives IP addresses and file system information such as free disk space.
The basic server runs nicely but there is still a lot more to be implemented. Future features will be the possibility to update the firmware via FTP. The FTP is still a bit sensitive to wrong parameters. This will eventually be improved.
The Wiznet WIZ810MJ is a module that holds the W5100 IC. The W5100 is a full-featured Ethernet controller designed for embedded applications. It includes a hardwired TCP/IP stack and an Ethernet MAC & PHY. Supported protocols are TCP, UDP, IPv4, even PPPoE and others. It is either interfaced through a parallel bus or an SPI. Its performance is up to 2.6Mb per second and has 4 independent sockets.
To visit the WizNet homepage click here.
The FTP server functions to upload the HTTP files and also works as a file server. It supports guest login and admin login. In guest login only the USER folder can be browsed but not the CONF config folder or the folder that holds the website.
The following commands are currently implemented:
USER
PASS
QUIT
PWD
SYST
PASV
TYPE A/I
CDUP
CWD
MKD
RMD
DELE
STOR
RETR
LIST
SIZE
RNFR
RNTO
PORT
The program has been tested in local LAN with Total Commander and via GynDns over the internet.
Speed:
25 Kb/s download
2.5 Kb/s upload
The server runs a simple htm based website stored on the SD-card. It also has a mobile version. It uses jqeury mobile. With the JQM it is very simple to create a nice mobile webpage. There is also a demo interface of switching ports and receiving live data from the µServer. For a live demo please write an email because the µServer is not on all the time.
The device uses my own Dynamic DNS service called "GynDNS". The service and website of GynDNS is placed in a subdomain.
Please write me an email if you encounter any problems: tech@gearloose.net.
NEXT
|