Hi,
if this is a bug or a new feature might be a philosophical question as I could not find in any documentation how the character translation is setup in USB serial mode. On the other hand the physical RS232 connection is setup in raw mode. I would assume that most customers would expect the same from an USB serial device.
I could not find the source code of the (most probably proprietary) sodog daemon which is responsible for this situation. But I could find a workaround using the RTUs user script functionality which I would like to share for those who might run into the same situation. The code looks like this:
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
echo -e "#!/bin/sh\nwhile true; do\n stty -F /dev/ttyUSB0 raw > /dev/null 2>&1\n stty -F /dev/ttyUSB1 raw > /dev/null 2>&1\n stty -F /dev/ttyUSB2 raw > /dev/null 2>&1\n stty -F /dev/ttyUSB3 raw > /dev/null 2>&1\n stty -F /dev/ttyUSB4 raw > /dev/null 2>&1\n stty -F /dev/ttyUSB5 raw > /dev/null 2>&1\n sleep 10\ndone\n" > /tmp/usbSetter.sh
chmod 755 /tmp/usbSetter.sh
/tmp/usbSetter.sh &
exit 0
It will create on startup a shell script /tmp/usbSetter.sh and starts it as independent "daemon". This daemon will set every 10s every of the USB serial devices into raw mode (ignoring any errors). This works now flawless with any binary protocol running over USB serial.
This at least gives us a working solution for now. But I would really like to have this implemented into sodog. I understand that changing sodogs behaviour into raw mode might break something for other customers which might depend on the exisiting translation (e.g. if a real console is connected to it or an old school printer). I suggest making a forced raw mode as a checkbox available in the GUI, while leaving it unchecked as a default. In this way nothing changes on existing installations but at the same time allows one to use raw mode (as with RS232) whenever needed.
Any feedback is welcome.
Thank you.