Go Down

Topic: Ethernet shield - webClient example (Read 6 times) previous topic - next topic

jon_s

Hi everyone, I'm hoping someone can help me figure out how to get WebClient to run. I'm a relative network noob but I've read through all the threads I can find on this.

My setup:
1. OS X 10.5.8, computer is internet sharing my airport connection.
2. WebServer sketch seems to work fine using ip of 192.168.2.3.
3. Ping to 192.168.2.3 seems to work fine.
4. Yet WebClient connection fails after about 1 minute of "connecting..." I'm using the standard WebClient sketch with the following declarations:
Code: [Select]
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 2, 3 };
byte subnet[] = { 255, 255, 0, 0 };
byte gateway[] = { 192, 168, 2, 1 };
byte server[] = { 64, 233, 187, 99 }; // Google

FYI, ifconfig en0 produced:
Quote
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
     inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
     inet6 fe80::21f:5bff:fef3:7a1f%en0 prefixlen 64 scopeid 0x4
     inet 169.254.25.48 netmask 0xffff0000 broadcast 169.254.255.255
     ether 00:1f:5b:f3:7a:1f
     media: autoselect (100baseTX <full-duplex>) status: active...


Any suggestions? Many thanks!

mem

try a different  google address, for example: 216,239,59,147

Ran Talbott

The reason mem suggested a different IP address is that google has done some rearranging of their server network,  and 64.233.187.99 doesn't work for direct end user access anymore.

Running a
Code: [Select]
host www.google.com returns some alternatives:
Quote
www.google.com is an alias for www.l.google.com.
www.l.google.com has address 66.102.7.99
www.l.google.com has address 66.102.7.103
www.l.google.com has address 66.102.7.104
www.l.google.com has address 66.102.7.105
www.l.google.com has address 66.102.7.106
www.l.google.com has address 66.102.7.147


66.102.7.103 worked for someone who asked about this the other day.

Ran

jon_s

Thank you for the suggestions, but those addresses gave me the same result. Should I be trying other (less frequently rearranged) sites? Should I try playing with wireshark? Thanks!

Ran Talbott

Next step is probably to try connecting a laptop or other device with easier access to diagnostic info in place of the Arduino,  and see whether there's a configuration problem in the Mac that's preventing it from forwarding traffic.

Or,  it would be for me:  if you're already up to speed on wireshark (I'm not),  you may find it faster and easier to snoop around with that.

It might also be useful to watch the data transfer stats on the network cards for hints on whether packets are being forwarded.

(Yes,  this means that my guess is that it's likely your gateway isn't gateway-ing).

Ran

Go Up