Pages: [1]   Go Down
Author Topic: Arduino 1.0 EthernetClient Won't Connect To Server On Different Subnet  (Read 762 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wrote a sketch in version 0022 of the IDE that connects to a server to exchange messages. I'm working on a large, corporate network with a bunch of different subnets. The server and the Arduino are on different subnets. Everything worked great, then I updated all the code to work in version 1.0. Now, I can only connect to the server if it's on my local subnet. I've compared the code in the two versions of the Ethernet library, and I can't see any obvious differences that might cause something like this.

I haven't had time to really test this out, but I wanted to see if anyone else had experienced this or could recommend some troubleshooting techniques. I've used wireshark to confirm that the server isn't getting any packets from the Arduino, but when I stand up a server on the local subnet, everything works fine. It seems like the Arduino's network messages aren't getting routed correctly, but I don't know much about TCP/IP. I went back to the old version of the code (and version 22 of the IDE) and confirmed that I could still connect to the server on the different subnet. My next step is to use wireshark to see if the packets sent from the Arduino are different across the two versions.
Logged

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

Can you post the V1.0 code? That might help. The Ethernet.begin() format changed in V1.0.

Logged

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

Wow. I feel pretty silly. I spent so much time looking at the differences in the EthernetClient.connect function that I never looked at Ethernet.begin. I knew the dnsServer parameter had been added, but I guess I thought it had been added to the end. So I was passing mac, ip, gateway, subnet and the function was treating them as mac, ip, dns, gateway. Obviously, setting my gateway to 255.255.255.0 would cause some networking routing problems. I haven't fixed it yet, but I'm sure this is my issue.

Thanks for pointing it out. Sorry for posting in, what turned out to be, the wrong board.
« Last Edit: February 04, 2012, 11:02:04 am by Oily The Otter » Logged

Pages: [1]   Go Up
Jump to: