Tapi Wrapper Signal Strength

Last post 11-13-2007 9:39 by Anonymous. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 11-13-2007 9:39

    Tapi Wrapper Signal Strength

    Hello,

    I want to read network statistics such as SS from an existing connection.

    Just for testing, I manually dial my GPRS modem using rnaapp and my conectoid (or programatically using RAS)

    After connection establishes, If I run the TAPI example provided, I am only getting "UNIMODEM" as the dc.ProviderName for each device capabilities.

    Also if I test the Line, the Signal Strength shows 0xffff regardles what I do.

    1) Can I use TAPI to monitor the Network statistics even if use RAS to dial?
    2) Does it work in WinCE 5.0 (not a smartphone) without cellcore.dll?
    3) Should I use TAPI to establish my GPRS connection instead of RAS? does it has interfaces to establish the PPP link and pass credentials? (I don't think so...)
    4) If TAPI cannot be used to monitor a RAS established connection, is there any other way to interrogate the modem for signal strength without having to close the PPP session? (Note: AT commands cannot be issued because RAS owns the serial port and will not allow a second connection).



    Here is a Snipped of what I am trying in my test:

    private void Form1_Load(object sender, EventArgs e)
    {

    Tapi tapi = new Tapi();
    Line line = null;

    int ret = tapi.Initialize();

    LINEDEVCAPS dc;

    for (int x = 0; x < tapi.NumDevices; x++)
    {
    if (tapi.GetDevCaps(x, out dc) == 0)
    {
    int dwVersion = tapi.NegotiateVersion(x);
    Console.WriteLine(dc.LineName + ", " + dc.ProviderName + ", " + dwVersion.ToString());

    //Change the ProviderName to "UNIMODEM" just to test if a line can be created.

    if (dc.ProviderName == "UNIMODEM")
    {
    //Create a DATAMODEM, not a voice line
    line = tapi.CreateLine(ret,
    LINEMEDIAMODE.DATAMODEM,
    LINECALLPRIVILEGE.NONE);
    }
    }

    if (line != null)
    {

    LINEDEVSTATUS status = new LINEDEVSTATUS(1024);
    status.Store();
    NativeTapi.lineGetLineDevStatus(line.hLine, status.Data);
    status.Load();
    Console.Writeline("Signal strength is: " + status.dwSignalLevel.ToString());
    line.Dispose();
    }
    }

    tapi.Shutdown();
    }
Page 1 of 1 (1 items)