Symbol MC9090 and ConnectionMonitor

Topics: Mobile Client Software Factory
Sep 16, 2006 at 9:05 AM
originally posted by: mrbelk

I am trying to develop a mobile smart client app that will be deployed on Symbol devices running Windows Mobile 5.0. I have had no issues with the development, but there is a problem using the Mobile.DisconnectedAgent and Mobile.ConnectionMonitor blocks. Namely, even when the device is cradled and connected via ActiveSync, the ConnectionMonitor reports that there is no active connection; so the RequestManager chokes and never processes any of the pending requests in the queue.

Is there any collective experience working with Symbol devices? FWIW, everything works beautifully on a Dell AXIM X51.

I have the "Connections" and "Network Cards" configured the same for both devices.

Thanks for whatever assistance you can provide.

-Matthew Belk
BizSpeed, Inc.
Sep 16, 2006 at 11:34 AM
originally posted by: dcazzulino

It would help diagnosing the issue if you could verify that the appropriate events from the built-in Connection Manager API are being fired by the device, using a simple winforms app.
Sep 19, 2006 at 9:51 AM
originally posted by: mrbelk

When I try to initialize the connectionmonitor, using the factory CreateFromConfiguration method, with entries in the App.config file like this:

<Connections>
<ConnectionItems>
<add Type="CellConnection" Price="8"/>
<add Type="NicConnection" Price="2"/>
<add Type="DesktopConnection" Price="1"/>
</ConnectionItems>
</Connections>

, when the factory gets to the "DesktopConnection" entry and tries to instantiate a "DesktopConnection" object to add to the monitors Connections collection, in the SystemStateConnectionBase base class ctor, the SystemProperty is "ConnectionsDesktopCount" and the value is zero. When I connect my Dell Axim, that value is one. Subsequently, if I try to hook to the ActiveConnection.StateChanged event of the ConnectionMonitor object, the framework throws a NullReferenceException since there is no ActiveConnection object.

When I check the device's registry, the Symbol device reports zero connections in the \\HKLM\System\State\Connections, where the Axim correctly reports the value of the Count value in the Connections key as 1, and the Desktop Connection with a count of 1 and a Descriptions value of "CurrentDTPTNetwork". Interestingly enough, on both devices, the
\\HKLM\System\State\Hardware key has a value of one for the "Cradled" value.

... Some time passes ...

I discovered that if I enable the WiFi adapter on the MC-9090, then when I cradle the Symbol, the Desktop connection shows enabled, so it would appear that at least on Symbol devices it's a prerequisite that the WiFi adapter be enabled even if there are no profiles to connect to.

Regards,
Matthew
Sep 20, 2006 at 5:03 AM
originally posted by: josegallardo

The "ConnectionsDesktopCount" system property comes from the CF managed APIs. It looks like there is a problem between those managed APIs and the Symbol MC9090. It would be great if you can verify that isolated in a small app.

Additionally, the Connection Monitor uses managed and native APIs.
Managed APIs in order to detect connectivity status changes, and native APIs (take a look at ConnectionMonitorNativeHelper.cs) in order to get the network associated to a given connection (if it's already connected), to get the network list and to get extended status information.

I think the best approach is to find out what is working different in your Symbol device from the low-level. You can use the following links as a start point.

For Native APIs:
http://msdn.microsoft.com/library/en-us/mobilesdk5/html/mob5oriConnectionManagerWindowsMobile.asp?frame=true
For Managed APIs:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mobilesdk5/html/T_Microsoft_WindowsMobile_Status_SystemProperty.asp