[conspire] USB GPS

Paul Zander paulz at ieee.org
Sat Sep 21 08:56:58 PDT 2013



I found the most important part of the solution. 
    edit /lib/udev/gpsd.hotplug

    Search for a line like:
    gpsdctl $ACTION $DEVNAME

    Just above that line, add this:
    chmod a+rw $DEVNAME



This addresses the "read-only" messages in the previous log. Now I can plug and unplug and re-plug (are those real words) the GPS and it is recognized each time.

There is still a loose end.   Sometimes after playing with GPS with my desk top computer, gpsd still hangs when shutting down the system.  

I have found that `pkill gpsd`  or `killall gpsd` usually does kill gpsd.  Sometimes it leaves a defunct process, and when that happens I use the AC power switch to shutdown.  However, now that I have GPS working on the portable unit, I haven't had much incentive to pursue the this.

-Paul



________________________________
From: Paul Zander <paulz at ieee.org>
To: "conspire at linuxmafia.com" <conspire at linuxmafia.com> 
Sent: Thursday, September 12, 2013 12:09 AM
Subject: Re: [conspire] USB GPS



I've made a little progress.   My suspicion is that some low-level bit of SW is getting wedged.  


If the GPS is plugged in, and the computer is powering USB, even when the computer is "off", the GPS will try to get a fix.  When the PC is booted up, all is well.  But using GPS on a PC connected to AC power is not too useful.  My intent is to use it with a lap top that can run off of batteries.  So there is "some" interaction with the GPS powering on the PC recognizing it.  


I can reproduce the problem rather often by unplugging and plugging the GPS after the PC is up. 


The following is from /var/log/syslog:

#unplug GPS

Sep 11 23:57:40 pz01 kernel: [ 1748.849152] usb 4-4: USB disconnect, device number 3
Sep 11 23:57:40 pz01 kernel: [ 1748.849849] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
Sep 11 23:57:40 pz01 kernel: [ 1748.849867] pl2303 4-4:1.0: device disconnected
Sep 11 23:57:40 pz01 gpsd.hotplug: remove /dev/ttyUSB0
Sep 11 23:57:40 pz01 gpsdctl: gpsd_control(action=remove, arg=/dev/ttyUSB0)
Sep 11 23:57:40 pz01 gpsdctl: reached a running gpsd
Sep 11 23:57:52 pz01 kernel: [ 1761.656117] usb 4-4: new full-speed USB device number 4 using ohci_hcd
Sep 11 23:57:53 pz01 kernel: [ 1761.868637] usb 4-4: New USB device found, idVendor=067b, idProduct=2303
Sep 11 23:57:53 pz01 kernel: [ 1761.868645] usb 4-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Sep 11 23:57:53 pz01 kernel: [ 1761.868651] usb 4-4: Product: USB-Serial Controller D
Sep 11
23:57:53 pz01 kernel: [ 1761.868656] usb 4-4: Manufacturer: Prolific Technology Inc. 
Sep 11 23:57:53 pz01 kernel: [ 1761.871630] pl2303 4-4:1.0: pl2303 converter detected
Sep 11 23:57:53 pz01 kernel: [ 1761.904576] usb 4-4: pl2303 converter now attached to ttyUSB1
Sep 11 23:57:53 pz01 mtp-probe: checking bus 4, device 4: "/sys/devices/pci0000:00/0000:00:04.0/usb4/4-4"
Sep 11 23:57:53 pz01 mtp-probe: bus: 4, device: 4 was not an MTP device
Sep 11 23:57:53 pz01 gpsd.hotplug: add /dev/ttyUSB1
Sep 11 23:57:53 pz01 gpsdctl: gpsd_control(action=add, arg=/dev/ttyUSB1)
Sep 11 23:57:53 pz01 gpsdctl: reached a running gpsd

# plug in GPS  This time the gpspipe isn't presenting data.
Sep 11 23:58:01 pz01 gpsd[2726]: gpsd:ERROR: device open failed: No such file or directory - retrying read-only
Sep 11 23:58:01 pz01 gpsd[2726]: gpsd:ERROR: read-only device open failed: No such file or directory
Sep 11 23:58:01 pz01 gpsd[2726]: gpsd:ERROR: /dev/gps0: device activation failed.
Sep 11 23:58:01 pz01 gpsd[2726]: gpsd:SHOUT: vendor/product match with 091e:0003 not found
Sep 11 23:58:03 pz01 gpsd[2726]: gpsd:ERROR: device open failed: No such file or directory - retrying read-only
Sep 11 23:58:03 pz01 gpsd[2726]: gpsd:ERROR: read-only device open failed: No such file or directory
Sep 11 23:58:03 pz01 gpsd[2726]: gpsd:ERROR: /dev/gps0: device activation failed.

#unplug gps
Sep 12 00:06:12 pz01 kernel: [ 2261.548704] usb 4-4: USB disconnect, device number 4





________________________________
From: Paul Zander <paulz at ieee.org>
To: "conspire at linuxmafia.com" <conspire at linuxmafia.com> 
Sent: Monday, September 9, 2013 11:18 PM
Subject: [conspire] USB GPS




I recently got a USB-GPS receiver which is not working as well as I had hoped.
Model BU-353.  Sold by assorted dealers on e-Bay and Amazon.  Certainly is the most widely sold.

>apt-get install gpsd 
gpsd-clients FoxtrotGPS QLandkarte 

>ls /dev  
 # showed gps device:  /dev/gps0

>dpkq-reconfigure gpsd
 # Used defaults for all settings, except to enter device: /dev/gps0

>gpspipe -r  
 #  returned 0's for several minutes then after getting a fix, it returned data.

FoxtrotGPS 
 # opened and put a big circle on my street on the map. So far everything went well. 


After several days of using foxtrotGPS and Qlandkarte, I found that the GPS is inconsistent. The first symptom is the mapping SW is not responding. There are several possible scenarios:

When the GPS status LED is on steady, it indicates no fix, it is reasonable that the mapping SW has nothing to work with.

The condition I can't understand is when gpspipe is not returning anything, not even data of 0.  Frequently this the beginning of further problems. The computer might stop
responding to mouse clicks.  Try to re-boot and the PC hangs during the shutdown.  The only work-around is to use the power supply switch. 

_______________________________________________
conspire mailing list
conspire at linuxmafia.com
http://linuxmafia.com/mailman/listinfo/conspire



_______________________________________________
conspire mailing list
conspire at linuxmafia.com
http://linuxmafia.com/mailman/listinfo/conspire




More information about the conspire mailing list