Different parameters needed for KPLEX with RS485

16 views
Skip to first unread message

Andre Perry

unread,
Jun 10, 2020, 12:21:18 PM6/10/20
to kplex
We are developing a radar system and one of its external interfaces is to receive AIS contacts across a serial interface. While developing the system we have been using linux servers with a USB to RS232/DB9 cable to connect 2 servers. The USB end is plugged into the Linux server that is running our AIS simulator and sending the AIS contacts. The DB9 end is connected to the receive server on which we are using Kplex to receive the serial AIS contacts and send them out to the network. We are using this command to do that:
kplex -d 9 file:direction=in,filename=/dev/ttyS0 udp:direction=out,port=5003,address=10.170.40.2

That configuration has been working for us with no issues.

When we started testing on our tactical servers, those servers use a usb to RS485/DB9 cable to receive that AIS data. Since the receive end in this case is using a USB dongle we use the same kplex command but change ttyS0 to ttyUSB0.  When we run kplex on the tactical servers kplex does not appear to receive any data. I have standalone serial test tool called Serial Com Tester that we can use to verify that we are receiving data across the ttyUSB0 but kplex does not seem to be able to see that data.
Are there additional configuration parameters I need to provide to get kplex to see this data across the RS485 interface?

Keith Young

unread,
Jun 13, 2020, 4:22:50 PM6/13/20
to kplex
There's nothing special needed to differentiate between serial protocols in kplex.  rs422 should work but I've not really thought about 485 and there's certainly nothing in kplex to switch between full and half duplex so short answer: 485 might be problematic if the drivers don't default to what you want.  This is definitely something I'd look at fixing if necessary but before I ask you what device/drivers we're talking about here let me clarify what the set up is.  Do I understand correctly that you have?
Are you saying the new servers have an rs485 interface and the usb end of the adapter is into the AIS source, or that you're somehow interfacing the AIS source's usb->rs232 with this new adapter?

Either way...
* Does the messages file tell you that the serial device is being successfully opened?
* If you cat the serial device, do you get any data out? Does it look like nmea 0183 or is it garbled?
* If you have an rs485 device on your new servers, what's its default baud rate?

For serial devices you should be using serial: rather than file:.  This will do stuff like allowing you to set baud rate, turning off hardware flow control etc.  You probably got away with it before because your serial to usb adapter and hardware serial interfaces were defaulting to 9600 and you don't have too much AIS data.
Reply all
Reply to author
Forward
0 new messages