LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   GPS Hardware/Software Recommendations (http://www.linuxquestions.org/questions/linux-hardware-18/gps-hardware-software-recommendations-825626/)

DebianUser 08-11-2010 03:19 PM

GPS Hardware/Software Recommendations
 
I'm looking at getting a USB GPS receiver for my (currently) headless Debian box and would like to know which ones people would recommend

BU-353?
Gisteq gr-110?

etc etc. I'd also like know which software is recommended, I don't need advanced maps, maybe simple logging or text output onto an lcd. Obviously the software needs to be CLI based.

thanks

tlowk 08-11-2010 03:34 PM

most gps devices use a protocol called nmea
http://en.wikipedia.org/wiki/NMEA_0183

the usb types will probably use serial over usb.

You could try to parse the nmea format, but there exist a deamon that
does the interpretation for you
http://gpsd.berlios.de/

than you need a client for this deamon, you could use the software that comes with this daemon. Or you could write your own client via the libgps.

I think with C or C++ it could be down. but you can find also a binding for ruby http://rubyforge.org/projects/rbgps/

mjolnir 08-12-2010 06:53 AM

I use a Earthmate GPS BT-20 with Ubuntu 10.04 with good results. As for logging etc. see my post here: http://www.linuxquestions.org/questi...nd-awk-820677/

I have since updated to Meerkat and this:

Code:

cat /dev/ttyUSB4 | grep --line-buffered  GPRMC > earth.nmea
continues to work for me. Write the file and drop into GoogleEarth to show position.

tredegar 08-12-2010 11:25 AM

BU-353 works fine. Be sure to start gpsd with the -b option though: gpsd -b /dev/ttyUSB0

For logging software (it also draws you a nice map if you'd like it), I use tangogps which is brilliant on my little Asus eee running ububtu10.04

DebianUser 08-13-2010 02:18 AM

Excellent, thanks for the info guys, I think i'll go for the BU-353 which seems to be around the 30 mark unless anyone knows of anywhere cheaper?.

mjolnir I like the simplicity of your logging can this be done with any gps device or only the Earthmate?

tredegar is it possible for tangogps to store the map on a HDD rather than output it on a screen as i'm only going to have small HD44780 based LCD.

tredegar 08-13-2010 03:06 AM

On debian, you'll need to:
Code:

apt-get install gpsd gpsd-clients
dpkg-reconfigure gpsd

It is important that you do this before you first plug in your BU353. Make sure gpsd is always run with the -b option (otherwise you can brick the BU353, and you'll need win to reset it and get it working again :(

tangogps needs X so it won't work with your LCD character display, but if you just want to log your traces, you can do this from the command line with gpspipe:

Code:

gpspipe -r  > logfile.nmea

DebianUser 08-13-2010 05:37 AM

ok i'm convinced, i've ordered the BU-353. Do you know of any software that will create a map so I can view online or download?

mjolnir 08-13-2010 06:04 AM

I only have experience with the BT-20 but newer devices can output both nmea and sirf data. This appears to be the case with the BU-353. I agree with tredegar that Tangogps is a nice program. In the examples I gave in the other thread change the .txt extension to .nmea, save the file and later you can just drop it into Google Earth on another box to render your tracks.

DebianUser 08-15-2010 04:41 AM

Quote:

Originally Posted by tredegar (Post 4064938)
On debian, you'll need to:
Code:

apt-get install gpsd gpsd-clients
dpkg-reconfigure gpsd

It is important that you do this before you first plug in your BU353. Make sure gpsd is always run with the -b option (otherwise you can brick the BU353, and you'll need win to reset it and get it working again :(

tangogps needs X so it won't work with your LCD character display, but if you just want to log your traces, you can do this from the command line with gpsread:

Code:

gpsread -r  > logfile.nmea

I've got my BU-353 and installed as above and run

gpsd -b /dev/ttyUSB0

nobody 2292 1 0 10:38 ? 00:00:00 gpsd -b /dev/ttyUSB0

is gpsread it's own package or is it part of tangogps as I can't find any references to it?

tredegar 08-15-2010 11:15 AM

Quote:

Originally Posted by DebianUser (Post 4065033)
Do you know of any software that will create a map so I can view online or download?

See my post, and the rest of this thread
Quote:

is gpsread it's own package or is it part of tangogps as I can't find any references to it?
My mistake, it's gpspipe which is part of gpsd-clients
Code:

gpspipe -r  > logfile.nmea

DebianUser 08-15-2010 11:28 AM

Quote:

Originally Posted by tredegar (Post 4066914)
My mistake, it's gpspipe which is part of gpsd-clients
Code:

gpspipe -r  > logfile.nmea

OK tried that while red light is flashing and all it's currently got in the file is

GPSD,R=1

oh and just noticed
Code:

kernel: [42974832.140000] ttyUSB0: 1 input overrun(s)
kernel: [42974836.890000] ttyUSB0: 3 input overrun(s)
kernel: [42974841.890000] ttyUSB0: 3 input overrun(s)
kernel: [42974846.890000] ttyUSB0: 4 input overrun(s)
kernel: [42974851.910000] ttyUSB0: 3 input overrun(s)
kernel: [42974856.910000] ttyUSB0: 3 input overrun(s)

lsusb
Code:

067b:2303 Prolific Technology, Inc. PL2303 Serial Port
lsusb -v -d 067b:2303
Code:

Bus 003 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        64
  idVendor          0x067b Prolific Technology, Inc.
  idProduct          0x2303 PL2303 Serial Port
  bcdDevice            3.00
  iManufacturer          1 Prolific Technology Inc.
  iProduct                2 USB-Serial Controller
  iSerial                0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          39
    bNumInterfaces          1
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          3
      bInterfaceClass      255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x000a  1x 10 bytes
        bInterval              1
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0040  1x 64 bytes
        bInterval              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0040  1x 64 bytes
        bInterval              0
Device Status:    0x0000
  (Bus Powered)


tredegar 08-15-2010 12:20 PM

I just plugged mine in. (So no fix yet).
Instead of redirecting the data to a file, I just send it to the terminal:

Code:

gpspipe -r
My first line is the same as yours, the rest are (poor) GPS data until it "warms up".

Quote:

oh and just noticed
Code:

kernel: [42974832.140000] ttyUSB0: 1 input overrun(s)
Might mean data is not being read from the tty device. I don't know.

Quote:

lsusb
067b:2303 Prolific Technology, Inc. PL2303 Serial Port
That just tells you the GPS device is connected with a serial -> USB chip called a PL2303. It is a very common chip, and tells you nothing about the GPS device behind it. Gpsd determines this by probing the serial port, and guessing (usually correctly!).

Same goes for the output of lsusb -v -d 067b:2303

Maybe you have connected gpsd to the wrong tty?
So it is running (with the correct first line GPSD,R=1 ) but then no data to output.

Check with ls /dev/ttyUS*
Only one device (your GPS device) should be visible, and gpsd needs to be using that one. If necessary, kill gpsd and restart it ( with the -b flag ), pointing it to the correct tty. Do not replug your GPS device while you do this, or it may change again.

DebianUser 08-15-2010 12:24 PM

Running gpsd in debug mode shows
Code:

gpsd: launching (Version 2.37)
gpsd: listening on port gpsd
gpsd: shmat(0,0,0) succeeded
gpsd: shmat(0,0,0) succeeded
gpsd: shmat(0,0,0) succeeded
gpsd: shmat(0,0,0) succeeded
gpsd: successfully connected to the DBUS system bus
gpsd: running with effective group ID 0
gpsd: running with effective user ID 0
gpsd: opening read-only GPS data source at '/dev/ttyUSB0'
gpsd: speed 115200, 8N1
gpsd: garmin_gps not active.
gpsd: no probe matched...
gpsd: gpsd_activate(1): opened GPS (5)
gpsd: packet sniff finds type -1
gpsd: packet sniff finds type -1
gpsd: packet sniff finds type -1
gpsd: packet sniff finds type -1
[SNIP]
gpsd: speed 4800, 8N1         
gpsd: packet sniff finds type -1
gpsd: packet sniff finds type -1
gpsd: packet sniff finds type -1
gpsd: packet sniff finds type -1
[SNIP]
gpsd: packet sniffer failed to sync up
gpsd: closing GPS=/dev/ttyUSB0 (5)

ls /dev/ttyUS*
/dev/ttyUSB0

Also found this further back in dmesg
Code:

[42949814.020000] ------------[ cut here ]------------
[42949814.030000] WARNING: at drivers/usb/serial/usb-serial.c:307 serial_write+0x74/0xac [usbserial]()
[42949814.040000] Modules linked in: pl2303 usbserial ipv6 ext2 evdev rt3070sta ixp4xx_eth ixp4xx_npe firmware_class ixp4xx_qmgr ixp4xx_beeper ohci_hcd ext3 jbd mbcache sd_mod ehci_hcd usb_storage usbcore scsi_mod
[42949814.060000] [<c0029da8>] (dump_stack+0x0/0x14) from [<c003e614>] (warn_on_slowpath+0x4c/0x84)
[42949814.060000] [<c003e5c8>] (warn_on_slowpath+0x0/0x84) from [<bf1a3568>] (serial_write+0x74/0xac [usbserial])
[42949814.070000]  r6:c1c27e5f r5:00000001 r4:c1c71c00
[42949814.080000] [<bf1a34f4>] (serial_write+0x0/0xac [usbserial]) from [<c015341c>] (tty_put_char+0x40/0x48)
[42949814.090000]  r6:c1c4a400 r5:000000e0 r4:c1c4a400
[42949814.090000] [<c01533dc>] (tty_put_char+0x0/0x48) from [<c015784c>] (opost+0x184/0x1b0)
[42949814.100000] [<c01576c8>] (opost+0x0/0x1b0) from [<c01578e0>] (echo_char+0x68/0x70)
[42949814.110000]  r5:c1c4a400 r4:000000e0
[42949814.110000] [<c0157878>] (echo_char+0x0/0x70) from [<c0158d88>] (n_tty_receive_buf+0xb88/0xe08)
[42949814.120000]  r5:c1f20800 r4:000000e0
[42949814.130000] [<c0158200>] (n_tty_receive_buf+0x0/0xe08) from [<c0154d70>] (flush_to_ldisc+0xdc/0x174)
[42949814.140000] [<c0154c94>] (flush_to_ldisc+0x0/0x174) from [<c004ea1c>] (run_workqueue+0xbc/0x150)
[42949814.150000]  r8:00000000 r7:00000000 r6:c0154c94 r5:c1c26000 r4:c1c01940
[42949814.150000] [<c004e960>] (run_workqueue+0x0/0x150) from [<c004f4d0>] (worker_thread+0xa8/0xbc)
[42949814.160000]  r6:c004f428 r5:c1c01940 r4:c1c01948
[42949814.170000] [<c004f428>] (worker_thread+0x0/0xbc) from [<c005253c>] (kthread+0x5c/0x94)
[42949814.180000]  r5:c1c01940 r4:c1c26000
[42949814.180000] [<c00524e0>] (kthread+0x0/0x94) from [<c0041958>] (do_exit+0x0/0x694)
[42949814.190000]  r6:00000000 r5:00000000 r4:00000000
[42949814.190000] ---[ end trace 7f76156b484ffa55 ]---



All times are GMT -5. The time now is 11:27 AM.