Connecting to a Socket on the device when connecting via ActiveSyn

G

Guest

I have written a socket service which listens for messages that runs on a
device (as we need to support push technology from the server/desktop). This
runs and waits for connection and messages OK.

When I try and connect from the desktop to the device's port and IP address
it is listening on, I get an error which specifies the network is unreachable.

What IP address should I use when connected via ActiveSync, I see ActiveSync
uses IP address: 192.168.55.101 but this seems to be an internal IP address.

This exercise it purely for prototyping a concept and in the real world we
will use GPRS/GSM/Wi-Fi over the internet.

Regards
Simon.
 
G

Guest

Use a hostname of "PPP_PEER" instead on an IP address and let ActiveSync
handle the routing.

-Chris
 
G

Guest

I have tried that and it doesn't work. Don't forget this is connecting from a
Desktop and connecting to a socket running on the device.

Simon.
 
P

Paul G. Tobey [eMVP]

Whether you can come up with a right answer or not is going to depend on how
much you're willing to restrict what devices it will work with. Since
you're using a 'random' TCP port number, that seems to indicate that you're
using Windows Mobile 5. If that's the case, you can catch the right IP 95%
of the time by using 169.254.2.1. Note, however, that when the device is
not connected to the desktop computer, you *should* get a
network-unreachable error when you try to connect to that address.

Paul T.
 
G

Guest

Not sure what you mean by 95% of the time it will work?

I did try that IP address from the desktop and still get an unreachable
error. I didn't add in my previous posts that I am using Windows Mobile 5
Emulator but using the built in functionality from the Device Emulator
Manager to connect via ActiveSync on the desktop. So it is not a physical
device but this shouldn't be a problem.

Simon.
 
P

Paul G. Tobey [eMVP]

It's possible for the user to change it, so you can't be 100 sure. If
things are set up in the default configuration, 169.254.2.1 will be the
device IP and 169.254.2.2 will be the PC IP when the two are connected via
USB.

I can't help you with the emulator. I have no idea if it will even work.

Paul T.
 

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