none
Connect to WiFi/3G

    Question

  • Hi everyone,

    I'm building a simpel program on a Pocket PC running Mobile 5.0.

    I won't go into details but when the application starts up, it need to connect to either WiFi or 3G, in that order.

    Which classes can I use for this, or is there anyone that knows a tutorial of some sort where I can learn more?

    Thanks in advance,

    Tobias Vandenbempt

    Monday, March 26, 2007 5:20 PM

Answers

  • I think I've found a solution using the openNETCF class concerning the WiFi problem, however when trying to connect to 3G I have found a solution yet. You mentioned GPRS, but I was told that 3G (UMTS) isn't the same as GPRS, or am I wrong?

     

    I've already found lots of links point to the connection manager class, but I haven't found any examples yet, and I have found out how it works yet.

     

    Tobias

    Thursday, March 29, 2007 2:56 PM

All replies

  • Hi,

    on WM2005 is a Connection Manager. You can configure your possible networks and WM manage the connections itself. So for example if you pass an Http request, it will try to connect vie WiFi and if it is not possible via GPRS as far as they are properly configured.
    There is also an API for this stuff to make configurations programaticaly.

    Read more on msdn ( http://msdn2.microsoft.com/en-us/aa458955.aspx )

    Tamas
    Tuesday, March 27, 2007 8:22 AM
  • Thanks for your help, I'm looking into Connection Manager, but it's not easy. You would really help me out if you knew of some code samples concerning this.

     

    I've also tried using the OpenNetCF Class with the following code, but I only got 1 networkadaptor from the request and it said it was not wireless. But then again maybe I should post this on their forum.

     

    AdapterCollection ac = Networking.GetAdapters();

    foreach (Adapter ad in ac)

    {

    if (ad.IsWireless)

    {

    MessageBox.Show(ad.Name + " - " + ad.SignalStrength.Strength.ToString());

    //AccessPointCollection apc = ad.NearbyAccessPoints;

    //foreach (AccessPoint ap in apc)

    //{

    //MessageBox.Show(ap.Name);

    //}

    }

    }

     

    Thanks for your help, appreciate it.

     

    Tobias

    Tuesday, March 27, 2007 12:20 PM
  • I also tried trough the Microsoft.WindowsMobile.Status Class, but the following

    SystemState ssNetworkNames = new SystemState(SystemProperty.ConnectionsNetworkDescriptions);

    didn't do much, return a empty string.

    And the PhoneGprsCoverage property just gave me a number, and me leaving wondering what I represents.

    SystemState ssPhoneCoverage= new SystemState(SystemProperty.PhoneGprsCoverage);

    Greetz,

    Tobias

    Tuesday, March 27, 2007 1:14 PM
  • Hi,

    the question is, if you really need such a low level control over the network media. I also tried many implementations (especially NDIS) which works fine on PPC 2003 but not any more on WM2005. Now we just configure WiFi and GPRS (it is possible to control with the RAS API but it has some bug in the WM2005) with XML Configuration Providers, and in our code just fire the http request when needed und let WM to manage our networks (it also choose the cheapest available). For a possible detection of WLAN status change or signal values is it better to ask your OEM for a Radio card SDK.

    Tamas
    Wednesday, March 28, 2007 6:36 AM
  • I think I've found a solution using the openNETCF class concerning the WiFi problem, however when trying to connect to 3G I have found a solution yet. You mentioned GPRS, but I was told that 3G (UMTS) isn't the same as GPRS, or am I wrong?

     

    I've already found lots of links point to the connection manager class, but I haven't found any examples yet, and I have found out how it works yet.

     

    Tobias

    Thursday, March 29, 2007 2:56 PM