openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
818 stars 251 forks source link

Serial port '/dev/ttyACM0' could not be opened. #1798

Closed petero-dk closed 11 months ago

petero-dk commented 11 months ago

Issue information:

On a brand new openhabian install, v 1.8 I could not get the ACM0 serial port working on the primary UART on Raspberry pi.

I ran the openhabian serial configuration tool for razperry/knx and it set the available ports and enabled bluetooth mini uart overlay, however it did not work anyway.

Debug information:

KNX binding gave the following error

KNX exception (KNXException, Serial port '/dev/ttyACM0' could not be opened. Available ports are:

System information:

PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
aarch64

Solution

The openhabian config tool did not change the /boot/cmdline.txt file, so it still had the following info: console=serial0,115200, console=tty1

Removing that information from cmdline.txt freed up the serial port and KNX is now working.

mstormi commented 11 months ago

You need to use option 35 to prepare the serial port. Doing so should remove the console=... from cmdline.txt