Pages: [1]   Go Down
Author Topic: [Solved] IP address oddity with Ethernet shield  (Read 717 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am running the example WebServer sketch with my shield and setting the IP address to 192.168.1.122  manually (no DHCP), with the shield plugged into the port on my laptop and ICS enabled.  When I run an ipconfig on the laptop, it gives the IP address of that network adapter as something else.  When I try to ping the shield (at the .122 address or the one from ipconfig) I get a timeout.

The shield seems to be doing tx/rx (is there documentation about what all those lights mean?) and if you look at the properties on the connection there are bytes sent and received.

As you may be able to tell, I know just enough about networking to be dangerous but not enough to know how to troubleshoot this.  Any advice or guidance on a good thread on the subject would be appreciated.
« Last Edit: February 13, 2013, 02:38:28 pm by rwiens » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48556
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
with the shield plugged into the port on my laptop
I'll bite. Why? If the Arduino is to be tethered to the laptop, a USB cable is far cheaper, and data transfer is far faster.

If the Arduino with Ethernet shield is connected to a router, then it makes sense for the Arduino to be wearing one.
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For clarification, the Arduino IS connected to the laptop via USB (for serial communication).  The shield is connected to the laptop via Ethernet (and sharing the wireless connection of the laptop to the router...or so is the intention), simply because I don't want to do my development in the cold, dark basement where the router is!

I suspect it has to do with the Internet Connection Sharing, so my first test will be to plug the shield directly into the router and see if that works.
Logged

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

My guess would be that you're not using the right kind of network lead to connect the Arduino directly to the Network port on your laptop. You would need a "cross-over" lead: http://en.wikipedia.org/wiki/Ethernet_crossover_cable
Logged

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

I would agree with vincentmckenzie. Try plugging the Arduino in your router (or switch), not the laptop.
Logged

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

WOW! There's a name from the past! I registered Mush Client in the 90s because it was by far the best client out there.
Logged

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

Still is! smiley

Only joking. There are lots of clients these days.

Still, thanks for saying that.

I did a small Adventure game on an Arduino a couple of years ago (still a work in progress) ...

Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is your game based on something else?  I have a vague recollection of a very early PC game that had swirling mists and you had to make pretty basic choices like which direction to go out of a room.

On the cross-over cable topic, I have read that Macs are smart enough to take care of this internally but perhaps no such luck with PCs...I do have something I think is a crossover and it didn't seem to work either but I will try again.

I did discover that with ICS, it appears that the Ethernet port gets assigned a fixed static IP address.  I will have to change the Arduino code to reflect that and see if it works.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 140
Posts: 5873
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you enabled ICS on a Windows machine, the ethernet port normally gets 192.168.0.1. You should use something like this on the Arduino:
ip = 192.168.0.2
subnet = 255.255.255.0
gateway = 192.168.0.1

The dns server may require some playing to figure what to use for that. I use my ISP's dns server ip.
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

SurferTim that worked like a charm.  I only tried the server configuration so I didn't need any DNS monkeying but at least I know where to start.  Thanks.
Logged

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

Is your game based on something else?  I have a vague recollection of a very early PC game that had swirling mists and you had to make pretty basic choices like which direction to go out of a room.

The Original Adventure by Crowther and Woods, was the inspiration for the idea.
Logged

Pages: [1]   Go Up
Jump to: