Log in

View Full Version : Obtaining IP Address of ActiveSynch PC


paulzazzarino
05-16-2007, 10:09 PM
Obtaining IP Address of ActiveSynch PC

Here's a good one, you cradle a device via USB for the 1st time, by default CE devices use 192.168.55.100 and X.X.X.101 as the gateway.

how do you figure out the PCs IP address via software ?

[note: the device has not been configured yet at all, so you went a prog to go out and query this, it does not know any domain specific information, you could simulate an activesynch program on the CE device, but... there should be an easier way. ]

Erel
07-14-2007, 07:57 PM
When using Activesync the pc host name is always "PPP_PEER".
So you could get the IP with:

IPHostEntry host = Dns.GetHostByName("PPP_PEER");
string IP = host.AddressList[0].ToString();

paulzazzarino
07-15-2007, 11:24 AM
Yes,

you can query by that name, but unfortunately it is always the same address: 192.168.110.11X.

Not sure why this was hardcoded this way.