rjcollingridge wrote:Failed miserably to get the Bluenext GPS dongle working under Linux
My OP dealt with getting the Bluenext working on a VirtualBox install under OS X. When I came to installing it on the Pi I followed the same steps and came unstuck - I found that someone else had written up their exerience, so copied the following steps (apologies, I have lost the original link so don't know who the author is, but thanks to him anyway!) - the main difference is that the device uses the folder ttyUSB0 instead of GPS0 when connected to the Pi. I have had mine connected and running for extended periods - 5 to 7 hours on each of the last few days:
I use Ubuntu 11.04 and wanted to finally figure out how to use my DeLorme Earthmate GPS LT-20 USB GPS dongle I bought some time ago mainly because it was inexpensive and bundled with obsolete Windows mapping software. I installed gpsd (Linux GPS daemon), gpsd-clients (axillary tools and clients for gpsd), and foxtroggps (a GPS mapping client that uses gpsd) using Synaptic.
I plugged in the USB GPS device after rebooting. I used the terminal and I entered “dmesg | tail” which told me that the USB dongle I just plugged in was a serial device called /dev/ttyUSB0 and was recognized by Linux. (Please note that ttyUSB0 is case sensitive.) I then used the gspd-clients tool by typing "gpsmon /dev/ttyUSB0" in the terminal. This talks directly to the GPS device without gpsd and it returned GPS data telling me that my connected dongle is reading GPS data, speaks “generic NMEA”, and talks at 115200 Baud.
I then used the Linux “process status” command in the terminal "ps -C gpsd - fww" which returned data and told me that gpsd daemon was working. I then used the gspd-clients GPS program or client called xgps in the terminal by typing xgps. This is a useful test client that uses the gpsd server and which returns a map of satellites, coordinates, and information about the GPS fix. This program needs the gpsd server to talk to the GPS unit but no data came up to display. Therefore, both the gpsd daemon and USB dongle were working but programs weren't talking through gpsd to USB dongle.
Lots of Googling and reading led me to find that the gpsd server daemon only needed to be configured. However, I would have figured it out easier if I had read the comments at the top of the gpsd configuration file /etc/default/gpsd. I used "sudo dpkg-reconfigure gpsd" to reconfigure gpsd which modifies the configuration file. It took a lot of time to find this simple trick and even the syntax wasn't easy to get right.
The “dpkg-reconfigure gpsd” is a terminal configuration tool program that walks you through configuring gpsd. It listens for your GPS and identifies the port of the GPS unit as /dev/ttyUSB0. It asks you if you want to accept this port and you say “YES”. Also say YES to both start gpsd automatically (start gpsd at boot) and handle attached USB GPS receivers automatically (autostart
“DEVICES”). Leave the other options or arguments blank as they are not needed. You need unplug the GPS dongle and reboot.
After rebooting, plug in the GPS dongle and it will autostart. Bingo, it works. I brought up xgps tool client again and it returned gps data from the GPS dongle
unit meaning that gpsd was now talking to the GPS dongle. I then brought up
you through configuring gpsd. It listens for your GPS and identifies the port of the GPS unit as /dev/ttyUSB0. It asks you if you want to accept this port and you say “YES”. Also say YES to both start gpsd automatically (start gpsd at boot) and handle attached USB GPS receivers automatically (autostart “DEVICES”). Leave the other options or arguments blank as they are not
needed. You need unplug the GPS dongle and reboot.
After rebooting, plug in the GPS dongle and it will autostart. Bingo, it works. I brought up xgps tool client again and it returned gps data from the GPS dongle unit meaning that gpsd was now talking to the GPS dongle. I then brought up the FoxtrotGPS client and it worked also. My GPS dongle needs to have a fix before the maping clients show a GPS connect so don't get spooked and think it is not working. Watch what is happening with the gpsd tool xgps and be sure you have a fix. The GPS can get a fix in seconds but it can also take many minutes and you need a good view of the sky.
If you plug the GPS dongle in after it has rebooted it autostarts. If you unplug the GPS dongle there is an obligatory 15 minute time out for security reasons before it will re-start. My GPS dongle also starts with it plugged in at boot if you use the -N argument but this defeats some security precautions so I did not ultimately use it.
I studied the functionality of my DeLorme GPS unit by trial and error. My unit has an LED which can be red, yellow, or green. As it is turning on it is briefly red continuously. Then it starts to flash a short red every 2 seconds as it initializes. When it changes to flashing a long red every second it is ready for a GPS client to attempt to connect through gpsd. When it flashes a long flash yellow every second it means that it has a 2 D fix and a long flash of green every second it means it has 3 D fix. Other GPS units will have a variation on this theme.