gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] gps setup fails


From: Eugene B Imes
Subject: Re: [gpsd-users] gps setup fails
Date: Wed, 24 Aug 2016 16:06:26 -0500

On Mon, 2016-08-22 at 11:46 -0700, Gary E. Miller wrote:
> Yo Eugene!
> 

Ok, somehow got of of the list so I am replying to the first reply but
answering you latest questions.

System: Dell xps 13 laptop
OS: linux
Dist: gentoo unstable
Kernel: 4.7.1
gpsd: gpsd-3.16
flags used to compile gpsd: X bluetooth cxx dbus ipv6 ncurses python
qt4 shm sockets udev usb 
gps protocols: garmin garmintxt gpsclock nmea0183 ublox
gps protocols available but not compiled into gpsd: -aivdm -ashtech
-earthmate -evermore -fury -fv18 -geostar -itrax -mtk3301 -navcom
-nmea2000 -ntrip -oceanserver -oncore -passthrough -rtcm104v2
-rtcm104v3 -sirf -superstar2 -tnt -tripmate -tsip
gpsd compiled to use python-2.7.x

My problem is this:
I have installed gpsd. When I try to get the receiver to work by
plugging in into a usb port this is what I get:

Aug 24 14:36:11 go kernel: usb 1-1: new full-speed USB device number 45
using xhci_hcd
Aug 24 14:36:11 go kernel: usb 1-1: New USB device found,
idVendor=1546, idProduct=01a7
Aug 24 14:36:11 go kernel: usb 1-1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Aug 24 14:36:11 go kernel: usb 1-1: Product: u-blox 7 - GPS/GNSS
Receiver
Aug 24 14:36:11 go kernel: usb 1-1: Manufacturer: u-blox AG - www.u-blo
x.com
Aug 24 14:36:11 go kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Aug 24 14:36:11 go mtp-probe[27364]: checking bus 1, device 45:
"/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1"
Aug 24 14:36:11 go mtp-probe[27364]: bus: 1, device: 45 was not an MTP
device
Aug 24 14:36:11 go gpsd.hotplug[27370]: add /dev/ttyACM0
Aug 24 14:36:11 go gpsdctl[27372]: gpsd_control(action=add,
arg=/dev/ttyACM0)
Aug 24 14:36:11 go gpsdctl[27372]: launching gpsd -D 9 -F
/var/run/gpsd.sock
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: launching (Version 3.16)
Aug 24 14:36:11 go gpsd[27374]: gpsd:IO: opening IPv4 socket
Aug 24 14:36:11 go gpsd[27374]: gpsd:SPIN: passivesock_af() -> 5
Aug 24 14:36:11 go gpsd[27374]: gpsd:IO: opening IPv6 socket
Aug 24 14:36:11 go gpsd[27374]: gpsd:SPIN: passivesock_af() -> 6
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: listening on port 2947
Aug 24 14:36:11 go gpsd[27374]: gpsd:PROG: successfully connected to
the DBUS system bus
Aug 24 14:36:11 go gpsd[27374]: gpsd:PROG: shmget(0x47505344, 8936,
0666) for SHM export succeeded
Aug 24 14:36:11 go gpsd[27374]: gpsd:PROG: shmat() for SHM export
succeeded, segment 0
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: running with effective group
ID 14
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: running with effective user
ID 119
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: startup at 2016-08-
24T19:36:11.000Z (1472067371)
Aug 24 14:36:11 go gpsd[27374]: gpsd:SPIN: select() {3 5 6} -> { 3 } at
1472067371.972654 (errno 0)
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: control socket connect on fd
9
Aug 24 14:36:11 go gpsd[27374]: gpsd:CLIENT: <= control(9):
+/dev/ttyACM0\x0d\x0a
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: <= control(9): adding
/dev/ttyACM0
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: stashing device /dev/ttyACM0
at slot 0
Aug 24 14:36:11 go gpsd[27374]: gpsd:SPIN: close(9) of control socket


The product is: 

Aug 24 14:36:11 go kernel: usb 1-1: Product: u-blox 7 - GPS/GNSS
Receiver

The 'cdc_adm' kernel module takes control of the device and assigns
/dev/ttyACM0 to it:

Aug 24 14:36:11 go kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
...
(
the fact that I called the device node to different things was a typo
i.e. the the device node is ttyACM0 not ttyAMA0)


gpsd.hotplug adds the device to something but I don't know what:

Aug 24 14:36:11 go gpsd.hotplug[27370]: add /dev/ttyACM0

gpsd is started with this command:

launching gpsd -D 9 -F /var/run/gpsd.sock -- (the -D 9 is mine to see for 
debugging).

/var/run/gpsd.sock is given fd 9 (file descriptor 9?).

In any case a few lines down the '(9)' is closed and gpsd is no longer running:

Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: control socket connect on fd 9
Aug 24 14:36:11 go gpsd[27374]: gpsd:CLIENT: <= control(9): 
+/dev/ttyACM0\x0d\x0a
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: <= control(9): adding /dev/ttyACM0
Aug 24 14:36:11 go gpsd[27374]: gpsd:INFO: stashing device /dev/ttyACM0 at slot 0
Aug 24 14:36:11 go gpsd[27374]: gpsd:SPIN: close(9) of control socket

If the receiver is removed the log shows:

ug 24 14:59:55 go kernel: usb 1-1: USB disconnect, device number 45
Aug 24 14:59:55 go gpsd.hotplug[27460]: remove /dev/ttyACM0
Aug 24 14:59:55 go gpsdctl[27462]: gpsd_control(action=remove,
arg=/dev/ttyACM0)
Aug 24 14:59:55 go gpsdctl[27462]: can't reach gpsd

So try to start manually:

/usr/sbin/gpsd -F /var/run/gpsd.sock /dev/ttyACM0

At that point start cgps which seems to be running normally and
receiving sentences from the gps device.

Don't get any response from 'cat /dev/ttyACM0'. I suspect you are
correct Gary what ever is preventing that is the root of the problem.
However I don't know the solution to that; if I did then I wouldn't
ask.

Perhaps I got the term 'hotplug' wrong. But I don't think so: the file
/lib64/udev/rules/25-gpsd.rules calls /lib/udev/gpsd.hotplug which is
inlcluded with the 3.16 package. For that matter so is gpsd.rules. All
part of systemd which is use by many distributions.

I know all the parts work separately and they all work together when
started manually but not when start by udev.

Anyway thanks for any help,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]