How to Determine Signal Strength On Workabout Pro3

  • We are attempting to programmatically determine the current signal strength in a Psion Teklogix Workabout Pro 3 in a VB.NET application using Windows Mobile 6.1.

     The SDK is version 5.4.18939.0.

     The code

     Dim adapter As PsionTeklogix.WLAN.NetworkAdapter

    throws a warning:

     PsionTeklogix.WLAN.NetworkAdapter' is obsolete: 'use WlanEx Instead'

     When we attempt to reference

     PsionTeklogix.WlanEx

     we receive the error

     Type 'PsionTeklogix.WlanEx' is not defined.

     Is there any way to extract the current signal strength without warning or error?  We are using the Summit supplicant.

     Thank you in advance.

     

  • Good morning,

    Please take a moment to study the following Mobile Devices SDK sample (even though it is a C# solution)

    C:\Program Files\Psion\Mobile Devices SDK V5.4\Samples\dotnet\c_sharp\WlanEx\WlanEx

    E.g.

    SummitForm.cs excerpt

    [...]

            private void statsRefreshControl_Click(object sender, EventArgs e)
            {
                statsControl.Items.Clear();
                NdisInterface.ConnectionStatistics stats;
                try
                {
                    stats = supplicant.GetConnectionStatistics();
                }
                catch
                {
                    statsControl.Items.Add("Not Available");
                    return;
                }
                if (stats.ConnectState == NdisInterface.MediaState.disconnected)
                {
                    statsControl.Items.Add("Disconnected");
                    return;
                }
                // ok, we've got something to report
                statsControl.Items.Add("RSSI: " + stats.Rssi);
                statsControl.Items.Add("Packets In: " + stats.PacketsIn);
                statsControl.Items.Add("Packets Out: " + stats.PacketsOut);
                uint errors = stats.InErrors + stats.OutErrors;
                statsControl.Items.Add("Errors: " + errors);
                // add more stats here if you like...
            }

    [...]

    Kind regards,
    Jacques

  • Jacques:

    Good afternoon.

    Thank you for pointing us in that direction.

    However, my issue is not so much using the class as it is accessing the class.

    For example, the VB.NET statement

    Imports PsionTeklogix.WlanEx

    throws the warning:

    "Namespace or type specified in the Imports 'PsionTeklogix.WlanEx' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases."

    However, the C# statement

    using PsionTeklogix.WlanEx;

    throws no error or warning.

    In VB.NET we have no access to the object variable supplicant (object type SummitInterface).

     How can we gain access thereto?  Thanks again in advance.

  • Good afternoon psionhack,

    Can you please give the Visual Studio 2008 « WlanEx sample in C# with VB .NET addendum (MDSDK 5.3) » solution a try and let us know how it goes from your end?

    & Once you've opened the solution, feel free to change the current references to the Psion MDSDK v5.3 libraries, with the ones found in MDSDK v5.4.

    Regards,
    Jacques

  • Whoops.

    Um, because we had not not added the reference to the assembly to the project maybe?

    We'll try to be less stupid later.

    For others having the same issue, in Visual Studio,  go to Project > Add reference... > Browse and browse to where PtxSdkWlanExNet.dll is kept, and add that reference.

  • It's getting worse, maybe.

    Adding the reference to the PtxSdkWlanExNet.dll in the DotNet3.5 folder permits us to create error free code mimicking that in the sample from the first reply.

     However, when we run our modified code, at the statement:

    mointerfacefactory = New PsionTeklogix.WlanEx.InterfaceFactory

    Visual Studio 2008 informs us:
    MissingMethodException was unhandled
    Can't find PInvoke DLL 'PtxSdkWlanExCommon.dll'

    If we attempt to add a reference to

    PtxSdkWlanExCommon.dll

    from the "windows ce 6.0" folder, Visual Studio informs us "A reference to PtxSdkWlanExCommon.dll could not be added."

    When we run the sample code in the first reply, the same error occurs at the statement

    myFactory = new InterfaceFactory();

    Any ideas greatly appreciated.  Thanks in advance again.

     

  • Please follow these steps:

    1. Select the Add Existing Item.... option from the Project menu

    2. In the dialog box that appears, use the navigation tools to browse to the Mobile Devices SDK installation directory, and from there to the subdirectory that corresponds to the Operating System the application will be deployed on. I.e.

    \windows ce 5.00, \windows ce 6.00 or \windowsmobile6.

    3. Change the selection in the Files of type: or Objects of type: field to Executable Files (*.exe;*.dll;*.ocx) to make the DLL files visible.

    4. Select the PtxSdkWlanExCommon.dll file and click Add. The DLL file should now appear in the Solution Explorer window under the project name.

    5. In the Solution Explorer window, right-click the PtxSdkWlanExCommon.dll object and select Properties from the drop-down menu that appears.

    6. In the Copy to Output Directory field of the Properties window, select Copy if newer.


    --

    Last but not least,  let me bring the « Psion Mobile Devices SDK - Getting Started in .NET » knowledge base article to your attention.

  • Jacques, that fixed this issue.  Thanks again.