Go Down

Topic: Webserver on Freetronics Ethernet with POE board (Read 2937 times) previous topic - next topic


I just got the Freetronics Ethernet with POE sheild and I'm trying to get the Webserver example to work with my arduino duemilanove.

So far I can't ping it and I can't get any response using curl

CCH-638775A:~ tomcat$ ping
PING ( 56 data bytes
Request timeout for icmp_seq 0
--- ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
CCH-638775A:~ tomcat$ curl http//

Some noob questions:
Can I use the Freetronics sheild as just an ethernet sheild (not using the POE feature)?

Are the jumpers irrelevant in this mode? If not, What jumper settings should I set?

I can load and run the Webserver sketch, and I've added some serial debug but it never gets past the

if(client) {

I've set the IP to
byte ip[] = { 192, 168, 0, 196 };

The host's IP is which it received via DHCP.

I've left the mac to the default DEADBEAFFEED

Any ideas?

Jonathan Oxer

Can I use the Freetronics sheild as just an ethernet sheild (not using the POE feature)?

Absolutely. The PoE header simply exposes the connections necessary to pass power to the shield / Arduino through the LAN cable, but if you leave the jumpers off the PoE header it does nothing at all and the shield should behave just like the official shield.

When you plug in the LAN connection do you see any of the LEDs illuminate? The normal behavior is for there to be about a 1 to 2 second delay while the Wiznet chip figures out the type of connection, then at least the LNK ("link") LED should illuminate, and possibly FDX ("full duplex") and 100 ("100 megabit") LEDs as well. Then if there's other traffic on the network (including your ICMP PING requests) the RX LED should flicker.

Does any of that stuff happen?
Freetronics: www.freetronics.com


Sep 04, 2010, 01:27 am Last Edit: Sep 04, 2010, 01:36 am by ejy@summitbid.com Reason: 1
Jon, I left the two jumper's off. I see the status LEDs are on
LNK  on steady
100  on steady
FDX  on steady
COL off
RX   pulses irregularly
TX  pulses

The TX led flickers in correspondence to the ping requests,

Here's the sketch


 * Web Server
 * A simple web server that shows the value of the analog input pins.

#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
//byte ip[] = { 10, 0, 0, 177 };
//byte ip[] = { 192, 168, 0, 196 };
byte ip[] = { 192, 168, 0, 196 };
Server server(80);

void setup()
  Ethernet.begin(mac, ip);
  Serial.println(ip[0], DEC);
  Serial.println(ip[1], DEC);
  Serial.println(ip[2], DEC);
  Serial.println(ip[3], DEC);
  Serial.println("WebServer init exit");

void loop()
  //Serial.println("loop enter");
  Client client = server.available();
  if (client) {
    Serial.println("got client");
    // an http request ends with a blank line
    boolean current_line_is_blank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // if we've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so we can send a reply
        if (c == '\n' && current_line_is_blank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          // output the value of each analog input pin
          for (int i = 0; i < 6; i++) {
            client.print("analog input ");
            client.print(" is ");
            client.println("<br />");
        if (c == '\n') {
          // we're starting a new line
          current_line_is_blank = true;
        } else if (c != '\r') {
          // we've gotten a character on the current line
          current_line_is_blank = false;
    // give the web browser time to receive the data

Jonathan Oxer

I've just tested this with a TwentyTen, Ethernet shield, and the exact same sketch (but with the IP address changed to suit my local network) and it worked perfectly.

Could you please open the serial console at 9600bps and see what messages you get after resetting the Arduino?


Dang. Still not working.  Cry

Please note that I've just upgrade my Arduino IDE to version 019 which requires the additional

#include <SPI.h>

Which I added to the sketch above.

Other elements of the system are a MacBook Pro w/ OSX 10.6.4

Also note that the mac is connected via my local wifi lan, and so the arduino is connected to the mac's ethernet port.

I mounted the ethernet sheild with POE (no jumpers) to my Twenty ten.  
Then connected the ethernet cable between my computer (IP and the ethernet sheild.
 Then connected the usb between my computer and the Twenty Ten

I compiled and loaded the sketch above into the Twenty Ten and got this:
WebServer init exit

I then did a reset and got this (again):
WebServer init exit

I then opened a command prompt on my computer and issued the commands:

Ping returns:
CCH-638775A:~ eyoung2297k$ ping
PING ( 56 data bytes
ping: sendto: Host is down
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3

curl returns:
CCH-638775A:~ eyoung2297k$ curl
curl: (7) couldn't connect to host

Any other ideas?


Sep 12, 2010, 08:23 am Last Edit: Sep 12, 2010, 08:27 am by ejy@summitbid.com Reason: 1
Works!!! When I connected the arduino + freetronics ethernet to my router I got the response from the arduino:

CCH-638775A:~ eyoung2297k$ curl
analog input 0 is 522<br />
analog input 1 is 451<br />
analog input 2 is 428<br />
analog input 3 is 377<br />
analog input 4 is 316<br />
analog input 5 is 320<br />

I know I tried this before (the connection to the router), but I turned off mac address filtering this time. I'd added it to the table, but must have foo bar'd it. I'll have to verify that's the fix tomorrow.

This link made me decide to try the router again:

This is with the Duemilanove. Tomorrow I'll try the Twenty Ten.

I've been trying it connected to my laptop till now, which I thought should work too...

Thanks for your help and patience!


Hi EddyTheJekyll
Thanks for sharing your experiences with the group. You have given me a couple of ideas to improve my Ethernet article. Keep an eye out in the next few days for chapter two  :) http://tronixstuff.com/tutorials.
A couple of Arduino tutorials at http://tronixstuff.com/tutorials - My Arduino book - http://nostarch.com/arduino. Please don't ask for help via direct message - use the forum!


...and I should add that the problem I had were related to mac address filtering on my router. Still not sure why that doesn't work, but I currently need to disable mac address filtering when using the arduino as ethernet ready.


Go Up