PTY in openplotter v2.0 KPLEX

61 views
Skip to first unread message

Eric D

unread,
Nov 26, 2020, 5:48:15 AM11/26/20
to kplex
hello all,

i have a problem with kplex include in openplotter v2.0 on my raspi4
i have manualy encode a PTY serveur in kplex.conf :

###Manual settings

[pty]
name=rend_voiles
mode=master
direction=out
filename=/tmp/virtcom
baud=4800
ofilter=~WIMWV/5:~GPRMC/5:-all

impossible to create the /tmp/virtcom file even after a reboot system.

this worked correctly with openplotter v1.0 on my raspi3+

Somebody have a solution ?
thanks in advance

Keith Young

unread,
Dec 4, 2020, 11:35:02 AM12/4/20
to kplex
Are there any messages in /var/log/syslog which might indicate why it's failing?
Are you saying that it's failing on boot and then it fails again when you try to start it after boot?
If yes, the second time you run it, does /tmp/virtcom already exist?

Eric D

unread,
Dec 5, 2020, 10:03:37 AM12/5/20
to kplex
hi keith

this an extract of the syslog file:

Dec  5 15:21:10 raspberrypi systemd[1]: Starting NMEA 0183 Multiplexer...
Dec  5 15:21:10 raspberrypi kplex[25891]: No Inputs!
Dec  5 15:21:10 raspberrypi systemd[1]: Started NMEA 0183 Multiplexer.
Dec  5 15:21:10 raspberrypi systemd[1]: openplotter-kplex.service: Succeeded.
Dec  5 15:21:18 raspberrypi systemd[1]: Starting NMEA 0183 Multiplexer...
Dec  5 15:21:18 raspberrypi kplex[25921]: No Inputs!
Dec  5 15:21:18 raspberrypi systemd[1]: openplotter-kplex.service: Succeeded.
Dec  5 15:21:18 raspberrypi systemd[1]: Started NMEA 0183 Multiplexer.

I don't understand "no inputs!" i have a gps receiver plud on USB.

At the init of openplotter, at the power up of the raspi4, no /tmp/virtcom pty file creation.
when i open openplotter kplex, and I click on "restart" , it's the same : nothing.
when I click on "diagnostic" after select an input, I can see the /tmp/virtcom file.
If I do the same manipulation without plugging gps receiver, the /tmp/virtcom file appear just a few seconde (I think it's normal : no input)

when i see in /usr/lib/python3/dist-packages/openplotterKplex/openplotterKplex.py :
the only line with 
                              subprocess.Popen(['kplex', '-f', self.home + '/.debugkplex.conf'])
is in
                             def OnShowButton (self, event):

is this a first track of investigation ???

what do you think about that ?

Keith Young

unread,
Dec 5, 2020, 2:10:26 PM12/5/20
to kplex
I don't understand "no inputs!" i have a gps receiver plud on USB.

At the init of openplotter, at the power up of the raspi4, no /tmp/virtcom pty file creation.
when i open openplotter kplex, and I click on "restart" , it's the same : nothing.
when I click on "diagnostic" after select an input, I can see the /tmp/virtcom file.
If I do the same manipulation without plugging gps receiver, the /tmp/virtcom file appear just a few seconde (I think it's normal : no input)

 The python message and the point and click user interface are part of openplotter rather than kplex (sorry).  "No inputs" could be a more verbose message but it only happens in one situation: there are no bidirectional or input interfaces configured.  What is the complete contents of kplex.conf?  I'm wondering whether maybe the GPS is marked as "optional" but failing, perhaps because the device raspery pi OS uses for it has changed between 1.0 and 2.0.  So it doesn't die when gps initialisation fails but does when it realises it has no inputs.  Sorry for not being more familiar with openplotter.  This doesn't look like a failure to configure the pty, more like a failure to configure the GPS

Eric D

unread,
Dec 8, 2020, 1:19:24 PM12/8/20
to kplex

hi keith,

ok I understand.
perhaps, it's a pb of initialisation input interface, especially since all the assets (gpas, radio and wind sensors) have never been connected to this raspi.
I have to do that but infortunatly my boat is not near my home today !!
just FYI, the kplex.conf :

# For advanced manual configuration, please visit: http://www.stripydog.com/kplex/configuration.html
# Please do not modify defaults nor OpenPlotter GUI settings.
# Add manual settings at the end of the document.

###defaults

[udp]
name=system
direction=in
port=10110

[tcp]
name=signalk
direction=out
mode=server
port=30330

###end of defaults

###OpenPlotter GUI settings

[serial]
name=naza
direction=in
optional=yes
filename=/dev/ttyOP_naza
baud=4800

#[serial]
#name=gps
#direction=in
#optional=yes
#filename=/dev/ttyOP_gps
#baud=4800

[serial]
name=radio
direction=in
optional=yes
filename=/dev/ttyOP_radio
baud=38400

#[serial]
#name=std1000
#direction=out
#optional=yes
#filename=/dev/ttyOP_std1000
#baud=4800
#ofilter=+EC***:-all

###end of OpenPlotter GUI settings


###Manual settings

[pty]
name=rend_voiles
mode=master
direction=out
filename=/tmp/virtcom
baud=4800
#ofilter=~WIMWV/5:~GPRMC/5:-all
[pty]
name=Enr_rend
mode=master
direction=out
filename=/tmp/virtcom1
baud=4800
#ofilter=~WIMWV/5:~GPRMC/5:-all
[pty]
name=opencpnin
mode=master
direction=out
filename=/tmp/virtcom2
baud=4800
[pty]
name=Push_Vent_Vrai
mode=master
direction=out
filename=/tmp/virtcom3
baud=4800
[pty]
name=opencpnout
mode=master
direction=in
filename=/tmp/virtcom10
baud=4800
[pty]
name=calculVentVrai
mode=master
direction=in
filename=/tmp/virtcom11
baud=4800
[pty]
name=rend_voiles_out
mode=master
direction=in
filename=/tmp/virtcom12
baud=4800
###end of Manual settings

Keith Young

unread,
Dec 9, 2020, 8:06:10 AM12/9/20
to kplex
Doh!

Really sorry.  I was trying to work out why the above config would fail with "No Inputs!": there's a non-optional udp input so if that failed, you'd get an error saying why and if it succeeded you wouldn't get "No Inputs".  So I was wondering if a different file was being used. Then I looked back at the  previous message is subprocess.Popen(['kplex', '-f', self.home + '/.debugkplex.conf']).  So I'd suggest...
1. Have a look in ~/.debugkplex.conf
2. Check which file is being used when you're not using that file (find the unit file systemd is using with "systemctl show -p FragmentPath kplex" and have a look at what command line is being invoked.  If there's no unit file path try looking in /etc/init.d/kplex
3. If kplex is *not* running ("pgrep kplex" should return nothing) try "ss -lu |grep 10110".  If you get output like: 

UNCONN   0        0                0.0.0.0:10110                  0.0.0.0:*

..it means that something else is running as a udp server on port 10110.  I believe openplotter has switched from using kplex by default to signal by default (but changeable back to kplex) in 2.0 so this could well be the source of your problems

Reply all
Reply to author
Forward
0 new messages