Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This post is somehow related to a previous one (Establishing GPRS Connection on Windows CE and Windows Mobile: Sample Codes), at least for the Windows Mobile-part. On Windows Mobile, Connection Manager is smart enough to the use the less expensive network available at the moment: hence, it'll open a GPRS connection only if the device is not connected through ActiveSync\WMDC's Desktop Passthrough and WiFi is not available. This depends on how you've provisioned the CM_Planner Configuration Service Provider, however that's the usual configuration.
However, how can I debug my code when it invokes ConnMgr APIs? It's simple (when you know it...): just don't use ActiveSync\WMDC. I'm talking about:
- Disable USB under ActiveSync\WMDC's Connection Settings (i.e. uncheck "Allow USB connections")
- Follow suggestions provided by the VSD Team for Windows CE 5.0 here: they apply to Windows Mobile devices as well - basically you need to manually do what Visual Studio automatically does through ActiveSync\WMDC
- Note that you'll need to know the IP address of the device: to do so you can use the Windows Mobile Network Analyzer PowerToy, but if you only need to know the current IP Address, then a very quick solution is to display it within the Home Screen through for example the Today IP 2005 Home plugin (it works even on WM6).
Cheers,
~raffaele
- Anonymous
February 19, 2009
Just found a smarter way to address this, if you know if the metanetwork (Internet or Work) the application will need: http://www.pluralsight.com/community/blogs/jimw/archive/2008/07/16/debugging-device-cellular-connection-code-without-activesync-interference.aspx. Thanks Jim!! ~raffaele