maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Cell ID (https://talk.maemo.org/showthread.php?t=34866)

hopbeat 2009-11-21 09:13

Cell ID
 
Hello,

I'm trying to obtain a Cell ID, to which N900 is currently connected (GSM/WCDMA).
It works fine, when using liblocation, however, to be able to read network information, I need to set location method to LOCATION_METHOD_CWP or LOCATION_METHOD_ACWP.

What I would like to be able to do, is to read current Cell ID regardless of current location method, i.e. read Cell ID while using real GPS for positioning.

Any ideas how to do that?

Thanks!

qwerty12 2009-11-21 09:23

Re: Cell ID
 
Sorry for my noobishness, but by Cell ID, do you mean the MNC and MCC? If so, there's a Phone.Net D-Bus method (I'll dig it out of Custom Operator Home Widget if that is the case).

hopbeat 2009-11-21 09:28

Re: Cell ID
 
There is an additional field, that identifies the cell itself (MCC gives you the country, MNC gives you the network, cellID/UCID gives you the actual station):

http://maemo.org/api_refs/5.0/5.0-fi...cdma-cell-info

e.g.:
MCC: 238 (Denmark)
MNC: 20 (Telia)
Cell ID: 798903 (a station near Copenhagen)

qwerty12 2009-11-21 09:34

Re: Cell ID
 
Quote:

Originally Posted by hopbeat (Post 385041)
There is an additional field, that identifies the cell itself (MCC gives you the country, MNC gives you the network, cellID/UCID gives you the actual station):

http://maemo.org/api_refs/5.0/5.0-fi...cdma-cell-info

e.g.:
MCC: 238 (Denmark)
MNC: 20 (Telia)
Cell ID: 798903 (a station near Copenhagen)

Would 53835 be a valid Cell ID (in London, somewhere...)?

If so, you want the third value returned by "dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status"

If not, sorry... :)

The output from my N900:

Code:

Nokia-N900-42-11:~# dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status
method return sender=:1.16 -> dest=:1.212 reply_serial=2
  byte 0
  uint16 754
  uint32 53835
  uint32 30
  uint32 234
  byte 0
  byte 3
  int32 0
Nokia-N900-42-11:~#


hopbeat 2009-11-21 09:44

Re: Cell ID
 
Wonderful, thanks!


All times are GMT. The time now is 04:02.

vBulletin® Version 3.8.8