Copyright © Parallax Inc.
WIZnet W5200 for QuickStart (#40002)
v1.0 3/13/2013 Page 10 of 10
About the simple_server.spin Program
The IP address of the WIZnet W5200 board is automatically obtained by your network’s DHCP server. In
most cases, the DHCP server will be your network’s router. Since a DHCP server dynamically assigns IP
addresses by usage and the number of clients currently connected to the network, your WIZnet W5200
board’s IP address will almost certainly be different than the one in the screenshot above. To determine
your WIZnet W5200 board’s IP address, refer to the “Requesting a Dynamically Assigned IP Address for
the W5200” section on page 7.
Note that the SD card driver used to allow the Propeller to interface with the SD card cannot descend into
sub-directories. Thus, to serve files from the SD card, the files need to be located in the SD card’s root
directory. In other words, keep all files you expect to serve with the W5200 board out of folders.
Additionally, the SD card driver does not support long file names, so make sure that all of your file names
are 8 characters or less with a 3-character or less file extension.
Within the index.htm HTML web page file, there is a special HTML tag that simple_server.spin looks for
when the page is rendered to the browser. This specific string should have the form:
<!--PROPVARxx-->
…
where the “
xx
” is replaced by numeric values between 00 and 99. This gives you the ability to place
100 numbers into the web server’s memory. When a request for a web page is made, the web server
begins to serve the page, while searching for the specific string. When it finds the specific string, the
web server replaces the specific string with the numeric value of the user variable referenced by the
specific string.
You can update the value held in a user variable slot with your program by calling:
PUB SetUserVariable(varNumber, val)
…which is located in the W5200 Parse and Replace Webserver.spin object file. The first parameter,
varNumber
, is the user variable slot to update. This value can range from 0 to 99. The second parameter,
val
, is the value you want to store in that user variable slot.
Resources and Downloads
Check for the latest version of this document, free software, and example programs on the product page.
Go to www.parallax.com and search “40002”.
Revision History
Version 1.0: Original release