All,
Here is my situation:
Public Wifi from hotel room
Laptop connected to WiFi
iPad connected to WiFi
Ethernet shield connected to Laptop
My goal is to control the arduino from my iPad using the Ardumote HD app. I think everything is in order, except it isn't working, and I feel it is because of my lack of network knowledge. I think if I can get the addresses all set up, I'll be good to go. Here is the network area of my sketch:
#include <SPI.h> // for Arduino later than ver 0018
//#include <EthernetUdp.h> // UDP library from bjoern@cs.stanford.edu
#include <Ethernet.h>
// source: http://code.google.com/p/arduino/source/browse/trunk/libraries/?r=1094#libraries%2FEthernet
////////// NETWORK INFO ////////////////
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0xDB, 0x50 }; //Set your Ethernet Shield's MAC address here - make sure you replace the ZZs with your shield's values!
byte ip[] = { 169,254,130,77 }; // Set your shield's desired IP address here - check your network for configuration details
//byte gateway[] = { 192,168,1,1 }; //if you need to set a gateway IP
//byte subnet[] = { 255,255,255,0 }; // Change this to your subnet address
unsigned int localPort = 7777; // local port to listen on (set this the same as Port # on Ardumote Params Screen)
IPAddress iPhoneIP(192, 168, 252, 156); //Set the iPhone/iPod/iPad's IP address to send messages back to Ardumote...
unsigned int iPhonePort = 7777; //Set the Port # of the message table you configured in Ardumote (default is 7777)...
I am a complete idiot about network stuff. I know what an IP address is, and what a MAC address is, but gateway and subnet masks... no idea.
For those that can help, here is some info from my network preferences:
Under the airport tab:
Status: CONNECTED
AirPort is connected to Guest and has the IP address 192.168.253.155.
Under the ethernet tab:
Status: CONNECTED
Ethernet has a self-assigned IP address and may not be able to connect.
IP address: 169.254.130.67
Subnet Mask: 255.255.0.0