gsm signal quality - ril device

D

DM

Hello.

I'm trying in my app to get an information on gsm signal strength.
Searching archives of this group and
microsoft.public.pocketpc.developer
resulted in the following code, which I believe should give me
required info:

FileHandle = FileEx.CreateFile("RIL1:",FileAccess.Read |
FileAccess.Write, FileShare.ReadWrite,FileCreateDisposition.OpenExisting,0);
ASCIIEncoding enc = new System.Text.ASCIIEncoding();
byte[] buf = enc.GetBytes("AT+CSQ");
int written=0;
FileEx.WriteFile(FileHandle,buf,buf.Length, ref written);
if (written != buf.Length )
MessageBox.Show("Hmm ");
byte[] readBuffer = new byte[200];
int read = 0;
FileEx.ReadFile(FileHandle,readBuffer,readBuffer.Length,ref read);
string result = enc.GetString(readBuffer,0,read);
textBox2.Text = result;

Unfortunately - WriteFile reports that 0 bytes is written to the
device - the same refers to read.
I would be grateful for any help.
 
M

Matt Evans

Is there any reason why you can't just use:
SystemState.PhoneSignalStrength instead of accessing the RIL directly?

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top