Hi everyone.
I have a Duemilanove with an ethernet shield on top. I have a Mac Mini and have bridged my Airport (WiFi) connection to the Ethernet.
My router IP is 192.168.2.1
The Airport connects via the router and has a static IP of 192.168.2.6
My sketch sets the Arduino mac, IP (192.168.2.20) and gateway (which I think is what’s wrong)
When I plug the ethernet cable into the Mac, it assigns an IP address of 169.254.70.44 (Using DHCP).
I have 2 problems now:
Firstly, when I run the “WebServer” ethernet example sketch, I can connect to the Arduino using my Mac browser (192.168.2.20) and I can see the HTML output) - BUT, I have to disconnect my Wifi/Airport first (is there a way around this?)
Secondly, when I run the “WebClient” I can’t seem to get the Arduino to connect.
1, In my sketch - what should the IP and gateway be set to (Is the gateway the mac IP or the router IP?)
2, Does it matter if I use a straight network cable (patch) or a crossover cable? I have tried both but neither seems to work. I think the Mac is supposed to be able to use a patch cable as a crossover if needed…
I’m normally fine with network configuration on PC/Mac/Linux - but I just cant seem to crack this one.
My ifconfig et0 output is as follows (disconnected, then connected):
Mac:~ alex$ ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:16:cb:ac:2f:aa
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
media: autoselect
status: inactive
Mac:~ alex$ ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:16:cb:ac:2f:aa
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::216:cbff:feac:2faa%en0 prefixlen 64 scopeid 0x4
inet 169.254.70.44 netmask 0xffff0000 broadcast 169.254.255.255
media: autoselect (100baseTX <full-duplex>)
status: active
Thanks,
Alex