![]() |
Change profile on gsm cell change or get cell id.
I used to use an application in N73 that let you change profiles based on which GSM cell you're in, or entering, or leaving.
Just trying to find something similar. Changing profiles from a script is no problem in maemo 5. How do i get current cell number though? Any ideas? Or if there is an app that meets the real requirement that's even better. Thanks. |
Re: Change profile on gsm cell change or get cell id.
Hmm... Alarmed can change on time but not on calendar entries or cell ID like Smartprofiles, Best Profiles, et.c.
I don't know if anything like this is in the pipeline... I don't see why it wouldn't be possible though. |
Re: Change profile on gsm cell change or get cell id.
It's very possible with shell scripting. Cell id can be obtained with a certain dbus call (see phone control wiki page).
|
Re: Change profile on gsm cell change or get cell id.
Quote:
http://wiki.maemo.org/Phone_control#...tration_status As this one outputs few bytes of data. Any more information? Any specific dbus method I need to call or any other signal to send to device? Lastly, is there an api-doc of some sort with a list of dbus methods with some intro/description? |
Re: Change profile on gsm cell change or get cell id.
get_registration_status is the right operation. You want to combine the four parameters LAC, cell id, operator code and country code to define the cell. These are the second, third, fourth and fifth response arguments.
Here is how you get them in a shell script: Code:
reg=`dbus-send --system --print-reply=literal --type=method_call \ |
Re: Change profile on gsm cell change or get cell id.
This is really useful. I am trying to do the same thing (if Shepherd ever gets properly released and workable then I'll be able to use that instead, but not holding out much hope).
But I don't want to poll dbus every few second/minute or two to find out if its changed; using the location api lib means maybe an online lookup for assisted cell-id-location or use of gps. I don't care about keeping the location of certain cell's cached, 'cos I'm happy to manually associate my regular few (work, home basically) with the right code to run my actions I want at certain times. Do you know what the signal emitted is every time the cell id changes, if there is one - or a more trigger-based action rather than polling it if there's an alternative to dbus? Or alternatively, am I being too dismissive of the location api (I only briefly skimmed some of the wiki info on it)? Is it possible to use it without relying on cached cell id locations that might fail if cache expires/cannot be downloaded/could return just somewhere in the middle of the country if it only knows I'm in the UK, for instance? |
Re: Change profile on gsm cell change or get cell id.
Quote:
Code:
bus.add_signal_receiver(signal_registration_status_change, dbus_interface = "Phone.Net", signal_name = "registration_status_change") |
All times are GMT. The time now is 21:47. |
vBulletin® Version 3.8.8