[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading from the SIM-card (ef loci/cellid)

From: m . nerurkar
Subject: reading from the SIM-card (ef loci/cellid)
Date: Mon, 17 Jan 2005 14:44:07 +0000 (UTC)
User-agent: Loom/3.14 (


it's kind of 'off topic',
i've been talking to pkot, but he didn't implement this part in gnokii so he 
kind of forwarded me over here :)
i do hope that i've got more success here, in trying to find the answer i'm 
looking for.

here is what i'm trying to do: i'm trying to read out the cell id from the 
simcard using the file EF LOCI (0x6f7e).

i can successfully read the 11 bytes out of the SIM from 0x6f7e.
but i think that i'm doing the bit shifting (MSB/LSB) wrong.
i hope you can help me:

BYTE data[11]; // the 11 bytes of 0x6f7e
int cellid;

ReadBytesFromSim( &data ); // successfully reads the info

cellid = (data[7] << 8) + data[8]; // iirc, byte 8 and 9 contain the cellid

return cellid;

but actually the result is different from what i get if i do 'AT+creg'.
so i must be something wrong. i hope you can fix this function for me as i 
know how to go on.

thanks in advance,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]