So yesterday I decided that I’d start a longer-term project of creating a decent WiFi viewer application for PPC/WinMo. Basically something to use as a good sample for the Smart Device Framework, as well as to help test out several of the features (those classes are nearly impossible to automate testing for). I’ve decided to use it as a showcase for everything I can think of as long as it isn’t superfluous – so using OpenNETCF UI controls, etc.
One of the first snags I hit is with the test device I just happen to be using – an Axim x51. I ran the app and it finds the wireless NIC, no problem. I then added some code to handle when the adapter comes or goes (like when it’s powered on and off). Again, fine. I then set out to do the list of nearby APs, so I set up an open AP and connected to it with the built-in utility.
Now all of a sudden my app doesn’t see the wireless NIC. WTF? Gotta be a bug in the SDF, right? So I trace it down and it turns out that there doesn’t seem to be a bug. a call to IPHLPAPI.DLL’s GetInterfaceInfo() method simply says there’s only one adapter – the USB connection. Strange. Maybe it’s some state problem. I power the radio off and back on (again using the built-in tool) while running my app. The adapter shows up again (hooray) but only briefly, then it disappears again. WTF? So after several of these cycles, I find that as soon as the adapter connects to an AP, it no longer shows up as an adapter using the IPHLPAPI function.
It appears that somehow they’ve decided that either when they connect or when they bind that the interface needs to be hidden – maybe to prevent other apps from interfering with theirs. Yet another genius decision by an OEM. Why would anyone ever want to do something that’s not built in? Off to eBay to find another device on which this will (hopefully) work I guess.