determine wi-fi conection

// Expert user has replied.
P Pavol Bigos 3 years 5 months ago
4 2 0

Customer is implementing logic that shall choose which connection to use when connecting with the connection manager on handheld devices with Windows Mobile.Problem is determining if the connection is an Ethernet connection or a wifi connection on the Motorola devices. Which is the best way to determine which connection is the wifi connection? They are using ConnMgrQueryDetailedStatus in cellcore.dll to get the CONNMGR_CONNECTION_DETAILED_STATUS values. In the dwSubtype variable in CONNMGR_CONNECTION_DETAILED_STATUS expect the value 2 (CM_CONNSUBTYPE_NIC_WIFI) for the wifi connections but on some devices (or on some networks?) get the value 1 (CM_CONNSUBTYPE_NIC_ETHERNET) for the wifi connections. It seems like the device type and in which office we are affects the value of dwSubtype. Customer offices are in different countries and the access points are different models and standards. Here are the results of testing: Device    Location    dwSubtype    pszAdapterName    dwType     MC65    Office 1    1    NPME\HORNET10_1    CM_CONNTYPE_NIC     MC55    Office 1    1    NPME\JEDI10_1    CM_CONNTYPE_NIC     ES400    Office 1    1    NPME\HORNET10_1    CM_CONNTYPE_NIC     MC75    Office 1    1    NPME\JEDI10_1    CM_CONNTYPE_NIC                               MC70    Office 2    1    ???    ???     MC65    Office 2    2    NPME\HORNET10_1    CM_CONNTYPE_NIC     ES400    Office 2    2    NPME\HORNET10_1    CM_CONNTYPE_NIC     MC75    Office 2    2    NPME\JEDI10_1    CM_CONNTYPE_NIC     From Microsoft’s documentation: The following table shows the connection subtypes for connections of type CM_CONNTYPE_NIC. Value    Description     CM_CONNSUBTYPE_NIC_UNKNOWN    The connection subtype is unknown.     CM_CONNSUBTYPE_NIC_ETHERNET    A network connection using an Ethernet card.     CM_CONNSUBTYPE_NIC_WIFI    A radio-based network connection using a Wi-Fi card.      Reference http://msdn.microsoft.com/en-us/library/aa456025.aspx> Thanks for help

Please Register or Login to post a reply

2 Replies

P Pavol Bigos

Thanks Dave !

D David Meyer

Due to Microsoft's limitations, in order to add WiFi value add, we need to report our WiFi adapters as Ethernet.  If a customer wants to know the difference between the ethernet and WiFi adapter in these cases, they should use the adapter name once they see that it returns ethernet.  If the name includes HORNET, JEDI, or PHOTON, that would cover all current devices.  Unfortunately once we have new radios, this would need to be expanded to support new adapters, so it may be best for the customer to make this list configurable, or perhaps put the list in the registry. Dave

CONTACT
Can’t find what you’re looking for?