![]() |
read cellID from N900 using python?
anyone have some python code which will allow me to pull the currently connected cell ID?
I want to be able to use this value to query an open cell database to get a rough location of the user (for when indoors/gps not working, etc) thanks. |
Re: read cellID from N900 using python?
http://talk.maemo.org/showthread.php?p=386188 showed how to do it in C. I know you requested for Python specifically, but I don't know python-dbus and I think python-osso won't help here, either, as the Cell ID is not the first thing returned...
|
Re: read cellID from N900 using python?
@hypnotik:
and here you have an example of using DBus in Python (this one is for WLAN scanning): http://slexy.org/view/s25h3to4Rr |
Re: read cellID from N900 using python?
Thanks qwerty12, hopbeat for the examples. I'll give a go.
|
Re: read cellID from N900 using python?
Quote:
I'm assuming I need to modify com.nokia.wlancond.signal to something else? EDIT: Ok, this is slowly starting to make sense now... qwerty12's post here shows the code for reading cellID. I just need to adapt it somehow to python. http://talk.maemo.org/showpost.php?p=385947&postcount=2 |
Re: read cellID from N900 using python?
Hmm.. I give up on this. Tried to adapt the code from qwerty12 into hopbeats' but I'm doing something wrong.
Code:
from dbus.glib import * All I get is: Code:
ERROR:dbus.proxies:Introspect error on :1.16:/com/nokia/phone/net: dbus.exceptions.DBusException: rpc.Error: object /com/nokia/phone/net doesn't have interface org.freedesktop.DBus.Introspectable |
Re: read cellID from N900 using python?
I wanted to try, python-dbus, I really did... But you turned out to be a piece of **** that can't do this correctly. So I cheated:
File.c: Code:
#include <glib.h> File.py: Code:
from ctypes import * |
Re: read cellID from N900 using python?
Not quite what hypnotik wants, but here's a script I'm using to log cell ID changes, hopefully it'll help:
Code:
#!/usr/bin/env python |
Re: read cellID from N900 using python?
Quote:
|
Re: read cellID from N900 using python?
Quote:
Daniel |
All times are GMT. The time now is 03:32. |
vBulletin® Version 3.8.8