Go Down

Topic: Directly connect Arduino Mega (with ethernet shield) to computer without router? (Read 1 time) previous topic - next topic

alpheustest

Hi everyone!

For my project I'm trying to control several PWM driven devices using an Arduino Mega, which receives its instructions from a laptop running Windows 8.
What I'm wondering is: is it possible to have a DIRECT ethernet connection between the laptop and the arduino board? (i.e. No router)
I know it's possible for computer-computer, just wondering whether this could be done with Arduino.

Thanks!

fire1

Quote
is it possible to have a DIRECT ethernet connection between the laptop and the arduino board?


Hi ,

You can connect the arduino sheild to the computer by using the ethernet cable , you just need to assign IP for you computer and assign subnet mask , I don't know about it in windows 8 , but you will see it wired properties in network configuration , I have used many times with windows 7 and ubuntu ,  you can set it as a server and let your laptop as a client , then you can test the arduino , maybe in a web browser.

Nick Gammon

It should be possible. You might need a crossover (ethernet) cable because routers normally connect Transmit (from the PC) to Receive (in the router).

PeterH

You'd be relying on the PC to auto-detect the uplink connection. Worst case, if your PC's NIC doesn't support that, is that you'd need to connect them via a hub.
I only provide help via the forum - please do not contact me for private consultancy.

alpheustest

Right, but it should be ok since most recent network cards will have auto-mdix afaik.

Another question: How reliable will the connection be if it's connected like that (Using UDP) over 50m of wire? I need to know this because I don't want any commands to be missed out. (Or perhaps I should use TCP/IP for more reliable communication?)

Nick Gammon

50m isn't that much, but that's a broad question. Try it and see. However UDP does not guarantee delivery of packets.

alpheustest

I have decided to use TCP for the guaranteed delivery. If somehow speed was a problem I'll switch to UDP. Thanks, you have all been very helpful :)

PeterH


I have decided to use TCP for the guaranteed delivery.


TCP does not guarantee delivery either. It is reliable in the sense that if it tells you delivery was successful then you can know that it was in fact successful. Failures can still occur and you will still need to deal with them.
I only provide help via the forum - please do not contact me for private consultancy.

Go Up