I'm trying to establish a serial communication between my Raspberry PI 3 B+ - running on Raspbian 10 Buster - and a testing machine I have. The normal behavior of the machine is to send test related data via serial as soon as a test is finished.
I managed to establish the communication in Windows 10 through PuttY using a USB to Serial adapter and it worked fine. However, with the Raspberry I didn't manage to make the communication work.
The setup is as follows: the USB end of the adapter is connected to one of the Raspberry's USB slots, and the RS232 end is connected to my machine. In the Raspberry's side, the USB was given the /dev/ttyUSB0 device name. Here is the output of dmesg | tail
:
[ 2702.802083] usb 1-1.1.3: new full-speed USB device number 6 using dwc_otg
[ 2702.934357] usb 1-1.1.3: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 4.00
[ 2702.934373] usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2702.934383] usb 1-1.1.3: Product: USB-Serial Controller D
[ 2702.934393] usb 1-1.1.3: Manufacturer: Prolific Technology Inc.
[ 2702.935304] pl2303 1-1.1.3:1.0: pl2303 converter detected
[ 2702.939720] usb 1-1.1.3: pl2303 converter now attached to ttyUSB0
I already tried using screen
and minicom
, and setting them up with 9600 8N1
, but they just hang after establishing the connection. The ttyUSB0 is configured as shown bellow:
pi@raspberrypi:~ $ stty -F /dev/ttyUSB0
speed 9600 baud; line = 0;
min = 100; time = 2;
-icrnl -imaxbel
-opost -onlcr
-isig -icanon -echo
After doing a bit of research, i found that I could try doing cat -v < /dev/ttyUSB0
in one terminal emulator, then opening another one and entering echo "hello\r" > /dev/ttyUSB0
; this didn't give me anything in the cat terminal, though. Could it be that - because one end of the cable is connected to the Raspberry and the other to the machine - I cannot communicate with myself locally?
Could anyone help me? I'm really stuck here.