Win Mobile 5.0 无法调试和用户 WiFi

发布于 2024-11-02 20:56:54 字数 302 浏览 6 评论 0原文

我有一个必须调试的应用程序。它是 Windows Mobile 5.0 上的 C++,并通过 WiFi 使用网络连接。 (Visual Studio 2008。)

从 USB 断开并主动同步后,应用程序可以正常连接到网络,但是一旦我将其插入底座(并因此通过 ActiveSync 连接),它就会自动禁用 WiFi 网络,我可以'无论如何似乎找不到重新打开它。

我需要 ActiveSync 来控制调试器中的程序,并且需要 WiFi 来运行应用程序,但我似乎只能选择其中之一。

有人有什么想法吗?请让我不必通过 printf 语句进行调试:-)

I have an app that I have to debug. It is C++ on Windows Mobile 5.0, and it uses a network connection via WiFi. (Visual Studio 2008.)

Disconnected from USB and active sync the app connects to the network just fine, but as soon as I plug it into the cradle, (and consequently connect via ActiveSync) it automatically disables the WiFi network, and I can't seem to find anyway to turn it back on.

I need ActiveSync to control the program in the debugger, and I need WiFi to have the application run, but I seem to only be able to have one or the other.

Does anyone have any ideas? Please save me from having to resort to debugging via printf statements :-)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

埋情葬爱 2024-11-09 20:56:54

我最近通过 WiFi 进行了可靠的财富调试。神奇之处似乎在于配置设备的传输 IP 地址并使用 ActiveSync 来启动该过程。

(我在 Windows 7 (x64) 系统上使用 Visual Studio 2008;以及 Windows Mobile 6.5 设备,以防万一。)

开始将下面列出的五个文件复制到移动设备。

  1. 确保您的 WiFi 已连接并且您的 WM 设备具有有效的 IP。
  2. 在 Visual Studio 中,选择工具 .. 选项 .. 设备工具;然后选择Devices
  3. 选择您要调试的“设备”;我使用“Windows Mobile 6.5.3 Professional Device”
  4. 属性,
  5. 传输应为“TCP Connect Transport”,单击“配置”。
  6. 选择“使用特定 IP 地址”并输入地址。
  7. 退出对话框
  8. 通过 ActiveSync 连接 WM 设备;将项目连接到 Visual Studio 中的设备并运行它(在 VS 调试器中)。
  9. 退出应用程序,等待确保调试器正常完成。
  10. 断开设备与 USB ActiveSync 连接的连接。
  11. 在移动设备上运行 CMAccept(见下文)
  12. 运行调试器。 (不要等待太久,因为可能有一个时间窗口。)

如果幸运的话,应用程序将启动,就像它仍然连接到 ActiveSync 一样。您甚至可以编译和部署更新的文件,而无需重新连接 ActiveSync。

第一次这个方法奏效时,我想我的下巴都撞到了地上;我偶然发现了它,简直不敢相信它能起作用。

[在没有 ActiveSync 的 CE5.0 设备上调试] 针对 Visual Studio 2005 beta2 讨论了这一点;这似乎是相关的。 (此问题的另一个答案中也引用了此链接)。

这些说明包括将 5 个文件从主机 \Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\ 复制到设备上的 \windows

我将 5 个文件从 \Program Files (x86)\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\armv4 复制到设备上的 \VSDebugFiles (预计对它们进行实验)。我发现,如果 Visual Studio 拒绝按照上述步骤进行连接,则在设备上运行 CMAccept 会有所帮助。

万一链接被删除,这五个文件是:

  • clientshutdown.exe
  • CMAccept.exe
  • eDbgTL.dll
  • CommanClient2.exe
  • TcpConnectionA.dll

好吧,我承认这仍然是非常偶然的,但它经常发生。

如果您没有方便的方法来检查设备的 IP,请尝试 VxUtil;它是我验证 Windows Mobile 网络连接的首选网络实用程序。

祝你好运,希望它有效。

I've recently been having reliable fortune debugging over WiFi. The magic seems to be configuring the device's transport IP address and using ActiveSync to jump-start the process.

(I'm using Visual Studio 2008 on a Windows 7 (x64) system; and a Windows Mobile 6.5 device, in case it matters.)

Start up copying the five files listed below unto the mobile device.

  1. Make sure your WiFi is connected and your WM device had a valid IP.
  2. Inside Visual Studio, select Tools .. Options .. Device Tools; then select Devices
  3. Select the "Device" you want to debug; I used "Windows Mobile 6.5.3 Professional Device"
  4. Properties
  5. The Transport should be "TCP Connect Transport", click Configure.
  6. Select "Use a specific IP address" and enter the address.
  7. Exit the dialogs
  8. Connect the WM device via ActiveSync; connect the project to the device within Visual Studio and run it (inside the VS debugger).
  9. Exit the application, waiting to make sure the debugger completes normally.
  10. Disconnect the device from the USB ActiveSync connection.
  11. Run CMAccept (see below) on the mobile device
  12. Run the debugger. (Don't wait to long, because there might a time-window.)

With any luck, the app will start just as if it were still connected to ActiveSync. You can even compile and deploy updated files without needing to reconnect ActiveSync.

First time this worked, I think my jaw hit the ground; I stumbled upon it by chance and simply couldn't believe it was working.

[Debugging on CE5.0 device without ActiveSync] discusses this for Visual Studio 2005 beta2; it seems to be relevant. (This link is also cited in another answer to this question).

The instructions include copying 5 files from host \Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\<CPU> to \windows on the device.

I copied the 5 files from \Program Files (x86)\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\armv4 to \VSDebugFiles on my device (expecting to experiment with them). What I did find was that, if Visual Studio refused to connect following the above steps, running CMAccept on the device would help.

In case the link is ever removed, the five files are:

  • clientshutdown.exe
  • CMAccept.exe
  • eDbgTL.dll
  • CommanClient2.exe
  • TcpConnectionA.dll

Ok, I admit that this is still very hit or miss, but it is hitting more often than not.

If you don't have a convenient way to check your device's IP, try VxUtil; it's my go-to network utility for validating Windows Mobile network connections.

Good luck, hope it works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文