Home
Nick - nmea_info.py - a graphical view of a nmea bluetooth gps for s60 python [entries|archive|friends|userinfo]
Nick

[ website | gagravarr.org ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

nmea_info.py - a graphical view of a nmea bluetooth gps for s60 python [Jan. 15th, 2006|07:35 pm]
Previous Entry Add to Memories Tell a Friend Next Entry
After many an hour, and I now have a graphical display of nmea data in python for series 60 going:



As you can see, it shows most of the interesting information to the screen, and updates the view as required. It also has two views about satellites (where they are, and what signal strength you have). It has a screen telling you about the OS data for your location (which needs generalising to not be so UK specific). Finally, it can take photos, and geo tag them with where you were (see this for details and requirements).

It does support logging of your position, but you can't configure it properly (just turn it on/off, and change the interval). The device to connect can be hard coded, or can be prompted for, and you have to use another program to offload collected tracks.
Oh, and it can also log your location+gsm cell to the stumblestore log file, so you can contribute to gsmloc.org.


Future features I'd like to add are: a config pane (set logging details, device to use etc), country specific view of data (easting and northing, like the OS data, but not UK specific). That'll be for another sunday afternoon though :)


Oh, and both the source + a handy .sis installer can be downloaded from my code page. You will probably also want this uploader program, which makes it nice and easy to upload tracks you've collected. Those using 3rd edition phones should see this post.

Update: v0.02 is out, with provisional satellite views. Discussion on it is currently happening here.

Update 2: v0.04 is out, which also shows signal strength. A few under the cover changes, with the help of Christopher Schmid

