I am running kPlex on a Raspberry Pi with Jessie. Generally it works well with NMEA data but has a problem on reboot described below.
The serial connection to the NMEA device is via a USB to serial (RS232) adapter connected to an RS232 to RS485 converter. The USB to serial is a Targus PA088.
I suspect the problem is to do with how the Raspberry Pi defines the USB to serial adapter on boot up.
It works fine if I start the Raspberry Pi with no incoming serial (NMEA) data on the interface.
If I do an lsusb command I get the following. Note the first device is a serial port. There is a /dev/ttyUSB0 which I have set in kplex.conf. kPlex works as it should.
No incoming serial data
lsusb
Bus 001 Device 005: ID 0711:0230 Magic Control Technology Corp. MCT-232 Serial Port
Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
If I reboot the Raspberry Pi with an incoming serial (NMEA) stream on the interface the Raspberry Pi decides the USB device is a mouse and the kPlex system then does not work.
If I do an lsusb command I get the following. Note the first line only is given here:
Incoming serial data
lsusb
Bus 001 Device 005: ID 0711:0231 Magic Control Technology Corp. PS/2 Mouse Port
Note the different productid = 0231 to above (=0230).
In this state there is no /dev/ttyUSB0 present.Hence kPlex does not work.
I think I need to somehow lock down this USB to serial adapter to be a serial port under all conditions. How do I do this?