Hi
I'm trying to read the serial output of this instrument:
http://www.c2o.pro.br/automacao/figuras/MultiLine_P4.jpg
When I use an RS232 <-> USB adapter:
usb 1-1.2: new full-speed USB device number 7 using dwc_otg
usb 1-1.2: New USB device found, idVendor=1a86, idProduct=7523
usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
ch341 1-1.2:1.0: ch341-uart converter detected
usb 1-1.2: ch341-uart converter now attached to ttyUSB0
And configure the Tcl:
set serial_port /dev/ttyUSB0
set serial_ID [open $serial_port r+]
fconfigure $serial_ID -mode 9600,n,8,1 -buffering none
I get strange characters:
b ߗwzÙÛ'7÷W‡C°° ° °° °
ïÌG°° ° °TóÙ6vÍÃፏ‘
“°0Ì ÷ w §7g ° Ì33
×× °° ° °2³¿µ°øxÄ
b חwzÙÛ77÷W‡C°° °° ° °o
ÌǠ° ° °ÖóÙ6vÍÃፏ
But if I change the adapter:
usb 1-1.3: new full-speed USB device number 8 using dwc_otg
usb 1-1.3: New USB device found, idVendor=067b, idProduct=2303
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.3: Product: USB-Serial Controller D
usb 1-1.3: Manufacturer: Prolific Technology Inc.
pl2303 1-1.3:1.0: pl2303 converter detected
usb 1-1.3: pl2303 converter now attached to ttyUSB0
And I use the same script:
set serial_port /dev/ttyUSB0
set serial_ID [open $serial_port r+]
fconfigure $serial_ID -mode 9600,n,8,1 -buffering none
I receive correct messages from the instrument:
01.01.16 01:51
183 mV 23.6 øC
199 æS/cm 23.6 øC
nLF Tref25
But I see driver error messages with the dmesg command:
pl2303 ttyUSB0: pl2303_get_line_request - failed: -32
pl2303 ttyUSB0: error sending break = -32
pl2303 ttyUSB0: pl2303_get_line_request - failed: -32
pl2303 ttyUSB0: error sending break = -32
And when I close and reopen the serial channel I get a lot of messages stored in the buffer. I can not empty the buffer with the command close $serial_ID command
With the first adapter I don't see driver error messages but I can't decode the characters.
And with the second adapter I get the characters correctly but with driver error messages and I stop receiving the characters after about 1h of reading.
Any suggestion?
Thanks,
Markos