Domino, Ethernet Shield & HTTPWebRequest Class Question

Hello Everyone …

I have a question about networking.

Recently, I downloaded and installed the most recent version of the GHI NETMF SDK. After updating the Domino’s firmware, I began messing around with an Ethernet shield. I had no problem getting the SocketServer example to work, so I decided to try what I hoped would be a few simple experiments. :slight_smile:

My first experiment was inspired by the excellent NOAA Weather API provided by Chris on ( The API is very comprehensive and intended for FEZ Cobra/ChipworkX … my goal is a lot simpler.

As a first step, all I want to do is fetch the XML for a single ASOS site using the HTTPWebRequest class. I found some sample code on the web ( which worked perfectly in .NET on a PC.

Initializing the W5100 wasn’t difficult, I borrowed part of the SocketServer example code:

            byte[] ip = { 192, 168, 1, 110 };
            byte[] subnet = { 255, 255, 255, 0 };
            byte[] gateway = { 192, 168, 1, 1 };
            byte[] mac = { 222, 173, 190, 239, 254, 237 };
            // Set up hardware
            WIZnet_W5100.Enable(SPI.SPI_module.SPI1, (Cpu.Pin)FEZ_Pin.Digital.Di10, (Cpu.Pin)FEZ_Pin.Digital.Di9, true);
            NetworkInterface.EnableStaticIP(ip, subnet, gateway, mac);
            NetworkInterface.EnableStaticDns(new byte[] { 192, 168, 1, 1 });

After adding the required assemblies and namespaces, the HTTPWebRequest part of the code was pretty straight forward, too:

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create("");
            // Execute the request
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            // Read data via the response stream
            Stream resStream = response.GetResponseStream();

My question is, what do I have to do in between the hardware initialization and the HTTP request as far as setting up a socket, etc is concerned? I tried searching the forum and on the web, but I didn’t find anything that is really helpful to me. My networking experience (Ethernet Shield + Arduino) is limited, so I’d appreciate any specific tips or suggested reading.


OK … Let’s try a different approach.

I have been trying to use the HTTPWebRequest class with a Domino and Ethernet shield. I keep getting a “System not supported” exception at run time. Is this telling me that the Domino doesn’t support this class?

You are right.
Domino uses W5100 sockets which are in the GHI assembly. HttpWebRequest uses MS sockets. I have just ported HttpListener which uses W5100 socket for GHI. HttpWebRequest is in the same assembly as HttpListener, so I guess the next step would be to add HttpWebRequest that will use W5100 sockets. Gus?

Architect … Thank you!

Someting is being cooked for HTTP support. 8)

…yes but you only have to wait for a bit and this will change :slight_smile:


I have send you latest update last night.

Joe and Gus … Thank you very much! This is so cool! Your products just keep getting better and better. ;D