Re: Help needed with GSM Geolocation without GPS
Hi, as I am not a very active member of the project any more, I don't remember exactly the content of the sqlite file. If not in there, you might have a look at the server side code. Based on raw data, IIRC that is what the server is building: some kind of coverage map. Then (so it seems, as you say this is not in the sqlite file) it gets simplified in the sqlite file. If you want to get in touch with Mick (and not Nick :-) ) who has taken over the project, you should do so through the openbmap project. He will be able to give you better answers than I do. Onen On 08/11/12 08:52, robin wrote: I think I will give this a try. I looked at the source of the sqlite file, and you can easily get the location. Is there any easy way to get the area the cell covers as a polygon, so we can check for intersections as you suggested? br robin ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- Onen ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Installing FSO on qtmoko (was: Re: Help needed with GSM Geolocation without GPS)
2012/11/6 Radek Polak: Yes, all the phone functions will use FSO dbus calls. The qtopiaphonemodem will not be used. I tried to install FSO from within neocontrol and I didn't succeed one problem is that the terminal window closes too fast and it's not easy to see that there were errors so I had to check the sources[1] the first error is that fso-gsmd-openmoko and fso-usaged-openmoko can't be found in the repositories, this is my sources.list from qtmoko-debian-gta02-v48.tar.gz deb http://cdn.debian.net/debian squeeze main deb http://cdn.debian.net/debian squeeze contrib deb http://cdn.debian.net/debian squeeze non-free deb http://security.debian.org/ squeeze/updates main contrib non-free deb http://qtmoko.sourceforge.net/debian/ / deb http://qtmoko.sourceforge.net/apps / the second error is that libfsogsm.so.0.0.0 can't be installed because the target directory is missing (I guess this is because the packages weren't installed in the previous step) so the file remains in / and if you later retry to install from within neocontrol then wget downloads another copy with a .1 suffix but the script wil try to install the previous copy (and both remain in / since installation fails again) so I suggest you add the explict destination name with the -O (--output-document) option of wget, also we can assume the /tmp is available or let wget overwrite the destination file, avoiding to use mv? eg: wget http://activationrecord.net/radekp/pub/libfsogsm.so.0.0.0 -O /tmp/libfsogsm.so.0.0.0 or wget http://activationrecord.net/radekp/pub/libfsogsm.so.0.0.0 --output-document /usr/lib/cornucopia/libs/fsogsm/libfsogsm.so.0.0.0 [1] https://github.com/radekp/qtmoko/blob/master/src/3rdparty/applications/neocontrol/neocontrol.cpp#L411 -- Daniele Forsi ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
Hi, you are absolutely right, my client for GTA02 was getting neighbour cells. I rely on FSO API. For neighbour cells data to make sense, IIRC, you must be connected to the network. Onen On 11/06/2012 04:44 PM, robin wrote: so is there any other way to get this information? also I think that the openbmap logger which worked nicely on my gta02 was somehow able to get the neighbouring cells. but I might be mistaken. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- Onen ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
On 11/06/2012 08:19 AM, Neil Jerram wrote: 4. Position being shown in NeronGPS as in eg in the Whereabouts-Mappingdemo shown on the QtMokoDev Page [1] Sounds good. I wonder what the trade-off is between implementing something like this from scratch for GTA04, and trying to integrate an existing partial solution such as GeoClue? Please note that openBmap project provides an sqlite file you may use to locate offline, through GSM and/or WiFi: http://openbmap.org/api/openbmap_api.php5 -- Onen ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
This has been discussed and tested already, especially by DocScrutinizer. Location based on signal strengh does not work. Much to many interferences. But what we do is to have a coverage area for a cell, then you can find the intersection of areas for serving and neighbour cells. Onen On 11/06/2012 09:09 AM, robin wrote: if their signal strength rate/decay over distance is different from the GSM cells. Then one would indeed need to know what cell type it is to apply the correct function to estimate the distance to it. Otherwise the more cells the better it should be. -- Onen ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
On 11/06/2012 04:27 PM, robin wrote: 2) python script + sqlite db compare cells to cells in database select the relevant ones and their position apply some function to estimate the real position You may have a look here: http://myposition.git.sourceforge.net/git/gitweb.cgi?p=myposition/location-service-python;a=blob;f=src/obm_location_dbus.py;h=bb35112d2a857251b2edfc4ffa43f21a883ecca0;hb=b8e31b3b7fd73340a638b8e57ec885d0ef108ed7 I had started working on implementing a DBus service based on offline file of openBmap in order to provide location service on the phone. It is extremely basic, and IIRC even not working, but maybe that code may be of some use to you. -- Onen ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
I think I will give this a try. I looked at the source of the sqlite file, and you can easily get the location. Is there any easy way to get the area the cell covers as a polygon, so we can check for intersections as you suggested? br robin ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
Sounds good. I wonder what the trade-off is between implementing something like this from scratch for GTA04, and trying to integrate an existing partial solution such as GeoClue? hi neil, as far as I understand geoclue comprises a communication between a provider and your phone, so that would mean data transfer via the modem. This would certainly be one solution, but it would be nice if the user could choose between: a) GSM - Provider - Location b) GSM - offline database - Location (saves money and battery(?)) I don't know if geoclue can be easily extended to use the cells.txt.gz file as an alternative input. That would be nice, because then one could actually choose between a) and b). So I started with step 1 and I am a bit stuck. The numbers for the location that the Mokofaen theme displays somehow do not match any of the cell towers my phone is most likely to be connected to: Most likely I am connected to mcc 262; mnc 3; lac 40096 and cellid 137380532 [2] How do you get those numbers? They look like UMTS ones (which are bigger than GSM). which has nowhere the numbers I get on my home screen: 296/25326 Those numbers look like GSM. Are you actually connected by GSM or by UMTS? (Some background on the GSM/UMTS difference is here: http://lists.goldelico.com/pipermail/gta04-owner/2012-September/002923.html) Thanks for pointing me to the link / I vaguely remembered reading something about this on the list. I also found the gsm-cell which corresponds to my numbers so all fine. Regarding the consistency of the databases one apparently has to be a bit careful. I checked the cells around me with the openbmap map interface, and there are certainly cells marked as standard GSM which have to be UMTS cells according to the long numbers they have for their idenfication. But I would think that this would only matter, if their signal strength rate/decay over distance is different from the GSM cells. Then one would indeed need to know what cell type it is to apply the correct function to estimate the distance to it. Otherwise the more cells the better it should be. Could you point me in the right direction on how to extract the cell and neighbouring cell ids/signal strengths in qtmoko. br roibn ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
hi daniele, maybe you can help me with your code: what I get import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() gsm_device_obj = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' ) gsm_cell_monitor = dbus.Interface(gsm_device_obj, 'org.freesmartphone.GSM.Monitor') gsm_connected_cell = gsm_cell_monitor.GetServingCellInformation() lac = int(gsm_connected_cell[lac]) cellid = int(gsm_connected_cell[cid]) quality = int(gsm_connected_cell[rxlev]) print - Information about the Connected Cell -- print str(lac)+ / +str(cellid)+ / +str(quality) gsm_neighbour_cells = gsm_cell_monitor.GetNeighbourCellInformation() print gsm_neighbour_cells I can now get the info about the connected cell but for the neighbours I get: root@om-gta02:~# python /media/card/Maps/Cells/getPositionFromCells.py - Information about the Connected Cell -- 296 / 25326 / 39 Traceback (most recent call last): File /media/card/Maps/Cells/getPositionFromCells.py, line 19, in module gsm_neighbour_cells = gsm_cell_monitor.GetNeighbourCellInformation() File /usr/lib/python2.7/site-packages/dbus/proxies.py, line 145, in __call__ **keywords) File /usr/lib/python2.7/site-packages/dbus/connection.py, line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freesmartphone.GSM.DeviceFailed: OK any ideas why the call does not work? br robin ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
Question: Is is possible to do cell-based location with an de-activated SIM ?I recall that many phones will allow for an Emergency Call (911 in North America) without an active subscription. Can the Cell ID (CID) be obtained on the GTA02 in such a situation ? -Pascal ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
On 06.11.2012 13:52, Pascal Gosselin wrote: Question: Is is possible to do cell-based location with an de-activated SIM ?I recall that many phones will allow for an Emergency Call (911 in North America) without an active subscription. Can the Cell ID (CID) be obtained on the GTA02 in such a situation ? I haven't specifically checked. However, the several USB modems I've tried this with were quite happy to show a list of operators available, with cells. http://wiki.openmoko.org/wiki/Manually_using_GSM#List_available_carriers http://wiki.maemo.org/N900_Hardware_Phone At+cops=? ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
On Mon, 5 Nov 2012 16:01:21 + (UTC) robin spielr...@web.de wrote: Hi, I wanted to give the GSM location a try. So what I would like to acchieve in the end is: 0. GPS off 1. GSM Cells are detected 2. Triangulation takes place (I don't know yet if eg signal strength is used) 3. Look-up in the OpenCellID offline (!) text database 4. Position being shown in NeronGPS as in eg in the Whereabouts-Mappingdemo shown on the QtMokoDev Page [1] Will the result work on SHR or on QtMoko or on both? Denis. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
I guess one could split the whole thing in three parts so it would be adaptable to both qtmoko and shr. I can only program in python and may add a sqlite data base. having read a bit more about triangulation, the task will be much more difficult than I though, but one will see. the three parts of the program could be somewhat like: 1) get cell id and neighbour cell ids SHR) via FSO QtMoko) ? 2) python script + sqlite db compare cells to cells in database select the relevant ones and their position apply some function to estimate the real position 3A) display position SHR) maybe via foxtrot-gps QtMoko) NeronGPS if possible 3B) create some sort of fake NMEA and alter navit.xml to read from there (as far as I remember navit can take quite a lot of sources, so this might be an option for both SHR and QtMoko br robin ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
On 06.11.2012 11:37, robin wrote: hi daniele, maybe you can help me with your code: what I get snip dbus.exceptions.DBusException: org.freesmartphone.GSM.DeviceFailed: OK any ideas why the call does not work? Because FSO supports getting the subsequent cell IDs, but the modem does not support reporting these, so you get a FAILED. You cannot (as I understand it) get any information of this form from the GTA01/2 modem. (Please note, this is fuzzy memory, it's been a while). ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
so is there any other way to get this information? also I think that the openbmap logger which worked nicely on my gta02 was somehow able to get the neighbouring cells. but I might be mistaken. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
2012/11/6 robin: so is there any other way to get this information? GetNeighbourCellInformation works on the GTA02, I used it the following code works for me, I just checked it with SHR-20101205, it used to work also on Debian but some update broke something, and I can't get it to work with QTmoko 48 I installed fso from neocontrol and rebooted the phone, but I guess I need to edit a configuration file to start fso it is almost identical to yours except the try/except block and in fact it fails often to print neighbour cells: #!/usr/bin/env python # License CC0 import dbus import time bus = dbus.SystemBus() gsm_device_obj = bus.get_object( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' ) gsm_monitor_iface = dbus.Interface(gsm_device_obj, 'org.freesmartphone.GSM.Monitor') while True: try: print (gsm_monitor_iface.GetServingCellInformation(), gsm_monitor_iface.GetNeighbourCellInformation()) except: pass time.sleep(10) -- Daniele Forsi ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
thanks I will give that a try. Does anyone know if there has been a major change with fso. I just installed cellhunter on shr and when I hit the button to get the cell the console gives while len(self.cell_la) 4: TypeError: object of type 'dbus.Int32' has no len() does anyone know about these changes? ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
2012/11/6 robin: Does anyone know if there has been a major change with fso. I just installed cellhunter on shr and when I hit the button to get the cell the console gives while len(self.cell_la) 4: TypeError: object of type 'dbus.Int32' has no len() you can find a patched version here (I didn't test it) http://shr-project.org/trac/ticket/1299 -- Daniele Forsi ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
regarding qtmoko v48 and fso. does installing and using fso to get cell information mean that you fso then also takes over all the communication with the modem (eg. calls, and so on)? or can the qt-system and fso live in peace next to each other? ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
robin spielr...@web.de writes: Sounds good. I wonder what the trade-off is between implementing something like this from scratch for GTA04, and trying to integrate an existing partial solution such as GeoClue? hi neil, as far as I understand geoclue comprises a communication between a provider and your phone, so that would mean data transfer via the modem. This would certainly be one solution, but it would be nice if the user could choose between: a) GSM - Provider - Location b) GSM - offline database - Location (saves money and battery(?)) I don't know if geoclue can be easily extended to use the cells.txt.gz file as an alternative input. That would be nice, because then one could actually choose between a) and b). Last time I looked, my impression was that the geoclue architecture should support offline - but I'm not sure. Could you point me in the right direction on how to extract the cell and neighbouring cell ids/signal strengths in qtmoko. I believe the code that sources this information is src/libraries/qtopiaphone/qnetworkregistration.cpp: look for the lines in that file that say emit locationChanged. Regards, Neil ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
On Tuesday 06 November 2012 15:29:52 mauve wrote: On 06.11.2012 11:37, robin wrote: hi daniele, maybe you can help me with your code: what I get snip dbus.exceptions.DBusException: org.freesmartphone.GSM.DeviceFailed: OK any ideas why the call does not work? Because FSO supports getting the subsequent cell IDs, but the modem does not support reporting these, so you get a FAILED. It does, but not if you're currently registered with a network. You cannot (as I understand it) get any information of this form from the GTA01/2 modem. You can, but you need to unregister first. Just tested on a very old SHR with an expired SIM. On power up it registers sufficiently to make emergency calls. At this point GetServingCellInformation returns correct data but GetNeighbourCellInformation does not. Call org.freesmartphone.GSM.Network.Unregister and subsequent GetNeighbourCellInformation calls will return data for the cells it can see. Those bits of the API may have changed since the version I tested on, but if it can't get the data it's a bug rather than a problem with the modem. (Please note, this is fuzzy memory, it's been a while). Understandable. I had to test it to see if I remembered correctly. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
On Tuesday, November 06, 2012 06:19:13 PM robin wrote: regarding qtmoko v48 and fso. does installing and using fso to get cell information mean that you fso then also takes over all the communication with the modem (eg. calls, and so on)? Yes, all the phone functions will use FSO dbus calls. The qtopiaphonemodem will not be used. or can the qt-system and fso live in peace next to each other? No. Onle one of them (FSO, qtopiaphonemodem or oFono) can open the modem. Regards Radek ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
robin spielr...@web.de writes: I guess one could split the whole thing in three parts so it would be adaptable to both qtmoko and shr. I can only program in python and may add a sqlite data base. having read a bit more about triangulation, the task will be much more difficult than I though, but one will see. the three parts of the program could be somewhat like: 1) get cell id and neighbour cell ids SHR) via FSO QtMoko) ? You should be able to get the LAC/CELLID string - i.e. the same as displayed on the QtMoko home page - using code like this: QValueSpaceItem *lac_cell_id = new QValueSpaceItem(/Telephony/Status/CellLocation); qLog() LAC/CELLID is lac_cell_id-value().toString(); Regards, Neil ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
On Tuesday 06 November 2012 08:09:58 robin wrote: Sounds good. I wonder what the trade-off is between implementing something like this from scratch for GTA04, and trying to integrate an existing partial solution such as GeoClue? hi neil, as far as I understand geoclue comprises a communication between a provider and your phone, so that would mean data transfer via the modem. This would certainly be one solution, but it would be nice if the user could choose between: a) GSM - Provider - Location b) GSM - offline database - Location (saves money and battery(?)) I don't know if geoclue can be easily extended to use the cells.txt.gz file as an alternative input. That would be nice, because then one could actually choose between a) and b). http://www.freedesktop.org/wiki/Software/GeoClue#Learn_more As far as geoclue's concerned a Provider is anything that implements the dbus interface. There's no reason for data to go over the modem, it's just that most of the current Provider implementations use online data services for lookup. You can install whichever Providers you want. All(!) that's needed is a Provider that implements the Position interface, looking up current and/or neighbouring cells in the local file/database and returning a location extimate. IIRC that would be quite a simple dbus service to implement, at least as a proof-of-concept, but I've probably forgotten somehting important. Applications can pick whether to use the Master Provider (which uses data from the 'best' available Provider) or a specific Provider, so you can have a choice between a) and b). ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
the patched version works nicely. thanks for pointing me there. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
does anyone know if the agps-onlinec works on SHR? because then one could already make use of the location of the main cell nearby to get the right coordinates for the assisted-gps query (one then needs gprs/wlan though and an account with u-blox). #!/bin/sh echo 1 /sys/bus/platform/drivers/neo1973-pm-gps/neo1973-pm-gps.0/pwron ./agps-onlinec -c full -u youraccount -k yourpasswd -la 25.073270 -lo 121.574805 -p 99.00 cat /dev/ttySAC1 is this program also working on qtmoko somehow? I remember that radek managed to store gps-data and then send it back to the modem when needed. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
On Wednesday, November 07, 2012 07:28:41 AM robin wrote: does anyone know if the agps-onlinec works on SHR? because then one could already make use of the location of the main cell nearby to get the right coordinates for the assisted-gps query (one then needs gprs/wlan though and an account with u-blox). #!/bin/sh echo 1 /sys/bus/platform/drivers/neo1973-pm-gps/neo1973-pm-gps.0/pwron ./agps-onlinec -c full -u youraccount -k yourpasswd -la 25.073270 -lo 121.574805 -p 99.00 cat /dev/ttySAC1 is this program also working on qtmoko somehow? I remember that radek managed to store gps-data and then send it back to the modem when needed. IIRC QtMoko uses just offline agp data. The code is here: https://github.com/radekp/gta02-agps and the scripts are in /opt/qtmoko/bin (those with agps or gps in name). Regards Radek ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
Dear Daniele, thanks for your reply. I was thinking to implement the whole in python. Currently it is all done by hand: I checked with openbmap what cellid I should be connected to and then downloaded the opencellid cells.txt.gz file to check if the coordinates fit and they do. so having the correct numbers for the cell one can easily get the tower position from the text file in gps-offline mode. the problem is that the numbers for location on the qtmoko home screen do not fit with any numbers of a tower near by. So I was wondering either what does numbers are and how to get the correct ones. Qtmoko currently does not run on fso, so I can't use fso commands to get the values as you do it or cellhunter does it. I am still struggling here. best regards robin ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Help needed with GSM Geolocation without GPS
robin spielr...@web.de writes: Hi, I wanted to give the GSM location a try. So what I would like to acchieve in the end is: 0. GPS off 1. GSM Cells are detected 2. Triangulation takes place (I don't know yet if eg signal strength is used) 3. Look-up in the OpenCellID offline (!) text database 4. Position being shown in NeronGPS as in eg in the Whereabouts-Mappingdemo shown on the QtMokoDev Page [1] Sounds good. I wonder what the trade-off is between implementing something like this from scratch for GTA04, and trying to integrate an existing partial solution such as GeoClue? So I started with step 1 and I am a bit stuck. The numbers for the location that the Mokofaen theme displays somehow do not match any of the cell towers my phone is most likely to be connected to: Most likely I am connected to mcc 262; mnc 3; lac 40096 and cellid 137380532 [2] How do you get those numbers? They look like UMTS ones (which are bigger than GSM). which has nowhere the numbers I get on my home screen: 296/25326 Those numbers look like GSM. Are you actually connected by GSM or by UMTS? (Some background on the GSM/UMTS difference is here: http://lists.goldelico.com/pipermail/gta04-owner/2012-September/002923.html) Regards, Neil ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community