Saturday, November 20, 2010

Embedded Web Server Development kits from Parallax and XMOS

XMOS: XC-2 - An XS1-G4 based Embedded Web Server running a phy Ethernet interface

The XMOS web server development kit - the XC-2 is an excellent piece of hardware that runs the 32-thread 4-core XS1-G4 processor with integrated communications switch.  The kit ships with an implementation of an IP stack based on lwIP with most of the hardware functions implemented in software in parallel XC.

The Eclipse based environment also comes with command-line tools.  Here we have both the XC-2 and the XC-1A connected (64-threads and 8 cores).


The server gets assigned an IP address out of the box via DHCP.  You can control the device and it's LED hardware via this web page - very nice.

[WARN] Wed Nov 24 11:14:55 2010 A network computer (00229700111F) was assigned the IP address of 192.168.0.188.


Design Issue 1: Power consumption
The XMOS G4 32-thread/4-core microcontroller runs hot - an average of 55 degrees between all my boards.  If you plan to do development using only USB power or wish to reduce the power consumption/heat then add the following XC code snippet to all your cores.
    // reduce temperature by lowering the PLL multiplier
    unsigned coreid = get_core_id();
    write_pswitch_reg(coreid, XS1_PSWITCH_PLL_CLK_DIVIDER_NUM, 0x80);

Parallax Inc.: Spinneret - A Propeller based Embedded Web Server running the W5100 Ethernet Controller

The web server from Parallax is different and more interesting - It currently does not have a web server firmware stack - it is being developed as an open source project right now.  The reference board is 1/3 the cost of the XMOS board and can be programmed in SPIN bytecode.
I am honoured to be part of a project that is developing the complete software stack for application server functionality on the Parallax Spinneret Web Server - based on the 32-bit 8-core Propeller embedded controller and the WIZnet W5100 Ethernet controller.
http://forums.parallax.com/showthread.php?t=127254
This project is collaborative and open source, therefore all of the discussion and associated design, analysis and software is hosted on the parallax forum.  The code is SPIN (interpreted bytecode) and assembly oriented
http://forums.parallax.com/forumdisplay.php?f=82

A parallel work in progress in bringing an application server stack in XC (C with parallel and Transputer like processing links) on the XMOS XS1-G4 4-core 32-thread embedded processor is also in the works.  I may attempt to port the Oracle/SUN K Java VM that runs on ANSI C.
Product pages:
Parallax Propeller Spinneret Web Server
http://www.parallax.com/Store/Microcontrollers/PropellerDevelopmentBoards/tabid/514/ProductID/710/List/0/Default.aspx?SortField=ProductName,ProductName
Replaces/Deprecates the existing PINK module
http://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/CategoryID/36/List/0/SortField/0/Level/a/ProductID/40/Default.aspx
Competes with the 4-core/32-thread XS1-G4 based XMOS XC-2 Ethernet kit
http://www.xmos.com/products/development-kits/xc-2-ethernet-kit
Uses a simlar ethernet controller as the SparkFun WIZ200 module with the lower capabilities of the 1-core ATMega chip.
http://www.sparkfun.com/products/9474


Some views of the Propeller Ethernet development environment.


This is a video of an AJAX proof of concept demo I adapted quickly from a more structured but equally fully functional demo on Oracle WebLogic 11 Server.

http://www.youtube.com/watch?v=sNTTufau7ws

Note: Windows 7 64-bit OS users will not be able to see the embedded Flash video - use the link above.


Here is a packet capture of part of an asynchronous XML conversation between the chrome browser client and the Wiznet server.
We use Microsoft Network Monitor 3.4 to capture the TCP traffic.

DestinationAddress: Wiznet 16EF06 [00-08-DC-16-EF-06]
12 15:47:41 09-Dec-10 1.3868085 chrome.exe 192.168.0.194 192.168.0.184 HTTP HTTP:Request, GET /0=ajax0  {HTTP:9, TCP:8, IPv4:7}
13 15:47:41 09-Dec-10 1.4242680 chrome.exe 192.168.0.184 192.168.0.194 HTTP HTTP:HTTP Payload, URL: /0=ajax0  {HTTP:9, TCP:8, IPv4:7}
14 15:47:41 09-Dec-10 1.4247827 chrome.exe 192.168.0.184 192.168.0.194 HTTP HTTP:HTTP Payload, URL: /0=ajax0  {HTTP:9, TCP:8, IPv4:7}
15 15:47:41 09-Dec-10 1.4248200 chrome.exe 192.168.0.194 192.168.0.184 TCP TCP:Flags=...A...., SrcPort=50422, DstPort=HTTP(80), PayloadLen=0, Seq=3300657219, Ack=2245206617, Win=64229 (scale factor 0x0) = 64229 {TCP:8, IPv4:7}