0

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|tailcommand, int the output there was a line usb-3-1: pl2303 converter now attached to ttyUSB0so 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?

nwnebel
  • 33
  • 4
  • I don't know the jpnevulator software, but with a quick search I'm able to find the man. Have you try to use the `--base=16` option ? the sequence you provide is an hexadecimal sequence. The sequence seems to be full of ascii char `:241;0;0;65405` you didn't have the specification of the API? – DavidP Jul 27 '18 at 10:32
  • hello, my version of jpnevulator is 2.1.3 it has not thas option according to the manual. I tried to input mentioned characters from the keyboard using jpnevulator manual says that they are treated as hex numbers that way but no results. I don't have specification of the gauge API. – nwnebel Jul 27 '18 at 12:06
  • You should show your code and show exactly where the error occurs. – jww Jul 27 '18 at 19:20
  • there is actually no code, beacause I'm using jpnevulator and all commands I used are presented in the question – nwnebel Jul 28 '18 at 09:13
  • to be sure, you ca write a really short program to send the command and listen for return. whithout the spec API, you cannot be sure to not miss any "subscription" message or something else. – DavidP Jul 29 '18 at 12:46
  • I tried to write this program https://stackoverflow.com/questions/51570195/porting-windows-serial-program-to-linux but also with no luck – nwnebel Jul 29 '18 at 19:32

0 Answers0