resolve activesync host ip

E

Enemaerke

I've been trying to resolve the IP of the ActiveSync host for a couple
of hours but can't really seem to get anywhere. I'm on a Dell AXIM x510
with Windows Mobile 5.0 and ActiveSync 4.1

I would like to be able to call a web service on the desktop pc but I
can't seem to find some "generic" way of looking up the IP address.
Googled around a bit and found that the dtpt_peer registry setting
should resolve to the active sync host (as far as I could tell). I
tried to resolve it with System.Net.Dns.GetHostEntry("dtpt_peer") but
that just blew up. Tried to call a dead-simple website hosted on the
desktop pc from the pocketpc using the hardcoded dhcp ip of the desktop
which worked perfectly but I could not get anything working with the
dtpt_peer hostname or the 169.254.2.2 (the registry ip adress) or any
combination of these

Am I missing something here, am I looking in the wrong place or do I
need to configure something (activesync, pocketpc, desktop pc) to make
this work. It's not really an option to hardcode the IP of the host so
I need to figure out how to dynamically resolve the hosting desktop pc

Any help would be much appreciated

Soren
 
P

Paul G. Tobey [eMVP]

Doing a Dns.GetHostByName( "ppp_peer" ) works fine for me on my WM5 device
with AS connected over USB. If something 'blew-up', my guess is that you
wrote the code wrong and it's you that blew it up. If you want to show us
what you're doing, we might be able to spot it.

Paul T.
 
L

Lao K

I directly use my desktop PC's host name and it works fine. Once your
DTPT (desktop passthrough) works, ActiveSync will do all the work for
you. Accessing a web server in your desktop PC is just like accessing
any public web sites. Mine is a PPC6700 device.

Is your device ActiveSync'ed successfully?
 
P

Paul G. Tobey [eMVP]

If you set a static host name to IP mapping, you might as well just
hard-code the IP address.

Paul T.
 
E

Enemaerke

Thanks for the rapid reply, it got me a bit further

Okay, querying for ppp_peer was actually better than querying for
dtpt_peer, it resolved to 169.254.2.2 which is also the entry I
expected. So far so good. I then tried using this lookup to call the
webservice on the host computer i my .Net program and that just timed
out (using http://169.254.2.2:8181/om/). I then tried hardcoding the
actual IP of the host by modifying the .Url property of the
webservice-stub on the device to see if the webservice could be called
at all but this just returned a "Destination unreachable" exception
(using http://172.21.0.114:8181/om/).

I started up a browser and browsed to the hardcoded address of the
webservice (http://172.21.0.114:8181/om/) which responded with the WSDL
xml as expected.

This leaves me a bit puzzled. Should I not be able to call the
webservice from the device using the 169.254.2.2 IP postpended with the
port and the webservice? Is it a problem that I'm not using port 80.
Howcome I can get results in the browser but not in my .Net app, is it
a credentials problem?

Soren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top