Pages: [1]   Go Down
Author Topic: Directly connect Arduino Mega (with ethernet shield) to computer without router?  (Read 1170 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12562
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?)
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12562
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: