Hi,
I have been trying to connect a RevPI Core S to a machine that data over rs232 to catch this data i want to connect the machine using a rs232 to usb and then by using Python & pyserial read and process the data. I have verified that /dev/ttyUSB0 exists and i have configured pyserial with the same settings as the machine (baud rate, parity etc.)
However this is where im having problems im not getting any data in /dev/ttyUSB0 and im having trouble figuring out what to do or if i have missed anything.
Hardware:
RevPI Core s
1P3FFCB-USB-SERIAL (Serial to usb converter)
Mystery machine that sends data over serial
Thanks in advance for any help,
// Victor
RevPi Core S - Problems reading USB port Serial data
-
- Posts: 1
- Joined: 12 Sep 2024, 08:19
Re: RevPi Core S - Problems reading USB port Serial data
Hey Victor, I have created a test setup and hope it shows how easy you can transfer serial data:
1. Start miniterm
2. Set local echo on
3. Monitor Pin 2 of D-SUB-9 plug - Pin 5 is GND
4. Type something into miniterm
Here is the result: I have also used a USB-FTDI converter so it is the same driver as you use, I think. I must admit that I used a beta RevPi Bookworm OS image on my device:
Some ideas for your troubleshooting:
1. Start miniterm
Code: Select all
python3 -m serial.tools.miniterm /dev/ttyUSB0
Code: Select all
[STRG] + T, [STRG] + E
Here is the result: I have also used a USB-FTDI converter so it is the same driver as you use, I think. I must admit that I used a beta RevPi Bookworm OS image on my device:
Code: Select all
pi@RevPi39627:~$ uname -a
Linux RevPi39627 6.6.0-revpi2-rpi-v8 #1+deb12+1 SMP PREEMPT_RT Thu Aug 29 07:50:23 UTC 2024 aarch64 GNU/Linux
- Use an oscilloscope or a logic analyzer to monitor the data lines
- How about the edges of the rectangle signals?
- How about echoes?
- Maybe you need to use terminating resistors - yes I did not use them, but this was just a quick test with short cables