none
TCP/IP transport via ActiveSync? RRS feed

  • Question

  • I currently have my WM5 device hooked up to desktop PC via ActiveSync 4.1. The device is set up so that I can surf the internet using PIE.

    I have an HTTP server (implemented with HTTP listerner) running on the desktop PC, waiting for requests from a client app running on the device (using HttpWebRequest).

    Without WiFi switched on, the client app on the device cannot access the HTTP server. Pinging desktop PC also does not work

    However, when I switch the Wifi on, the client app on the device can access the HTTP server (via WiFi). Pinging desktop PC also works.

    Is it possible to access the desktop PC via ActiveSync instead of WiFi?

     

    Thanks

    Thursday, August 3, 2006 12:31 PM

Answers

  • First of all, with WM5 and ActiveSync 4.X you don't need to explicitly establish a passthrough connection; it should "just work". How does it work though?

    When you cradle your device, you should find a new IP address on the Desktop computer connected to the device, which you can obtain through the command "ipconfig":

    Ethernet adapter Local Area Connection 9:

            Connection-specific DNS Suffix  . :
            IP Address. . . . . . . . . . . . : 169.254.2.2
            Subnet Mask . . . . . . . . . . . : 255.255.255.0
            IP Address. . . . . . . . . . . . : fe80::8200:60ff:fe0f:e800%13
            Default Gateway . . . . . . . . . :

    The device actually will obtain an IP address as well, which is usually 169.254.2.1. So now, when you want to connect to the Desktop's HttpListener, you would make a HttpWebRequest with the url being http://169.254.2.2:12345 assuming your HttpListener listens on port 12345.

    Note: Remember to make an exception for the port in firewall settings, if you are using Windows XP.

    Cheers,

    Anthony Wong [MSFT]

    Tuesday, August 8, 2006 5:33 PM

All replies

  • IF I understand correctly, you wish to access the internet via activesync from the mobile device? if you, you need to create a pass through connection from your mobile data connections settings
    Thursday, August 3, 2006 2:04 PM
  • No, I simply mentioned that I could access the internet to confirm that the TCP/IP access through ActiveSync is configured properly. My goal is to access the HTTP server on the desktop PC from the PDA client application without having to use WiFi.

    I want to access the HTTP server only using cradle with ActiveSync.

    How do you create the passthrough connection?

    Thursday, August 3, 2006 2:09 PM
  • hmmm. You want to access the HTTP Server (IIS site) on the PC from the pda?

     

    You can do this, you need to basically know the IP of the http server, just like you browse the site locally on the PC (http://localhost/someDir)., so from the device it would become http://your-server-ip/someDir

    To create a pass through connection, it will be somewhere in the data connection settings of your mobile device, but be sure you have activesync'd it when setting the option

    Thursday, August 3, 2006 2:41 PM
  • Well, IIS is not running on the desktop machine, but an HttpListener is. When I just have ActiveSync, my client will not connect. With Wifi, it works.

    The client app does a HTTP Post as follows:

            Request = HttpWebRequest.Create(URI);
            Request.Method = "POST";
            Request.ContentType = "text/xml";
            Request.ContentLength = ARequestText.Length;
    etc..


    Thursday, August 3, 2006 8:19 PM
  • Anyone has an idea?
    Sunday, August 6, 2006 10:49 PM
  • First of all, with WM5 and ActiveSync 4.X you don't need to explicitly establish a passthrough connection; it should "just work". How does it work though?

    When you cradle your device, you should find a new IP address on the Desktop computer connected to the device, which you can obtain through the command "ipconfig":

    Ethernet adapter Local Area Connection 9:

            Connection-specific DNS Suffix  . :
            IP Address. . . . . . . . . . . . : 169.254.2.2
            Subnet Mask . . . . . . . . . . . : 255.255.255.0
            IP Address. . . . . . . . . . . . : fe80::8200:60ff:fe0f:e800%13
            Default Gateway . . . . . . . . . :

    The device actually will obtain an IP address as well, which is usually 169.254.2.1. So now, when you want to connect to the Desktop's HttpListener, you would make a HttpWebRequest with the url being http://169.254.2.2:12345 assuming your HttpListener listens on port 12345.

    Note: Remember to make an exception for the port in firewall settings, if you are using Windows XP.

    Cheers,

    Anthony Wong [MSFT]

    Tuesday, August 8, 2006 5:33 PM
  • Thanks for the replyu Anthony. I will try this. How can this be done with PPC2003SE?
    Wednesday, August 16, 2006 6:26 PM
  • Anthony, thanks for the feedback. What I succeeded in doing is the following:
    With the HttpListener, listen on 169.254.2.2:port.

    Then issue a WebRequest from the WM5 PDA to URL 169.254.2.2:port.  This gave the desired results and I could exchange data between the PDA client app and the HttpListener. Now I have the following question:

    If my HttpListener is somewhere else on the network and not on the PC the PDA is connected to, how do I do this? I tried bridging the two connections and then connecting to the PC IP address instead (e.g. 10.0.0.101), but this did not work.

    Hope you can help as this is really a stumbling block.

    Thanks in advance


    Wednesday, September 27, 2006 8:19 PM