Subject: Issues Connecting RS232 Port to OpenHAB on Raspberry Pi
I’ve encountered some challenges while attempting to connect an RS232 port to my OpenHAB setup on a Raspberry Pi, and I’m hopeful that someone here can provide guidance.
Hardware Details:
- Raspberry Pi (OpenHABian):
- Release: Raspbian GNU/Linux 11 (bullseye)
- Kernel: Linux 6.1.21-v7+
- Platform: Raspberry Pi 3 Model B Rev 1.2
- OpenHAB version: 4.02
- Linux version: openhabian 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l
- Rego 6xx heat pump controller
- RS232 Board: Manufacturer - Renkforce, Model - RF-4011279
Steps I’ve Undertaken:
- I’ve identified the serial port using
dmesg | grep tty
, which showed/dev/ttyS0
and/dev/ttyAMA0
. - Tried to connect to both
/dev/ttyS0
and/dev/ttyAMA0
in OpenHAB. For/dev/ttyAMA0
, I received “Serial port does not exist”, and for/dev/ttyS0
, I initially got a connection but subsequently encountered an error: “Inappropriate ioctl for device in nativeavailable”. - Added
openhab
user todialout
andtty
groups. - Modified
boot/cmdline.txt
to prevent the Raspberry Pi from using the serial port for console logging. - Double-checked the connection between the add-on board/port and the RPI.
Despite these efforts, I continue to encounter error messages. An external RS232 to USB converter is an option I’m considering, but I would genuinely like to get the integrated port operational.
Additional Information:
- The Rego 6xx device operates at 19200 bps, 8 bits, no parity, 1 stop bit.
- A user review of my RS232 board mentioned that one must disable boot-time logging on the Raspberry Pi GPIO to function correctly.
Are there any known tweaks or adjustments that might help? Are there specific hardware components known to work better or worse with OpenHAB and Raspberry Pi? Would an RS232 to USB converter be a more reliable option to explore? Any assistance or advice would be highly appreciated!
Thank you in advance!