- Platform information:
- Hardware: CPUArchitecture/RAM/storage Pi 4B 4Gb
- OS: Buster
- Java Runtime Environment: which java platform is used and what version
- openHAB version: 2.5.0
- Issue of the topic: getting serial port /dev/ttyAMA0 to work
- Please post configurations (if applicable):
- Items configuration related to the issue
- Sitemap configuration related to the issue
- Rules code related to the issue
- Services configuration related to the issue
- If logs where generated please post these here using code fences:
Anyone have any experience getting ttyAMA0 working on a Pi 4B? I installed latest openhabian (Buster variant) and did the openhab2-config routine to allow the serial port but could never get ttyAMA0 to communicate. Interestingly, the Pi 4B has 4 additional serial ports, ttyAMA1-4 onboard, so I was able to get ttyAMA1 to work, but I would like to figure out why ttyAMA0 does not work, as it does with a similarly configured Pi 3B.
These are the relevant lines from my /boot/config.txt
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
dtoverlay=uart2
dtoverlay=uart3
dtoverlay=uart4
dtoverlay=uart5
[all]
#dtoverlay=vc4-fkms-v3d
gpu_mem=16
enable_uart=1
And /boot/cmdline.txt:
dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=43732170-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
And /etc/default/openhab2:
EXTRA_JAVA_OPTS="-Xms250m -Xmx350m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0:/dev/ttyAMA1:/dev/ttyAMA2:/dev/ttyAMA3:/dev/ttyAMA4"
Thanks,