3
votes

So I've been given to a Windows Mobile 6.1 Classic Device to work with for a project, but I was given a network adapter for it and not a USB cable. So I have to build and test across the network.

So how do I get Visual Studio to connect to the device across the network? I have read the following articles to no avail:

and also looked at:

But neither have helped me, I am not sure what to try next to try and get Visual Studio 08 to connect to this device remotely

I can ping the device, but I can't connect to the device. I know the device is connected to the network because while it is in the cradle it can browse the internet.

What am I missing to get this to work? If it can work in the first place...

Edit: To make it clear, the issue I currently have is not to do with Debugging. It has to do with Visual merely connecting to the device.

Edit 2: If it helps I don't have a Windows Mobile 6.1 Classic Device in my list of Devices to connect to. I have;

  • Windows CE Device
  • Windows Mobile 6 Professional Device
  • Windows Mobile 6 Standard Device
2
I didn't know VS2008 could connect to a mobile device through a network connection. If your device manufacturer makes an SDK that allows this, you could go that route. Out of the box? I don't think VS2008 can do it.jp2code
Hi jp2code. Remote SmartDevice debugging in VS2008 was always there.josef
One more NOTE: you will never love the MS naming strategy of device OS and Platforms or VS versions: "Windows Mobile 6.1 Classic" can be handled as "Windows Mobile 6 Standard Device". "Windows Mobile 6.5.3" is now also "Windows Embedded Handheld 6.5.3". Dont wonder, just choose a 6.x SDK without Professional (or just do not use Phone features). You can even choose a WM5 device and Platforms.josef

2 Answers

12
votes

How to connect Visual Studio 2008 to SmartDevice using TCP/IP without ActiveSync/WMDC

Remote Files

You need the following files of your VS2008 Windows Mobile SDK installation:

ClientShutdown.exe
cmaccept.EXE
ConManClient2.exe
eDbgTL.dll
TcpConnectionA.dll

change registry key HLKM\System\CoreConOverrideSecurity=DWORD:1 on device

The files you need are located at (depends on Windows CE version on device):

Windows CE 4.2, Windows CE .NET, Windows Mobile 2003, PocketPC 2003: C:\Program Files\Common Files\Microsoft Shared\CoreCon\1.0\target\wce400\armv4i

For Visual Studio 2008 and a Windows CE 5 based SDK you can use ftp \hjgode.de\temp\rdb2008.exe tool (used in following example) or the original rdb2008.exe source.

Check the IP of the device

IP address of device

Start rdb2008.exe on the device

rdb2008 on device

**Press [Prepare] in rdb2008 will extract files and set reg entry

rdb prepared

Prepare VS2008

Ensure you use a matching Windows Mobile SDK. You may use Windows Mobile 6.5 Professional SDK also on a Windows Mobile 6.5 Classic device. Or you use Window Mobile 6 SDK with a Windows Mobile 6.5 Classic device. Just use a appropriate SDK for the device.

Setup VS2008 remote device IP and Port

Select Tools-Options-Device Tools-Devices

enter image description here Select a appropriate Platform here (show devices for platform)! But as said, it is sufficient to match the basic OS (Windows CE 5).

After Selecting the right Platform select a device (no Emulator) and then click [Save As] enter image description here Enter RemoteDebug as new name.

Now select the new RemoteDebug saved entry in Devices... enter image description here

... and click [Properties]: enter image description here

Now enter a directory for file deployment (here: "\Program Files"). Ensure Transport is "TCP Connect Transport" and click [Properties] enter image description here

Ensure you use the fixed port 5655 and then enter the IP address of the remote device!

Now close all these option dialogs using the [OK] buttons.

Test the connection

In VS2008 ensure the Platform and the device is active: enter image description here

Now click Tools in VS2008 menu and then on "Connect to device" enter image description here

Again check the Plaform and Device, do not yet click [Connect]: enter image description here

Now on device: Click [Start] in rdb2008: enter image description here

You see rdb2008 says listening Port 5655!

Now click [Connect] in VS2008: enter image description here

Hopefully you got the above dialog and go on with another test. Click [Close].

In VS2008 select Debug-Attach to process: enter image description here

Select Transport=SmartDevice and click Califier:[Browse] and again select the used platform and device "RemoteDebug": enter image description here

If sucessfull, you will see a list of running processes on the device.

1
votes

you can use remote deploy and debugging without using an ActiveSync/WMDC connection.

Manual Setup

First you have to copy some files onto your device:

ConmanClient2.exe
CMAccept.exe
eDbgTL.dll
TcpConnectionA.dll

The files can be found here: C:\Program Files\Common Files\Microsoft Shared\CoreCon\1.0\target\wce400\armv4i. Change wce400 to wce500 for your Windows Mobile 6.x devices.

To allow remote debug connection on device, you have to start ConnmanClient2.exe and then CMAccept.exe on the device.

Visual Studio setup

Open menu Tools-Options and navigate to Device Tools-Devices. Select the platform for your windows mobile device and then a Devices entry. Click on [Copy] to create a new entry for your device and name it, for example, RemoteDebug. Select your new RemoteDebug entry and click [Properties]. Normally all devices use ActiveSync settings. We will switch to a TCP/IP setup. In RemoteDebug's Properties dialog select Transport=TCP Connect Transport. Click [Configure] In Configure TCP/IP Transport Dialog select option "Use specific IP address" and enter the IP address of the device.Then close the VS dialogs by clicking the [OK] buttons.

Now, you can start deployment and debugging from visual studio using the fixed IP address instead of an ActiveSync one.

Notes

Be aware that you have to start deployment and/or debugging within some time frame after you started ConnManClient2 and CMAccept on the device.

Automatic Device side Setup

I can provide an automatic install of the device side files later the day.

Download/Upload files on device

You can copy or download the device side remote debugger files either using a memory card or by providing them (single or as cab) on a web server in your network, that you can browse with the device and download.

Sources, MSDN