From: leibnizster on
Hello,

| am involved in a project and we have to get the signal strength of
the current GPRS connection. I heard about using ril.h and TAPI. Which
one should we use and how? Any advice would be greatly appreciated.


Thanks

From: Matt on
Hello,

You are going to need to use TAPI. Basically you are going to need to
loop through all of the adapters, using lineGetDevCaps. In this loop,
when you find the active one, call lineOpen. Then call
lineGetLineDevStatus. From that you should be able to get what you
need. If you still need help let me know and I will put together a
sample for you.

Matt

From: leibnizster on
The project uses c#. I tried using Alex Feinman's TAPI wrapper but it
wouldn't work. When I initialized the OpenNETCF.Tapi.Tapi class it
failed. Any ideas? I just added the TapiLib.dll file to the resources
and I tried using something similar to what Alex said on another
thread:

Here is roughly what you want to do:

Tapi tapi = new Tapi();

int lineNo = tapi.Initialize();

Line line = null;

for( int i= 0; i < lineNo; i++)

{

LINEDEVCAPS dc;

if ( tapi.GetDevCaps(i, out dc) == 0 )

{

if ( dc.ProviderName == CellTSP.CELLTSP_PROVIDERINFO_STRING )

{

line = tapi.CreateLine(i, LINEMEDIAMODE.INTERACTIVEVOICE,
LINECALLPRIVILEGE.NONE);

}
}
}

if ( line != null )

{

LINEDEVSTATUS status = new LINEDEVSTATUS(1024);

status.Store();

NativeTapi.lineGetLineDevStatus(line.hLine, status.Data);

status.Load();

label1.Text = "Signal strength is: " + status.dwSignalLevel.ToString();

}

line.Dispose();

tapi.Shutdown();

--
Alex Feinman


Regards,
Gottfried

From: leibnizster on
the program returns 0 at the following line:

int lineNo = tapi.Initialize();

the GPRS signal is active and I don't really know what the functions
are supposed to be doing. Anyway, the code doesn't work.

From: Peter Foot [MVP] on
If your device is Windows Mobile 5.0 you can use
Microsoft.WindowsMobile.Status.SystemStatem.PhoneSignalStrength
To retrieve the strength as a percentage.

Peter

--
Peter Foot
Windows Embedded MVP
www.peterfoot.net | www.inthehand.com

"leibnizster" <leibnizster(a)gmail.com> wrote in message
news:1140807716.409279.40230(a)z34g2000cwc.googlegroups.com...
> The project uses c#. I tried using Alex Feinman's TAPI wrapper but it
> wouldn't work. When I initialized the OpenNETCF.Tapi.Tapi class it
> failed. Any ideas? I just added the TapiLib.dll file to the resources
> and I tried using something similar to what Alex said on another
> thread:
>
> Here is roughly what you want to do:
>
> Tapi tapi = new Tapi();
>
> int lineNo = tapi.Initialize();
>
> Line line = null;
>
> for( int i= 0; i < lineNo; i++)
>
> {
>
> LINEDEVCAPS dc;
>
> if ( tapi.GetDevCaps(i, out dc) == 0 )
>
> {
>
> if ( dc.ProviderName == CellTSP.CELLTSP_PROVIDERINFO_STRING )
>
> {
>
> line = tapi.CreateLine(i, LINEMEDIAMODE.INTERACTIVEVOICE,
> LINECALLPRIVILEGE.NONE);
>
> }
> }
> }
>
> if ( line != null )
>
> {
>
> LINEDEVSTATUS status = new LINEDEVSTATUS(1024);
>
> status.Store();
>
> NativeTapi.lineGetLineDevStatus(line.hLine, status.Data);
>
> status.Load();
>
> label1.Text = "Signal strength is: " + status.dwSignalLevel.ToString();
>
> }
>
> line.Dispose();
>
> tapi.Shutdown();
>
> --
> Alex Feinman
>
>
> Regards,
> Gottfried
>


 |  Next  |  Last
Pages: 1 2
Prev: ClearView PDF viewer
Next: Hard reset