OpenMarine
[CLOSED] SignalK device conflicts - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Bug Reports (https://forum.openmarine.net/forumdisplay.php?fid=4)
+--- Thread: [CLOSED] SignalK device conflicts (/showthread.php?tid=2864)



[CLOSED] SignalK device conflicts - glennmckibben106@gmail.com - 2020-08-20

I have loaded 5.2.0 on a Pi3.  I first added the gps.  Worked OK.  It is an old Delorme 4800 BAUD usb dongle.
Added Node Red, not tried using it yet, but it appears to be OK.
Added AIS with a SDR-RTL dongle.  Seems to work, but don't see any ships yet.  Maybe too far from the coast.
added Pypilot and got the conflict in SignalK that killed the gps.  Tried re-loading the gps, with same result.  On startup I get no warnings.
Any suggestions?


RE: SignalK device conflicts - glennmckibben106@gmail.com - 2020-08-20

forgot to mention, the NMEA usb output was removed to add the keyboard.  results are the same.


RE: SignalK device conflicts - glennmckibben106@gmail.com - 2020-08-20

SignalK is still outputting NMEA-0183 attitude data.  Data is zeros as there is no MMU installed.


RE: SignalK device conflicts - glennmckibben106@gmail.com - 2020-08-21

Got a feeling I need to use Kplex to solve this problem.  Going to learn more about it now.


RE: SignalK device conflicts - tkurki - 2020-08-21

Device or resource busy in SK means you have something else that has already opened the gps device. Try

lsof | grep tty

To see what processes have open tty devices.


RE: SignalK device conflicts - glennmckibben106@gmail.com - 2020-08-22

Here is the result:
grep tty
bash 785 pi 0u CHR 4,1 0t0 7186 /dev/tty1
bash 785 pi 1u CHR 4,1 0t0 7186 /dev/tty1
bash 785 pi 2u CHR 4,1 0t0 7186 /dev/tty1
bash 785 pi 255u CHR 4,1 0t0 7186 /dev/tty1
chromium- 1609 pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1697 llvmpipe- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1698 llvmpipe- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1699 llvmpipe- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1700 llvmpipe- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1701 chromium- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1702 chromium- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1703 chromium- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1704 chromium- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1717 GpuWatchd pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1718 ThreadPoo pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1719 ThreadPoo pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1720 Chrome_Ch pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1609 1721 VizCompos pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
pi@openplotter:~ $

The two listed devices on the serial config are the GPS on 0 and the NMEA 0183 output to the tiller pilot "Tillie" I wonder if the SDR dongle is confusing the system? It is connected to USB, but was not given a tty address. I need to read up and understand the differences between tty0 and tty1


RE: SignalK device conflicts - glennmckibben106@gmail.com - 2020-08-22

Killed Pypilot, got this:pi@openplotter:~ $ lsof | grep tty
node 393 pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 618 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 619 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 620 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 621 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 622 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 705 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 962 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 963 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 964 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 965 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 1332 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 1333 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 1334 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 1335 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
node 393 1336 node pi 46uW CHR 188,0 0t0 11096 /dev/ttyUSB0
bash 754 pi 0u CHR 4,1 0t0 7186 /dev/tty1
bash 754 pi 1u CHR 4,1 0t0 7186 /dev/tty1
bash 754 pi 2u CHR 4,1 0t0 7186 /dev/tty1
bash 754 pi 255u CHR 4,1 0t0 7186 /dev/tty1
chromium- 1461 pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1547 llvmpipe- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1548 llvmpipe- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1549 llvmpipe- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1550 llvmpipe- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1551 chromium- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1552 chromium- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1553 chromium- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1554 chromium- pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1555 GpuWatchd pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1557 ThreadPoo pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1558 ThreadPoo pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1559 Chrome_Ch pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
chromium- 1461 1560 VizCompos pi 11r REG 0,17 4096 8096 /sys/devices/virtual/tty/tty0/active
pi@openplotter:~ $

Had a parameter wrong in SDR, was UDP, changed to client, it works now. GPS is also working now.


RE: SignalK device conflicts - e-sailing - 2020-08-28

I think gpsd and SignalK are figthing for the same gps.
Gpsd is loaded with openplotter-pypilot or openplotter-kplex or openplotter-avnav.
If gpsd does grep the gps device it should not be added as a serial device in SignalK.
There is an example in SignalK working with gpsd. (https://github.com/SignalK/signalk-server/blob/master/settings/volare-gpsd-settings.json)

Gpsd is started as service. The service can be disabled. But it also can start with udev. I don't know how to disable this.
If you remove gpsd package it will remove pypilot and kplex.
We should think about removing gpsd from the dependency list of openplotter-xxxx there is no real dependence in kplex and it is no problem to install gpsd if anybody needs it.


RE: SignalK device conflicts - tkurki - 2020-08-31

If the idea is to make things simpler by having all datasources in Signal K having gpsd installed so that it can hijack serial ports is a really bad idea.

Several users have had this problem and I think we can assume for every person reporting problems here we can assume that others are bitten by this.

Pointers to gpsd udev rules installation script:

https://gitlab.com/gpsd/gpsd/-/blob/master/SConstruct#L2854-2857

Removing the rules file will disable the udev magic.

The rules are here https://gitlab.com/gpsd/gpsd/-/blob/master/gpsd.rules.in