1 of 1 people found this helpful
Make sure your ethernet cable is plugged in before you power on Galileo. The current DHCP configuration for the Linux build is to try and get a lease at boot time, and exit if it fails. This means that if you don't get a lease at boot time, you never will, and wired networking will never work in sketches until you reboot because the Galileo implementation of the Ethernet class depends on DHCP running.
Alternatively, as a workaround, you can force a restart of networking on Galileo by executing this in your sketch:
This will restart DHCP without having to reboot.
I consider the current DHCP configuration in Galileo to be a bug.
Hi Intel_Jesus and mechalas,
Thank you for your help.
I tried with the ethernet cable connected before plugging in power to my Galileo, but with the same result... In the meantime I tried with mechalas suggestion:
- system("/etc/init.d/networking restart");
Before the instruction Ethernet.begin(mac) and i finally got it to work
Thanks for the help