maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   read cellID from N900 using python? (https://talk.maemo.org/showthread.php?t=37212)

hopbeat 2009-12-15 11:50

Re: read cellID from N900 using python?
 
@danielwilms, it's getting tricky when you want use gps and read cell id at the same time :)

danielwilms 2009-12-15 11:58

Re: read cellID from N900 using python?
 
Quote:

Originally Posted by hopbeat (Post 428795)
@danielwilms, it's getting tricky when you want use gps and read cell id at the same time :)

If you just want to use the cell id to get the location, then you should use the location framework, because this is what it does. Or what do you want to do with the cell id?

hypnotik 2009-12-15 14:18

Re: read cellID from N900 using python?
 
Quote:

Originally Posted by danielwilms (Post 428670)
That's right. Have a look here. Further it is always better in terms of stability of the API to use the high-level APIs if it exists.


Daniel

That's cool, but I'm not seeing python-liblocation examples on that page.

bitziz 2010-01-21 15:09

Re: read cellID from N900 using python?
 
i tried Ima's script which worked nicely. however, in the information returned, can someone please tell me what is the cid and what is the lac? those two seems to have being returned as a single value...

bitziz 2010-01-21 15:12

Re: read cellID from N900 using python?
 
also, how would one make this something that's running in the background and just log everything to a file?

would something like screen work on the n900? could i just do

python cid.py > logfile.log?

lizardo 2010-01-22 16:05

Re: read cellID from N900 using python?
 
Quote:

Originally Posted by hypnotik (Post 428987)
That's cool, but I'm not seeing python-liblocation examples on that page.

Its on the PyMaemo wiki pages:

http://wiki.maemo.org/PyMaemo/Using_Location_API

Unfortunately the Cell ID information part is still not implemented in python-location (not the correct package name).

PS: as a general tip, you can see Python related wiki pages by checking the Python category:

http://wiki.maemo.org/Category:Python

fred123 2010-01-22 16:36

Re: read cellID from N900 using python?
 
lizardo
I have been looking at the location example you quoted above and get the following error.
Quote:

Traceback (most recent call last):
File "location.py", line 1, in <module>
import location
File "/home/user/location.py", line 25, in <module>
control = location.GPSDControl.get_default()
AttributeError: 'module' object has no attribute 'GPSDControl'
Any sugestions what I am doing wrong?

roose 2010-01-23 07:17

Re: read cellID from N900 using python?
 
Quote:

Originally Posted by fred123 (Post 488959)
lizardo
I have been looking at the location example you quoted above and get the following error.


Any sugestions what I am doing wrong?

rename your script to something else and don't forget to delete the compiled version (if exists)

lizardo 2010-01-27 12:14

Re: read cellID from N900 using python?
 
Quote:

Originally Posted by roose (Post 490088)
rename your script to something else and don't forget to delete the compiled version (if exists)

Correct. Furthermore, I added a small note to that page as this mistake is now common:

http://wiki.maemo.org/PyMaemo/Using_...mplete_example

siperkin 2010-02-12 04:50

Re: read cellID from N900 using python?
 
Hi Guy's

I have been checking out Lma's script from page1, it appear that when in 3G coverage args[2] shows the global cell id (unique with in network) this can be split in the following way to retrieve the RNC Id.

Upper 12 bits RNC/ Lower 16 bits Cell
i.e
52455502
001100100000 - 0110100001001110
800 - 26702

Also args[1] = LAC

Hope this helps anyone working on this.


All times are GMT. The time now is 10:21.

vBulletin® Version 3.8.8