I am trying to get my raspberry pi to connect to an RS232 port to add the data received to a database. After quite a bit of pain actually getting the USB port to work correctly (it seems the driver doesn't work in latest raspberry pi os) I am now trying to get a loopback to work in node red. I have tried this with both my USB serial port (ttyUSB0) and the included serial port on the raspberry pi (ttyAMA0).
I have connected the correct pins together on the rs232 plug and I have connected gpio pins 8 and 10 together. In node red I am send a simple string payload to the serial in node but am getting nothing back from the receive node.
In the console I see that the serial ports are correctly opened by node red:
19 Jun 11:20:12 - [info] [serialconfig:d94a50c03d0c040f] serial port /dev/ttyUSB0 opened at 57600 baud 8N1 19 Jun 11:20:12 - [info] [serialconfig:493cbee11e72cc59] serial port /dev/ttyAMA0 opened at 57600 baud 8N1
the baud is what is returned when I run this:
pi@raspberrypi:~ $ stty -F /dev/ttyAMA0 speed 57600 baud; line = 15; min = 1; time = 0; -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
I'm a bit lost now and it seems to me (if my understanding of how this works is correct but it might not be) that I should be getting whatever I send into the serial out node back from the serial in node.
Any help much appreciated!