I'm trying to establish a connection with a gauge, which connects to a PC via usb-serial interface. I managed to do this in Windows 8 via vendor proprietary program, which uses Prolific driver version 3.2.0. In windows I monitored data exchanged between the gauge and the software with a help a of a software "HDD Software Device Monitoring Studio".
Now I want to repeat data exchange I have seen in HDD Software Device Monitoring Studio but this time in the Debian Gnu/Linux without vendor's properietary program for the gauge. To do this in Debian I installed a software "jpnevultor version 2.1.3" which seems to fit my needs, because it is able to write and read data to a serial port.
After installing this program I plugged the gauge to the PC running Debian and issued dmesg|tail
command, int the output there was a line usb-3-1: pl2303 converter now attached to ttyUSB0
so I assummed that pl2303 driver installed on the Debian and successfully identified the gauge and I can access it.
To test if I can send data to the gauge via /dev/ttyUSB0
file I created a text file named hello
with the following content
FF 3A 32 34 31 3B 30 3B 30 3B 36 35 34 30 35 0D
this is a byte sequence that I monitored via HDD Software Device Monitoring Studio any time I started data exchange with a gauge via vendor proprietary program.
Now I am trying to feed this byte sequence to a gauge. First of all in Debian I executed following command jpnevulator --tty /dev/ttyUSB0 --read
. It put terminal to a pending state, so I am assumming that program is waiting for a data comming from the ttyUSB0
.
After then I opened second terminal window and excecute following command jpnevulator --tty /dev/ttyUSB0 -f hello --write
to write data from the mentioned file hello
with the byte sequence to the /dev/ttyUSB0.
Write command executed normally. But when I switched back to the first terminal window to see if there are bytes that came from the gauge I found that there none like if I didn't send any data to the /dev/ttyUSB0/
.
I tried to issue following commands: modprobe -r pl2303; modprobe pl2303
and repeating mentioned write and read commands with no results. I tried setting /dev/ttyUSB0 speed to 9600 via command stty -F /dev/ttyUSB0 ispeed 9600
because , tried to change permissions of /dev/ttyUSB0 to 777 and ran all mentioned command under a root account, but the result were the same - read command didn't return any data. Could you please help me to find out why this is happenning and how can I properly write and read data to /dev/ttyUSB0?