| View previous topic :: View next topic |
| Author |
Message |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
Posted: Thu Jan 04, 2007 10:32 am Post subject: GPSD custom firmware - FAQ/How-to/etc. |
|
|
(Updated 7/23/7 to reflect Google Earth KMZ logs and some minor edits)
This first message of this thread will contain the latest current release instructions for my GPSD firmware.
The original discussion threads are at:
http://www.evdoforums.com/viewtopic.php?t=1806 and
http://www.evdoforums.com/viewtopic.php?t=2249
and might provide more detail and answer other questions. Also things like alternate power sources and such aren't covered here but are discussed in other threads. Also how to flash the firmware is also covered in detail elsewhere - you will just need my firmware file.
You need a SERIAL gps and a special cable which will plug into the DIAGNOSTIC port (normally covered with a plug), NOT the USB port. I haven't gotten any USB serial (non-phone) connection to work on the real USB port, so I normally use it to provide power. booster-antenna.com has the cables available or you can build your own:
http://homepage.mac.com/tz1/.Public/KR1Stuff/USBSerial.jpg (or check out the GIFs or forum for detailed instructions). Basically:
Cut apart a standard USB cable. The wire colors are normally a standard - red (+5), Black, (Ground), White and Green (USB signals). Get a male RS232C DB9 connector (Like on old PCs or USB-to-Serial adapters - it has small pins inside the hood). Connect the black wire to pin 5 (ground), the green wire to pin 2 and (if you ever want to talk TO the GPS, the white wire to pin 3).
The GPS simply has to be any NMEA compatible serial model (and set to NMEA mode) and work at 4800, 38400, 19200, 9600 or some other common baud rate - I auto-detect - and have GPRMC and some other standard sentences (like the visible satellites) turned on. I can handle 5Hz GPS data, and probably faster, though most are 1Hz update.
Generally the latest beta firmware works well if it has been there for 48 hours (that is how long it takes me and others to test it sufficiently). Currently it is:
http://homepage.mac.com/tz1/.Public/gps100a.bix
Note that DynDNS support has been restored but otherwise it is mostly RK1010 - this may change - look here or in the discussion threads or just look at the homepage link:
http://homepage.mac.com/tz1/
My firmware includes my own ID string and date visible on the firmware page of the KR1 setup.
I would upgrade to RK1010 in the KR1 first and verify settings (except DynDNS, which I restored in mine) and that you can do firmware upgrades properly - read or print the upgrade and "unbricking" articles in this forum just in case.
Once it is updated with my firmware and hooked up, my mini-gpsd is there at port 2947, there is a virtual serial port at 22947, and an HTTP port for GPS status and google map at port 8888. Internally this would be something like http://192.168.0.1:8888/x.html, externally http://yourhostname.dyndns.org:8888/x.html.
The virtual serial port can be used to configure the GPS while on the KR1 or to use standard Windows mapping or other GPS software including things like the Garmin setup utility but I would not try firmware updates.
(http://www.hw-group.com/products/hw_vsp/index_en.html is a free virtual serial port driver for windows)
For Google Earth, simply append kml instead of html, e.g. in GE, do Add->Network Link... http://192.168.0.1:8888/x.kml and set the refresh options as you want, and if you do fly-to there are extra parameters described below.
Also there is a micro web server at port 8081 (http://192.168.0.1:8081) which gives a directory of KMZ files which contain the GPS position, velocity, etc. information in a format Google Earth can use. The height of the "fence" is the velocity. The other information like time and heading are in XML comments. (KMZ files are simply ZIP files with a different suffix, however google earth itself strips out any extra data so you should save the original file if you want the extra info). There will be a "current.kml" which is the log being filled at the moment, and a number of YYMMDDHHMM.kmz files which are the time of the logs, a new one every 5 minutes.
For a Google map, you can include a suffix by appending an ampersand and then the text:
http://kr1gps.dyndns.org:8888/x.html&z=16&t=h
This will append anything from the first & through the end of the URL so various things can be set - t=h is hybrid, t=k is satellite (keyhole, which is the basis of google earth), z for zoom.
(Note there is a bug in the current version where there will be two ampersands in the google map request, but it doesn't seem to hurt anything.)
http://mapki.com/index.php?title=Google_Map_Parameters
describes the parameters. The q= and ll= are filled in by the kr1 firmware, the rest are up to you.
For Google Earth tracking, you can do something like:
http://kr1gps.dyndns.org:8888/x-45-1500.kml
Note that the values default to zero (my oops), so you will get an ultra-zoomed looking straight down if you don't include them and enable "fly-to-view" in the refresh options.
The above sets the tilt to 45 degrees and the height to 1500 (meters?). This way you can set the view to whatever you desire. The dashes/hyphens just need to be something non-numeric. x60y800.kml should work just as well but I haven't tested it.
GPSD is a basic implementation, and you can telnet to port 2947 and type "H" to get a list of commands. I've tried to parallel the current GPSD, but it uses C++ and floating point and is a rather heavy implementation. I call mine minigpsd and the source will occasionally be updated in the KR1 section of my .mac page. It does support "R" to turn on a raw dump of the NMEA data stream for virtual serial ports - the 22947 port is NOT multiplexed, but the 2947 is, so you can run several virtual ports that way as long as you can use a terminal to do "echo R >com7:" or equivalent.
All of the GPSD stuff is a "pull" technology, so you will have to have remote servers connect and pull the information, be it raw NMEA from 2947 or 22947, or the html or kml files. I'm working on some kind of push with ftpd, but it won't be done for a little while.
Also note telnetd and other debug or utility things are in these versions of the firmware if you want to explore the KR1 - you might also want to firewall them if you are concerned about security.
You can use telnet to verify the firmware is working, and "ps ax" - a unix command - should show gpsd somewhere in the list.
I also have a hardware mod that provides 5v for my 5Hz Garmin 18 GPS module on the red wire of the diagnostic port. The Garmin-18 LVS oem models are the simplest with this power mod - they have a red and a thicker black wire (the thinner ones can be ignored) which can go direct, and white and green need to be crossed (white to green). Yellow is the PPM and left unconnected.
A new version which may be available soon will set the time on the KR1 when the GPS is locked. Note that daylight savings time is not working on the KR1 itself, so the time zone should be set so it gives the correct time with DST disabled.
Last edited by tz1 on Mon Jul 23, 2007 9:19 am; edited 1 time in total |
|
| Back to top |
|
 |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
Posted: Sat Mar 17, 2007 8:24 pm Post subject: New favorite GPS |
|
|
http://www.buygpsnow.com/i-blue-737-pro-5-hz-edition-32-channels-auto-on-off-waas-iblue737-i-blue-gps-758.aspx
5Hz, Bluetooth, 15 hours of runtime. MUCH more sensitive than the Garmin. If I put it on the floor of my vehicle it still tracks.
Some hiccups - the decode of some fields are different (number of decimals), but I'm fixing that, I can't control things like dead-reconing time (at least not yet, I need to review the chip specs). Limited NMEA sentences.
But overall, tiny, sensitive (the Garmin wouldn't work inside, but this does), and not that expensive.
And the KR1? I just used:
http://www.aircable.net/serial.html
The instructions say how to set the PIN and master (look for discoverable) mode. I set the jumpers to 38,400, did a series of commands to set the PIN to the one for the GPS and mode, and it talked.
Power through pin 9, so I take the red (5v) wire from the current cable I use for the Garmin to pin 9 of the null modem adapter and/or direct using the other gender RS232 connector. I have a number of universal adapter/power units for both the aircable (which also has a power socket) and GPS (mini USB, apparently power only). Right now I'm using the null modem connector and the cable I described with pin 9 power added. And it works fine, and the combo is about the same price as the Garmin 5Hz. |
|
| Back to top |
|
 |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
|
| Back to top |
|
 |
hammer32 EVDO Fledgling
Joined: 01 Nov 2005 Posts: 22
|
Posted: Sun Apr 08, 2007 2:01 pm Post subject: |
|
|
tz,
Have you been able to make any progress on trying to get the Google Earth .kmz file to auto upload to an external server?
Thanks much,
Sean _________________ -Sean |
|
| Back to top |
|
 |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
Posted: Wed May 02, 2007 9:22 am Post subject: |
|
|
gps firmware 0.9 release candidate 2
Features: Google Earth kml fix, GPS Logs!, Micro web server (http://192.168.0.1:8081/) which will display the directory with the logs, which are gzipped periodically to save space.
Errata: needs to be secured, no way to delete logs yet.
This one has a micro web server at port 8081 pointed at /var/tmp - you can use POST to send files (I'll document it more fully later) but mainly download the GPS logs which are now accumulated and gzipped every quarter-megabyte (down to just over 30k). It isn't secure so you can also browse the rest of the filesystem and it may contain things like dyndns passwords or other things you won't want (but the firewall should limit this). That is also true of telnetting in though.
http://homepage.mac.com/tz1/.Public/gps0.9-rc2.bix
I may try adding a live KML or KMZ file to the directory or with path or something later.
I also fixed a bug where google earth would draw the "here" icon in the wrong place while tracking. |
|
| Back to top |
|
 |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
Posted: Sat May 12, 2007 12:44 pm Post subject: GPS with KML "lightcycle" support in my 1010 UPDAT |
|
|
If you remember the lightcycles from the movie "tron".
SUCCESS !? gps10e as of 5/12 20:05 is the latest test - the firmware date has a build time too and should be visible)
http://homepage.mac.com/tz1/.cv/tz1/Sites/.Public/gpskml10e.bix-zip.zip
at http://192.168.0.1:8081/ (or yours.dyndns.org, or your revised local IP) you will see a directory (if the GPS is working) containing current.kml and after a few minutes a file of the form YYMMDDHHM0.kmz.
I am constantly updating the first kml file until the minutes ten digit changes, then zipping it into a KMZ. So after the first, there will be a new KMZ every 10 minutes named at the single new minutes digit, hence the HHM0 instead of HHMM.
DynDNS has been reenabled in this, as well as telnetd.
You can point google earth at the current.kml and set a refresh. It doesn't replace the main x.kml link (which includes the icon and view - there is a fix for a problem with the icon).
I don't have a way of collecting the KMZ files, but they can be grabbed and stored with any browser.
It still needs some testing but seems to work well. |
|
| Back to top |
|
 |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
Posted: Sun May 13, 2007 6:46 pm Post subject: |
|
|
http://homepage.mac.com/tz1/.cv/tz1/Sites/.Public/drivethrough.jpg-zip.zip
This is an example of the path recording. The height is proportional to the speed of travel. Here I'm stopping at a drive through.
To import the KMZ files into a spreadsheet, first get the original file (if you put it into google earth, then save, it will lose data). Unzip it. A KMZ is just a zipped KML.
For most spreadsheets, set it to accept both commas and spaces as field separators. Remove or tell it to ignore the first and last line. There will be a few extraneous fields for the XML comment, but you will have longitude, latitude, speed, heading, altitude, minutes, and seconds. The filename is the date and time of the last recorded point.
There are still a few tweaks I can do but this might be the release version.
(it seems to have occasional problems fetching the current.kml file with my 5hz GPS when it gets too big). |
|
| Back to top |
|
 |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
Posted: Tue May 15, 2007 5:59 am Post subject: |
|
|
I use this shell script to fetch the latest KMZ:
(the sleep is 150 since I've changed my current version to update every 5 minutes but can be varied). There are a number of improvements, but it works to capture the logs remotely.
| Code: |
#!/bin/sh
while true; do
curl -s http://xxxxxxxx.dyndns.org:8081 >getgps.out
for i in `cat getgps.out | grep 0\*kmz | sed -e "s/^.*z>//g" -e "s/<.*$//g"`; do
if [ ! -s $i ] ; then
echo Get $i
curl http://xxxxxxxx.dyndns.org:8081/$i >$i
fi
done
sleep 150
done
|
|
|
| Back to top |
|
 |
irmagic EVDO Fledgling
Joined: 20 May 2007 Posts: 12 Location: Palm Harbor Florida
|
Posted: Sun May 20, 2007 2:47 pm Post subject: TZ1 question about file build up on port 8081 gps10e |
|
|
Looking at web port 8081 the files are building up in the /var/tmp/xfer dir do I have to do anything with these or will they auto delete. I am running gps10e and I am new to this. Also I did find out turning off the wireless lan stoped alot of my lock up reboot problems. Now it stays locked to the cell provider with no problems. Otherwise it use to lock and unlock as I was driving around town with the cell provider. Was unable to find any posts on the subject with wireless lan and the file build up question. The software works great.
Thank You
Mike |
|
| Back to top |
|
 |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
Posted: Sun May 20, 2007 10:39 pm Post subject: |
|
|
They (KMZ files) don't autodelete, but it shouldn't fill up for several days. I'll add a delete feature later.
You can download the KMZs and display them using google earth (or google maps).
Or got to port 8888/x.html to see a canned page with google maps, or 8888/x.kmz (the ending is what matters) to get a live update you can use the refresh function in google earth with this as a network link.
If you have more specific questions, or something you want to do, just ask. |
|
| Back to top |
|
 |
irmagic EVDO Fledgling
Joined: 20 May 2007 Posts: 12 Location: Palm Harbor Florida
|
Posted: Mon May 21, 2007 9:25 am Post subject: TZ1 question on kmz files |
|
|
TZ is there any files I could edit to turn off the KMZ files from being created. I like the thought of in the future auto delete say 12 hours it starts deleting oldest file fist every 10 minutes to keep up with new files added. I am testing to see how long the router will stay up. I run it out of memoy in just a little over 24 hours. Sorry for the public questions but being new this is the only way I can ask.
Thanks
Mike |
|
| Back to top |
|
 |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
Posted: Mon May 21, 2007 11:58 am Post subject: |
|
|
The PM button at the bottom of any post or response is "private messaging", which is higher priority and doesn't require the public forum.
I will see what I can do about limiting the number and/or size of KMZs.
The problem is it is using a ramdisk out of the same memory as everything else, and although there is a lot of it, it isn't infinite.
Manually, you can simply "telnet 192.168.0.1", then change directory ("cd /var/tmp/xfer") and then remove the files ("rm *.kmz").
I'm still adding features, and I warned it was a beta. I should have something new in a few days (I've added OBD logging in mine). |
|
| Back to top |
|
 |
irmagic EVDO Fledgling
Joined: 20 May 2007 Posts: 12 Location: Palm Harbor Florida
|
Posted: Thu May 24, 2007 9:58 am Post subject: TZ question on your OBD interface |
|
|
TZ how are you doing the OBD loging ? . Do you have a serial port device. Also I must have 10 post's before I can PM some one being new.
Thanks
Mike |
|
| Back to top |
|
 |
tz1 EVDO Junkie
Joined: 29 Sep 2005 Posts: 434 Location: http://kr1gps.dyndns.org:8888/
|
Posted: Thu May 24, 2007 10:55 am Post subject: |
|
|
The OBD stuff works - I'm using a special version of the OBDPros device
http://obdpros.com/
Which can wake up in monitor mode. I requested this firmware change, and it is there in an interim beta version, but I don't know about the release. Firmware can't be upgraded in the field, so you need to ask for it (or will have to order a new chip with the feature).
This goes into one of the Overstock.com ttyACM USB serial ports I've mentioned in various posts.
I'm interspersing the OBD (actually the live raw bus data) as XML comments in the KML file, e.g.
| Code: |
<!--( 48 29 10 02 11 7A 25 )-->
<!--( 28 1B 10 02 10 60 F5 )-->
<!--( 68 FF 61 03 E1 )-->
-93.250073,44.138968,35.082 <!--,268.640,359.100,31,20.600,-->
<!--( 28 1B 10 02 10 74 4C )-->
<!--( 48 29 10 02 11 04 DA )-->
<!--( 48 DA 40 39 00 70 )-->
<!--( 68 88 10 03 44 )-->
<!--( 28 1B 10 02 10 24 92 )-->
<!--( C8 88 10 0E BA )-->
<!--( 68 FF 10 03 86 )-->
<!--( C8 89 61 03 D3 )-->
<!--( E8 89 61 0E 18 )-->
<!--( 48 29 10 02 10 AF F8 )-->
<!--( A8 3B 10 03 00 00 )-->
<!--( 28 1B 10 02 10 4C EE )-->
-93.250110,44.138965,33.620 <!--,268.700,359.300,31,20.800,-->
<!--( 28 1B 10 02 10 BC 91 )-->
<!--( 48 29 10 02 10 52 06 )-->
<!--( A8 83 61 12 D4 75 )-->
<!--( 28 1B 10 02 11 24 DE )-->
<!--( 48 29 10 02 0F E4 33 )-->
<!--( 28 1B 10 02 11 78 9C )-->
-93.250146,44.138963,32.435 <!--,268.870,359.500,31,21.000,-->
<!--( 48 DA 40 39 02 4A )-->
<!--( 28 1B 10 02 11 78 9C )-->
|
In my public idisk folder I put up a post processed version that shows by color what gear I'm in by color:
http://homepage.mac.com/tz1/.Public/gear.kmz
And from a slightly later version of the software:
 |
|
| Back to top |
|
 |
linuxkidd EVDO Fledgling
Joined: 27 May 2007 Posts: 16 Location: Hampton Roads, VA
|
Posted: Sun May 27, 2007 8:45 pm Post subject: Friend server comms |
|
|
I'm very eager to try this... My Serial -> bluetooth adapter is on it's way..
I'm wondering if you'd be interested in adding "Friend Server" support.. If you check in the GPSDrive software for Linux ( available at gpsdrive.de/download.shtml ), You'll find there's a Friend server included. The purpose is so that you and your friends with GPSDrive send location / speed / heading data to a central server... Each person in turn then receives each others position and it gets plotted on the display of GPSDrive.
I've modified a version of the Friend server to output this data to a flat text file, and then made a GoogleMaps API based tracking page on my server.
I'm certain that the protocol format wouldn't be tough to figure out. I'll try to get some info on the protocol shortly ( either by packet capture, or examining the GPSDrive code ).
I'm working on getting a MIPS cross compiling environment setup on one of my boxes and hope to be able to contribute to this development.. I just purchased my KR1 and this project was absolutely the deciding factor between this and the Linksys router.
Thanks for the great project so far!
LK
**Edit: I almost forgot to mention.. I can also provide more hosting of the images / code. I have a full SVN server setup and would be happy to donate these services. _________________ KR1/Sprint S620 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
 Sprint Rev A USB: Compass 597
 Sprint Rev A ExpressCard: Merlin EX720
 Purchase an V740 Rev A ExpressCard
 Sprint U727
 CTR350 Router
 CradlePoint PHS300
 Purchase a MBR1000
 Purchase an EVDO Booster Antenna
 Purchase a LinkSys 3GV2 Router
 Purchase an EVDO Amplifier
 Your Mac EVDO Experts
|