Update 3: v0.05 is out. Fixes a bug in formatting longitude, and allows you to control logging frequency (*=more frequent, #=less frequent, 8=toggle logging on/off).

Update 4: v0.07 is out. Now has another view, where it converts your location into OS co-ordinates (easting and northing)

Update 5: v0.10 is out. You can now download a .sis installer, and a lot of the geo stuff has been refactored to make future work easier

Update 6: v0.11 is out. Thanks to a contribution by Cashman Andrus, reconnection is supported, as is not breaking on being sent crud by the gps.

Update 7: v0.13 is out. It supports logging of location+gsm cell to the stumblestore log file, so you can contribute to gsmloc.org

Update 8: v0.14 is out. You can now see the distance and direction to a waypoint, and may add the current location as a waypoint. Random waypoint entry to follow!

Update 9: v0.16 is out. I've improved the waypoint heading view, and the OS data page now shows speed in mph. Still no 3rd edition .sis files though

Update 10: v0.18 is out. It now supports taking geo-tagged photos, see this post for details. 3rd edition sis files still pending a new py2sisng version.

Update 11: v0.20 is out. A few bug fixes for various edge cases. There's also a new version of upload_track.py, with a sis file. 3rd edition sis files pending someone to test them, and a core s60 python bug fix :(

Update 12: v0.21 is out. Few bug fixes, and the satellite view page now highlights the in-use satellites

Update 13: v0.22 is out. It will now render properly on 3rd edition phones, provided you're using a patched version of python that doesn't suffer the font bug. See this post for details.

Update 14: Python 1.3.22 fixes the font bug for 3rd edition phones. So, 3rd edition users should now use that, rather than the patched python.

Update 15: v0.23 is out. On 3rd edition phones, if you have installed LocationRequestor, it can now talk to the internal GPS.

Update 16: v0.24 is out. A few bug fixes for 3rd edition phones, and a new, simpler front screen (old screen is under details)
linkReply

Comments:
From: (Anonymous)
2006-02-04 08:42 am (UTC)

(Link)

It's a good idea! I've put it in my Nokia 7610. When I run it, after select bluetooth device, it says:

Traceback (most recent call last):
File "C:\System\Apps\Python\default.py", line 48, in menu_action f()
File "C:\System\Apps\Python\default.py", line 32, in query and exec
execfile(os.path.join(this_dir, script_list[index]), globals())
File "C:\System\Apps\Python\my\nmea_info.py", line 739 in ?
gps_addr,services=socket.bt_discover()
error: (2, 'No such file or dicectory')
From: (Anonymous)
2006-02-04 11:48 am (UTC)

(Link)

That doesn't look good, but it also looks quite deep inside python. Can you ensure you're running the latest version, and it installed without errors?
From: (Anonymous)
2007-03-18 06:42 pm (UTC)

(Link)

I didnt have the problem
From: [info]chacmooll
2007-03-18 06:42 pm (UTC)

(Link)

I didnt have the problem
From: (Anonymous)
2007-09-12 11:52 pm (UTC)

(Link)


I just started encountering this problem. The solution seems to be turn power cycle all your devices (e.g., GPS, cell phone).

-Chris
From: (Anonymous)
2006-03-02 12:47 am (UTC)

I have almost the same problem

(Link)

After I select a bluetooth device, I get a box which says "System Error"
After I select OK I see the following

Traceback (most recent call last):
File "E:\System\Apps\Python\default.py",line 60, in menu_action f()
File "E:\System\Apps\Python\default.py",line 44, in query_and_exec
execfile(os.path.join(this_dir, script_list[index]), globals()0
File "E:\System\Apps\Python\nmea_info.py", line 751 in?
gps_addr.services=socket.btdiscover()
error: (34, Result too large')

I am running pys60 1.3.1 on a Nokia 6620
From: [info]gagravarr
2006-03-02 08:53 am (UTC)

Re: I have almost the same problem

(Link)

That looks to me like the buffer python is creating to hold the results of the bluetooth discover isn't as large as the system one, so it's blowing up.

You'll need to report that bug to the pys60 team (https://sourceforge.net/tracker/?group_id=154155&atid=790646) - best also include the number of bluetooth devices that you did find, as I suspect that might be the source of the size mismatch.
From: (Anonymous)
2006-03-02 05:45 pm (UTC)

Fixed it

(Link)

I had installed the FP2 version of pys60 on my 6620 (which is an FP1 phone)

My bad.
From: [info]sharaf_maksumov
2007-04-16 01:06 pm (UTC)

(Link)

ya... very good idia, i think...
From: (Anonymous)
2006-06-04 09:51 am (UTC)

Thanks for posting

(Link)

Took the opportunity of a long weekend to play around with S60, Python and my new Bluetooth GPS receiver. Your post was quite helpful as I needed to convert the NMEA coordinates to something Google Maps can read from KML files. The trick was to convert from hour/minute/second coordinates to decimal. Your conversion method prooved quite useful in my own program. Thanks!
( http://mobilesociety.typepad.com )
From: [info]gagravarr
2006-06-04 01:32 pm (UTC)

Re: Thanks for posting

(Link)

Glad the code was of use :)
From: [info]gagravarr
2006-06-23 10:02 am (UTC)

Re: Thank you

(Link)

np, glad it's of use :)

I'm hoping to finish a track uploader, to make it easier to get recorded tracks off the phone. Check back later this weekend :)
From: (Anonymous)
2006-07-09 01:38 pm (UTC)

s60 3rd

(Link)

I have a new Symbian S60 3rd phone. Because the sis did'nt work I tried put the scripts (e:\python\nmea_info.py and e:\python\lib\geo_helper.py) on the phone. However when starting I get error that geo_helper.py was not found. Any ideas?

From: [info]gagravarr
2006-07-09 11:23 pm (UTC)

Re: s60 3rd

(Link)

Your best bet is to upload them over bluetooth, and then let the bluetooth installer "do the right thing". Be sure to install geo_helper as a library, and nmea_info as a program. I think python installer writes some metadata too, so it's not just a case of copying the files in.

No sign of a 3rd edition py2sis - I'll need to wait for that before I can make the sis files :(
[User Picture]From: [info]angryhaggis
2006-08-22 07:54 pm (UTC)

Re: s60 3rd

(Link)

I'm getting the same issue. The Bluetooth install on S60v3 doesn't handle .py files unfortunately - it just sees them at text.
From: [info]gagravarr
2006-08-22 07:57 pm (UTC)

Re: s60 3rd

(Link)

Bah. I'll try to borrow a S60v3 phone tomorrow and have a play
[User Picture]From: [info]angryhaggis
2006-08-22 08:23 pm (UTC)

Re: s60 3rd

(Link)

Looks like it's a bug in 1.3.8 - found some promising sounding information at - http://discussion.forum.nokia.com/forum/showthread.php?t=85632 - I'll have a go and see if this fixes it.
From: (Anonymous)
2006-09-22 03:51 pm (UTC)

Re: s60 3rd

(Link)

If you insert "sys.path.append('e:\\python\\lib')" into nmea_info.py before it tries to import geo_helper, it'll work.
Unfortunately it is useless to anything but logging under 1.3.8 python with broken canvas.text and gsm_location() rendering both screen output and gsmloc logging unusable.
From: [info]gagravarr
2006-09-22 04:01 pm (UTC)

Re: s60 3rd

(Link)

With any luck, they'll release 1.3.9 soon, with the right font as the default, and the python directory on the library path. Until then, bah...

You can set (near the top of the file) if you want gsmloc logging on by default, so you can have that logged despite the unreadable screen.
From: (Anonymous)
2006-07-28 07:55 am (UTC)

RMC - GPS Transit Data

(Link)

Is it possible to include this data into log file?
From: [info]gagravarr
2006-07-30 03:03 pm (UTC)

Re: RMC - GPS Transit Data

(Link)

It wouldn't be all that hard to do. Why would you want it though?

As a quick fix, just add:
gga_log(rawdata)
below the RMC section (line 1229), and it'll then log both RMC and GGA. Make sure you get the right indent though - might be safest to copy from the gga bit above
From: (Anonymous)
2006-07-28 10:42 am (UTC)

(Link)

Thank you very much for this useful code. It's working nicely for me.

I have noticed, however, that when asking for a filename the script incorrectly asks for the old filename, where it appears to need the new filename.
From: [info]gagravarr
2006-07-29 02:51 pm (UTC)

(Link)

So it does. I've fixed the prompt in the latest version, cheers for letting me know!
From: (Anonymous)
2006-07-28 02:28 pm (UTC)

Speed and Heading are unavailable

(Link)

I don't know why but speed and heading information always (unavailable). Could you please shed some light on this?

Thanks
From: [info]gagravarr
2006-07-28 02:30 pm (UTC)

Re: Speed and Heading are unavailable

(Link)

I'm guessing that your gps doesn't send that information.

If you can capture a 30 second stream of the data and email it to me, I can take a look and see what it does and doesn't send.
From: [info]gagravarr
2006-07-30 03:00 pm (UTC)

Re: Speed and Heading are unavailable

(Link)

Yup, your GPS isn't sending the VTG sentences. As its the VTG sentence that holds the speed and heading data, if we don't get those, we don't know what the values are.
From: (Anonymous)
2006-08-30 12:30 pm (UTC)

Re: Speed and Heading are unavailable

(Link)

Ive got an Itec-339 with Sirf chipset
the VGS setences are disabled by default

I wrote some "driver" code and implemented it into NMEA_INFO, that resolves this problem

ive alreade wrote other things which I found useful.
see: < a href="http://bouska.biz/GPS/nmea_info_work.py">http://bouska.biz/GPS/nmea_info_work.py</a>

m.
From: (Anonymous)
2006-08-30 12:34 pm (UTC)

Re: Speed and Heading are unavailable

(Link)

sorry, correct name is VTG sentences m. http://bouska.biz/GPS/nmea_info_work.py (http://bouska.biz/GPS/nmea_info_work.py)
From: (Anonymous)
2006-12-23 05:40 pm (UTC)

Camera issue, et al

(Link)

Hi,

I'm using this program to successfully log GPS traces on my Nokia E60 3rd edition phone. The bug relating to the fonts has not been fixed yet though :(

However, this phone does not have a camera, and thus the program dies as soon as the "import camera" line is run. I've commented it out, though it would be nice if the code could catch that situation and continue.

Another minor issue is that this phone has a much higher resolution, so what does appear is squeezed into the top left hand corner.

BTW, I made 3rd edition SIS files for this, using ensymble, if you need some hints about that, let me know at kleptog(at)svana.org.
From: [info]gagravarr
2007-01-01 06:51 pm (UTC)

Re: Camera issue, et al

(Link)

Try v0.19, that ought to behave without a camera
From: (Anonymous)
2007-01-08 03:41 pm (UTC)

Works with E70/pys60 1.3.15 but illegible

(Link)

Hi Nick,

thanks for your Python work!

Just want to report that on a E70 (http://www.forum.nokia.com/devices/E70) E:\Python\nmea_info.py works (with E:\Python\lib\geo_helper.py and E:\Python\lib\pexif.py installed) in principle, but only uses a fraction of its 352 x 416 screen.

The Satellite View is about 1/6th of the screen and the fonts are so small they are illegible...

If I can help with further testing, contact me at steinke_at_lsweb_dot_de.
From: [info]gagravarr
2007-01-08 03:47 pm (UTC)

Re: Works with E70/pys60 1.3.15 but illegible

(Link)

There's a python bug on series 60 v3 phones, which means the fonts are tiny.

I'm waiting for them to fix that before I do anything else about the screen layout on the newer phones, since I suspect I'll need to take account of how the font stuff works then.
[User Picture]From: [info]jip
2007-03-03 07:58 pm (UTC)

Re: Works with E70/pys60 1.3.15 but illegible

(Link)

see http://jip.livejournal.com/4282.html for a picture of nmea_info.py running on a N73 with PyS60 1.3.18 3rd G2 patch (3rd S60 font patch)

From: [info]gagravarr
2007-03-04 05:41 pm (UTC)

Re: Works with E70/pys60 1.3.15 but illegible

(Link)

Cool, doesn't look too bad.

If I can get my hands on the 3rd edition phone, I'll see if I can get the fonts to look a little better with the patch. Just need the phone to play with...
From: (Anonymous)
2007-02-16 02:14 pm (UTC)

thanks

(Link)

Thank you for this application.
I can't reallyuse it on my E61 cause of the font-bug with s60v3.

But having a look on your code inspired me to write my own little python-script for turning off "static navigation" on my bluetooth-sirf-gps-receiver with my symbian phone.
I found windows, linux and windows mobile solutions for this but nothing for symbian. So now I have my own :-)

Hopefully the font-bug will be fixed soon so I can use your program on my phone.

Regards,
Daniel M. (aka wasinix)
From: (Anonymous)
2007-04-18 02:16 pm (UTC)

Re: thanks

(Link)

Daniel, did you really wrote such a script for SIRF GPS ?
Possibility to switch static navigation on/off with symbian phone is something people are searching for long time already.
If you did it.... you'll be loved man :)
Could you share it with us, please ?

ZipZip
From: (Anonymous)
2007-03-02 06:51 am (UTC)

turning off after 1-2 minutes

(Link)

Thanks for this very usefull tool.

I use Nokia 6670 with NAVIBE GPS (probably GB621, identifies as BT GPS). The installed Python version is the latest 1.3.18 plus 0.20 of nmea_info.py. Both installed on MMC card.

The problem that I have is that the nmea_info.py quits or sometimes restarts the phone after 1 or max 2 minutes of usage. I've noticed that when I change the the name of the log file every minute then the program works longer.

I suspected that the bluetooth in my nokia is somehow working incorrectly, but on the other hand I'm able to send 40MB files from PC to nokia without any problems (and it really takes a while).

Did anyone have a similar behaviour?
Kris
From: [info]gagravarr
2007-03-02 10:02 am (UTC)

Re: turning off after 1-2 minutes

(Link)

There are known issues with python and bluetooth on the 3rd edition phones, which can cause python to crash horribly when using bluetooth for a while.

However, I'd been lead to believe that that'd been fixed in python 1.3.18 :(
From: (Anonymous)
2007-12-24 05:51 pm (UTC)

Re: turning off after 1-2 minutes

(Link)

Hi,

I`m having a similar problem.
I've already emailed code at gagravarr.org about it.
I`m running nmead_info at a N95 using the internal GPS.
Sometimes the program works for some seconds, and sometimes it works longer, even for more than 20 minutes.
It seems that deleting all the log files (including gps.log) and/or renaiming helps get it runs longer but not always it helps.
I'm using Python 1.4.x (on the memory card) and installed the sis version.
The .py version is giving erros on the line: "identify.gps"
Everything is signed with devcerts.
Tks,
Marco
From: [info]gagravarr
2007-12-25 11:48 am (UTC)

Re: turning off after 1-2 minutes

(Link)

Do you get the same issue if you run it from the python shell?

If the whole of python crashes, not much I can do really. Python shouldn't crash, and in doing so, is taking all the error messages with it :(
From: (Anonymous)
2007-04-19 09:01 am (UTC)

LogFile Download for iBlue 747?

(Link)

Could you implement a routine to download tracks taken with an iBlue 747 GPS?
On GpsPasSion Forums someone sucessfully reverse engineered the commands to start the download and how decode the memory dump (http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=81315&whichpage=3#521247 and http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=81315&whichpage=3#521322).
As the memory on the device is just 16Mbit (2MByte) it would be very useful to download the tracks to the phones memory card when beeing on vacation and having no PC to download them. I think it shouldn't be that difficult to import them to nmea_info.py!?
From: [info]gagravarr
2007-04-23 06:44 pm (UTC)

Re: LogFile Download for iBlue 747?

(Link)

It would be possible to write something in python on S60 to do the download, and convert to GPX. However, it would be pretty different code from nmea_info and upload_track, so not something I could fit into those. Without having an iBlue to play with, that's about all I can say.

Given there's already a java app, you might be better off porting that to J2ME, rather than starting from scratch.
From: (Anonymous)
2007-08-13 06:40 pm (UTC)

(Link)

That is a great idea. When i put in my nokia and select the bluetooth device everything was all right.
http://www.bluetooth-gadgets.com/
From: (Anonymous)
2007-10-11 05:53 pm (UTC)

Some modifications

(Link)

Hi Nick,

I have made some modifications:

- Waypoints are stored just in a human readable file.
- It is now more thread-safe. Waypoints are updated in the main thread only.
- It is now compatible to GPS receivers without VTG and/or GLL sentences (e.g. Nokia LD-1W). For that more informations (speed, heading, date) from the RMC sentence are used.
- For running with my Nokia 6600 (S60v2) it is essential to add "e32.ao_yield()" after each redraw.
- I have added a menu point for adding a new waypoint. TODO: After adding the position is not updated anymore. Perhaps this is the same issue like you have mentioned about the coexistence of canvas and list box.

You can find my mod here: http://www-lehre.inf.uos.de/~tceglare/nmea_info_SIRFII.py

Feel free to contact me: dev[at]ceglarek[point]eu

Regards,

Tobias
From: (Anonymous)
2007-10-22 08:17 am (UTC)

Re: Some modifications

(Link)

Sorry - at the moment the file is not available. I will put it there again later.

Tobias
From: (Anonymous)
2007-10-30 08:46 pm (UTC)

Re: Some modifications

(Link)

here is the file again: http://ceglarek.eu/data/nmea_info.py
From: (Anonymous)
2007-12-27 02:26 pm (UTC)

Antitheft

(Link)

Why not adding a function which lets the program send an SMS with position upon receving a call or an SMS? It would turn the phone into an antitheft (for your car if you have an old s60 to "recycle", for the phone itslef if it is a modern one with internal GPS!).
From: (Anonymous)
2008-02-12 12:08 pm (UTC)

pharmacyon

(Link)

Good morning
The good information.
I will necessarily come!
P.S Please PM me information http://vigra.890m.com/ ;) Thanks !!