0

I have been following various tutorials (especially: this) to connect an Arduino Ethernet board to my Ubuntu PC via Ethernet directly.

The IP address of the computer was found to be 10.100.31.128, and so I tried addresses in this range (10.100.31.67, 10.100.31.121, ...) without success. DHCP also doesnt seem to work. For the MAC address I used the sticker on the back of the board. I am using a patch cable, maybe that's the problem?

7
  • Did you tell your system that it needs to expect another client on the end of the cable? Commented May 10, 2016 at 13:58
  • No, how do I do that, or where can I find information on that?
    – DK2AX
    Commented May 10, 2016 at 14:00
  • uhm.. did you set a static IP on your PC? And then, how do you check the connection?
    – frarugi87
    Commented May 10, 2016 at 14:39
  • Who is the DHCP server? The Ubuntu box? Or a router? If a router did you check to see if the router has issued an IP to the MAC of the Arduino Ethernet shield. Maybe you can monitor the /var/log file w/a "tail -f" while you try to ping the Arduino (sorry, can't remember the exact system log file on a Ubuntu box, please look it up). In the end, it's much easier to debug network problems on a Linux box as Window boxes tend to give up with out telling you (i.e. window boxes will say they are pinging but actually send nothing out on a failed network).
    – st2000
    Commented May 10, 2016 at 15:01
  • Also, I doubt you need this, but older Ethernet ports will not automatically detect a cross over problem. So for direct connections (i.e. w/o a hub or switch between devices) you many need a cross over cable.
    – st2000
    Commented May 10, 2016 at 15:03

2 Answers 2

1

Network problems can be complex. If these suggestions are not right I can change the answer later if other solutions present themselves.

If you are connecting two Ethernet devices directly you may need a cross over cable.

To test your connection with out using IP addresses, try to follow what is discussed in this answer where the MAC address is used on a Ubuntu system instead of the IP address.

You also might try using wireshark to monitor the Ubuntu box's Ethernet port.

0

When you connect your Ethernet Shield to your Ubuntu PC your PC 'looks' at the Ethernet shield as if it were a router and therefore tries to connect to it as an internet source, thus it tries to get an IP and other related stuff from the Ethernet shield.

BUT

What you want is that the Ethernet shield should use the ubuntu PC as an internet/local network source. For this you must have active internet on your PC from Wifi/ USB data etc.

You will have to BRIDGE the connections of your Ethernet shield and your internet source in order to do so.

The link to accomplish Bridging networks in Ubuntu is here

When you bridge two Ethernet networks, the two networks become one single (larger) Ethernet network. Thereby making the Ethernet shield a part of the larger network (Internet in this case). You can now upload any of your sketches onto the Arduino as per your requirements and accomplish your task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.