|
From: | Steve Franks |
Subject: | Re: [gpsd-users] gpsd wont open pipe |
Date: | Mon, 23 May 2016 14:56:14 -0700 |
Ah. Thanks.
So now with:address@hidden:~/linux/ZenSchedule# gpsd -G -N -n -b -D8 -S20357 /tmp/.Zonge
/ZenHardwareGpsdUart.fifo
I get permissions problems reading from the fifo (see below), but cat will still dump the fifo to stdout with no permissions complaints....Is this because gpsd runs as nobody? What is the correct way to handle this? My fifo should be readable by all:
prw-rw-r-- 1 root root 0 May 23 20:20 /tmp/.Zonge/ZenHardwareGpsdUart.fifo
Thanks,
Steve
gpsd:INFO: launching (Version 3.10)
gpsd:IO: opening IPv4 socket
gpsd:SPIN: passivesock_af() -> 3
gpsd:IO: opening IPv6 socket
gpsd:SPIN: passivesock_af() -> 4
gpsd:INFO: listening on port 20357
gpsd:PROG: NTPD shmat(262148,0,0) succeeded, segment 0
gpsd:PROG: NTPD shmat(294917,0,0) succeeded, segment 1
gpsd:PROG: NTPD shmat(327686,0,0) succeeded, segment 2
gpsd:PROG: NTPD shmat(360455,0,0) succeeded, segment 3
gpsd:PROG: shmat() succeeded, segment 393224
gpsd:PROG: shared-segment creation succeeded,
gpsd:INFO: stashing device /tmp/.Zonge/ZenHardwareGpsdUart.fifo at slot 0
gpsd:INFO: opening read-only GPS data source type 0 and at '/tmp/.Zonge/ZenHardwareGpsdUart.fifo'
gpsd:ERROR: /tmp/.Zonge/ZenHardwareGpsdUart.fifo already opened by another process
gpsd:ERROR: initial GPS device /tmp/.Zonge/ZenHardwareGpsdUart.fifo open failed
gpsd:INFO: running with effective group ID 20
gpsd:INFO: running with effective user ID 65534
gpsd:INFO: startup at 2016-05-23T21:10:46.000Z (1464037846)
gpsd:SPIN: select() {3 4} -> { 3 } at 1464037847.033208 (errno 0)
gpsd:SPIN: client 192.168.222.180 (0) connect on fd 5
gpsd:CLIENT: => client(0): {"class":"VERSION","release":"3.10","rev":"3.10","proto_major":3,"proto_minor":9}\x0d\x0a
gpsd:INFO: reconnection attempt on device 0
gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook
gpsd:INFO: opening read-only GPS data source type 0 and at '/tmp/.Zonge/ZenHardwareGpsdUart.fifo'
gpsd:ERROR: device open failed: Permission denied - retrying read-only
gpsd:ERROR: read-only device open failed: Permission denied
gpsd:ERROR: /tmp/.Zonge/ZenHardwareGpsdUart.fifo: device activation failed.
gpsd:SPIN: select() {3 4 5} -> { 5 } at 1464037847.036977 (errno 0)
gpsd:PROG: checking client(0)
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"json":true};\x0a
json: json_read_object() sees '{"enable":true,"json":true};
'
json: Target address for class (offset 0) is (nil)
json: Target address for enable (offset 0) is 0x3f600
json: Target address for scaled (offset 0) is 0x3f608
json: Target address for timing (offset 0) is 0x3f609
json: Target address for split24 (offset 0) is 0x3f60a
json: Target address for pps (offset 0) is 0x3f60b
json: Target address for device (offset 0) is 0x3f610
json: Target address for remote (offset 0) is 0x40610
json: JSON parse of '{"enable":true,"json":true};
' begins.
json: State init , looking at '{' (0x7e993a5b)
json: State await_attr , looking at '"' (0x7e993a5c)
json: State in_attr , looking at 'e' (0x7e993a5d)
json: State in_attr , looking at 'n' (0x7e993a5e)
json: State in_attr , looking at 'a' (0x7e993a5f)
json: State in_attr , looking at 'b' (0x7e993a60)
json: State in_attr , looking at 'l' (0x7e993a61)
json: State in_attr , looking at 'e' (0x7e993a62)
json: State in_attr , looking at '"' (0x7e993a63)
json: Collected attribute name enable
json: Checking against class
json: Checking against enable
json: State await_value , looking at ':' (0x7e993a64)
json: State await_value , looking at 't' (0x7e993a65)
json: State in_val_token , looking at 'r' (0x7e993a66)
json: State in_val_token , looking at 'u' (0x7e993a67)
json: State in_val_token , looking at 'e' (0x7e993a68)
json: State in_val_token , looking at ',' (0x7e993a69)
json: Collected token value true.
json: State post_val , looking at ',' (0x7e993a69)
json: Target address for enable (offset 0) is 0x3f600
json: State await_attr , looking at '"' (0x7e993a6a)
json: State in_attr , looking at 'j' (0x7e993a6b)
json: State in_attr , looking at 's' (0x7e993a6c)
json: State in_attr , looking at 'o' (0x7e993a6d)
json: State in_attr , looking at 'n' (0x7e993a6e)
json: State in_attr , looking at '"' (0x7e993a6f)
json: Collected attribute name json
json: Checking against class
json: Checking against enable
json: Checking against json
json: State await_value , looking at ':' (0x7e993a70)
json: State await_value , looking at 't' (0x7e993a71)
json: State in_val_token , looking at 'r' (0x7e993a72)
json: State in_val_token , looking at 'u' (0x7e993a73)
json: State in_val_token , looking at 'e' (0x7e993a74)
json: State in_val_token , looking at '}' (0x7e993a75)
json: Collected token value true.
json: State post_val , looking at '}' (0x7e993a75)
json: Target address for json (offset 0) is 0x3f601
json: JSON parse ends.
gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook
gpsd:INFO: opening read-only GPS data source type 0 and at '/tmp/.Zonge/ZenHardwareGpsdUart.fifo'
gpsd:ERROR: device open failed: Permission denied - retrying read-only
gpsd:ERROR: read-only device open failed: Permission denied
gpsd:ERROR: /tmp/.Zonge/ZenHardwareGpsdUart.fifo: device activation failed.
gpsd:CLIENT: => client(0): {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/tmp/.Zonge/ZenHardwareGpsdUart.fifo"}]}\x0d\x0a{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}\x0d\x0a
On Mon, May 23, 2016 at 10:33 AM, Mike <address@hidden> wrote:On 05/23/2016 12:42 PM, Steve Franks wrote:
Hi yall, (I think this bounced the first time I sent it sorry if not)Regards!
I'm trying to get gpsd to read from a pipe instead of a file or tty.
I have a printf in my program that fills the pipe telling the user when the reader has opened the pipe.
This works just fine if I:
cat /tmp/.Zonge/ZenHardwareGpsdUart.fifo
I get the message that the pipe was opened in my program, and cat begins hemmoraging gps data all over my terminal.
If I do:
gpsd -N -b -D8 -S20357 /tmp/.Zonge/ZenHardwareGpsdUart.fifo
I never get the message that the pipe was opened; all I get from gpsd is:
gpsd:INFO: launching (Version 3.10)And it just hangs there forever. Is there a trick to this??
gpsd:IO: opening IPv4 socket
gpsd:SPIN: passivesock_af() -> 3
gpsd:IO: opening IPv6 socket
gpsd:SPIN: passivesock_af() -> 4
gpsd:INFO: listening on port 20357
gpsd:PROG: NTPD shmat(262148,0,0) succeeded, segment 0
gpsd:PROG: NTPD shmat(294917,0,0) succeeded, segment 1
gpsd:PROG: NTPD shmat(327686,0,0) succeeded, segment 2
gpsd:PROG: NTPD shmat(360455,0,0) succeeded, segment 3
gpsd:PROG: shmat() succeeded, segment 393224
gpsd:PROG: shared-segment creation succeeded,
gpsd:INFO: stashing device /tmp/.Zonge/ZenHardwareGpsdUart.fifo at slot 0
gpsd:INFO: running with effective group ID 20
gpsd:INFO: running with effective user ID 65534
gpsd:INFO: startup at 2016-05-17T18:48:57.000Z (1463510937)
I believe that you need a "-n" on your command line also. The daemon is waiting for a client connection...
Mike
[Prev in Thread] | Current Thread | [Next in Thread] |