C# MBN API – Get Mobile Broadband Adaptor WWAN Details

List all the WWAN Mobile Broadband Adaptors and there details using the Microsoft MbnApi WWAN MBN API DLL

using System;
using System.Collections.Generic;
using System.Text;
// Add a reference to COM Tab: 'Definition: UCM Extension API for MBN Type Library' 
using MbnApi; 

namespace MBN_Test
{
    class Program
    {
        static void Main(string[] args)
        {

            MbnInterfaceManager mbnInfMgr = new MbnInterfaceManager();
            IMbnInterfaceManager infMgr = (IMbnInterfaceManager)mbnInfMgr;

            IMbnInterface[] interfaces = (IMbnInterface[])infMgr.GetInterfaces();
            foreach (IMbnInterface mobileInterface in interfaces)
            {

                MBN_INTERFACE_CAPS caps = mobileInterface.GetInterfaceCapability();
                MBN_PROVIDER provider = mobileInterface.GetHomeProvider();
                MBN_READY_STATE readyState = mobileInterface.GetReadyState();
                IMbnRadio radio = (IMbnRadio)mobileInterface;

                Console.WriteLine();
                Console.WriteLine("Manufacturer:        " + caps.manufacturer);
                Console.WriteLine("Model:               " + caps.model);
                Console.WriteLine("DeviceID:            " + caps.deviceID);
                Console.WriteLine("FirmwareInfo:        " + caps.firmwareInfo);
                Console.WriteLine("Ready State :        " + readyState.ToString());
                Console.WriteLine("HardwareRadioState:  " + radio.HardwareRadioState.ToString());
                Console.WriteLine("SoftwareRadioState:  " + radio.SoftwareRadioState.ToString());
                Console.WriteLine("InterfaceID:         " + mobileInterface.InterfaceID);
                Console.WriteLine("Provider:            " + provider.providerName);
                Console.WriteLine("ProviderID:          " + provider.providerID);
                Console.WriteLine("ProviderState:       " + provider.providerState);

            }     

            Console.ReadKey();

        }
    }
}