Dailycode.info

Short solution for short problems

Microsoft Active sync 4.5: Wireless connecton problem

I'm working with netpads which use Microsoft CE 4.0 and Microsoft CE 5.0.

When I wanted to deploy and/or debug applications with VS I had to setup a connection via Active sync. After I upgraded my active sync version from 3.7 to 4.5, I noticed that it was impossible to make a wireless connection. The option is still present but it fails to connect. When I downgraded back to 3.7 everything worked fine again. So I kept it for the moment. No time to look for another solution. Acitve sync 3.7 has all the functions I need.

Then I started working with VS 2005 and noticed that Active sync 3.7 is not supported anymore. I need to upgrade to an newer version, the only problem is that version 4 and later disabled the ethernet connection. Now it isn't possible anymore to debug using active sync and VS 2005.

The solution to this problem is debugging without the help of ActiveSync.

VS 2005 does not automatically copy the connectivity binaries down to the device. In order to use debugger on Windows CE 5.0 devices without active sync, you need to:

Step 1. Manually copy the following files down to the device

Clientshutdown.exe
ConmanClient2.exe
TcpConnectionA.dll
eDbgTL.dll
CMaccept.exe

From the desktop folder:
 <VS Install Dir>\compactframeworksdk\connectionmanager\target\wce400\<CPU Type>, to \windows on device

If you can't find EdbgTL.dll look here: <VS Install Dir>\smartdevices\debugger\target\wce400\<CPU Type>, to \windows on device

Step 2. Manually launch the conmanclient2.exe

On the device side, open the command prompt and run
Conmanclient2.exe (in case this doesn't work, try opening like this: /transport:tcpconnectiona.dll /property:port=5655 /id:Con )

Step 3. Set the correct IP address

On the desktop side, open VS 2005
Tools -> options -> device tools -> devices
Choose Windows CE 5.0 device, click on “properties”.
On the “Windows CE 5.0 device properties” dialog, click on “configure”.
On the “Configure TCP/IP” Transport dialog, choose “use specific IP address” and type in the IP address of your windows CE 5.0 device.
Click OK.

Step 4. Enable the connection (You can skip this step if the security is already disabled on the CE device by setting "HLKM\System\CoreConOverrideSecurity = 1". But disabling security may expose your device to malicious attack)

Run cMaccept.exe

Connect to the device within 3 minutes after you run cMaccept.exe. (The 3 minutes window is for the first connection. As long as you establish the first connection within 3 minutes, the following deployment/debugging sessions using the same VS instance is not limited by this 3 minutes window)

You need to perform Step 4 again when you try to connect from another instance of VS.

Now debugger is ready to go, and you should be able to deploy and debug program(s) running on Windows CE 5.0 device now.

This solution is stable, I'll never turn back to active sync, it gave me to much problems!

Source: http://blogs.msdn.com/vsdteam/archive/2005/01/05/347332.aspx and http://blogs.msdn.com/vsdteam/archive/2005/04/28/413304.aspx