Arduino + Ethernet Shield + Fonera

Hi there!
I definitely have problems setting up my Arduino project… Here’s the configuration and the problem!

I have a Fonera, reflashed and with correct network parameters. When I connect the Fonera to my Mac through Ethernet, it works, I can surf on the internet through the Wifi of the Fonera.

I received the Ethernet shield and plugged it in the Arduino board. I’ve installed the Ethernet example.

I’ve connected the Fonera to the Ehternet Shield and I always get the client.connect() which returns false (connection failed).

Is there something wrong? I used the IP address my Mac had to pass to Ethernet.begin. I used a regular ethernet cable. May be should I use a crossed one?

Thanks for your help,

I've tested with a crossed cable and still doesn't work !

Could anyone help me please?

Thanks, Franck

I havnt got a fonera but it shouldnt be any different to pluging the ethernet into your wifi access point directly. Have you tried that?

What ip addresses have you set for the mask and gateway? Maybe you can list them here with what your network is expecting. remember as the ethernet board does not support dhcp it needs to be told everything about your network.


Thanks Gordon for your answer.

I haven't tried yet to plug into the access point directly since it's hidden behind a furniture ;-)

But there's something interesting in what you said: mask and gateway. My gateway is but I didn't find how to set it up in the Arduino library... Any idea?


My gateway is

That's an odd number for a gateway. While a router interface can have any valid IP address, by convention they are typically the first (.1) or the last (.254) IP address in the subnet. You may want to verify this address.

I used the IP address my Mac had to pass to Ethernet.begin

You definitely do not want to use an IP address that is already in use! Neither node will work correctly.


Thanks for your answer... I folowed the Fonera tutorial ( ; the Fonera is configured in client bridge mode.

When I said I used the same address as the Mac, I forgot to mention it was not at the same time ;-)

I'll try Gordon's suggestion tonight....


Theres your problem the non standard gateway !!

In ethernet.cpp you will see that the begin function can accept more than just the mac address and ip address. You can also pass over the gateway. Ethernet.begin(mac, ip, gateway); If you dont pass the gateway, it assumes the gateway is x.x.x.1 It takes the x.x.x from your ip adress.

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 10, 0, 0, 177 };               // Your ip address
byte gateway[] = { };       // Your gateway address
byte server[] = { 64, 233, 187, 99 }; // Google

Client client(server, 80);

void setup()
  Ethernet.begin(mac, ip, gateway);


It will use your non standard gateway address. You can also pass over the subnet as well if you need to. Ethernet.begin(mac, ip, gateway, subnet); Or it will assume it is


Just wondering what your trying to do with this?? I wanted to use the fonera, but I didn't want to use up my program space to run it.. Depending on what you need, you may be able to skip the ethernet board altogether.. I have X-wrt loaded onto the fonera with the Ser2net package installed and running.. I disabled the serial output in redboot so the only serial data messages I get are when I link through telnet or hyperterminal.. Not sure if I'm explaining it correctly.. lol..

I have my arduinio connected to the serial pins on the fonera and the fonera gets the wireless signal all by itself and connects to the network.. You can use processing or any program you want that can telnet and get into fonera using the Ser2net package.. anything sent or received goes right to the arduino.. 9600 baud works fine and I have been using it for remote temp sensing at my parents house while they have been on vacation.. I am powering the arduino right off the fonera too.. I can get you more info if you want.. This may save you some trouble and give you some program space in the arduino if simple serial communication will work for your needs..

Hi Tek, That's what I tried to do at first but it didn't work ! :-( I reflashed with the latest DD-WRT and from what I've read on the net the serial has been de-activated in some of the last versions of DD-WRT. I'd like to make it work with the serial... If you found a tutorial about how to install x-wrt on Fonera, feel free to tell me... Thanks, Franck

I should make up my own tutorial since I kind of put 2 or 3 of them together.. I tried the DD-wrt setup as well, but your right and the newer builds are missing stty.. I did a little more research and found what I needed was Ser2net which I could only find info on installing that with open-wrt.. It may even work with dd-wrt but I couldn't do it at the time over a year ago..

if you head over to and look around there you should start to make some headway..X-wrt is as I understand it openwrt but with a GUI instead of all command line control.. You can also check out for their info.. Once you have X-wrt loaded and configured as a wireless client which is similar to dd-wrt but maybe a little trickier then you install the Ser2net package.. You set it up to autorun in the startup script and your done.. I'll have to find my info on disabling serial output on bootup so your arduino doesn't go haywire.. It wasn't too hard as I recall. You can then edit the config script of ser2net to suit your needs..

Thanks again but not that my Arduino has been flashed with DD-WRT, I don't know how I'm going to flash it now to X-WRT... I tried the command mtd -e "RedBoot config" write out.hex "RedBoot config" but I have an error :-(