I'm trying to retrieve the SignalStrength (i.e. like the info behind the bars cellular phones), but on a desktop application developed in C# .NET 4.0, that has a GSM adapter connected to it. I've managed to connect and disconnect to the service provider using RasDialer, but I can't find anyway to get the SignalStrength. I've tried MbnApi, but it runs great until I receive the connected interfaces, and after I use one of them for ANYthing, it crashes with a COM exception saying "the data necessary to complete this operation is not yet available". Here's a piece of code that crashes with this exception on the last line:
MbnInterfaceManager mbnInfMgr = new MbnInterfaceManager();
IMbnInterfaceManager infMgr = (IMbnInterfaceManager)mbnInfMgr;
MbnConnectionManager mbnConnectionMgr = new MbnConnectionManager();
IMbnConnectionManager ImbnConnectionMgr = (IMbnConnectionManager)mbnConnectionMgr;
var mobileInterface = infMgr.GetInterfaces() as IMbnInterface[];
IMbnSignal sig = (IMbnSignal)mobileInterface[0];
uint signalStrength = sig.GetSignalStrength();
Can anyone assist, either by explaining what I'm doing wrong with MbnApi or directing me to another alternative?
Thank you so much in advance, Yaron.