Skip to content

Commit

Permalink
fix UART for Pi5, too
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Storm <markus.storm@gmx.net>
  • Loading branch information
mstormi committed Apr 8, 2024
1 parent c3b6477 commit e86ba87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/system.bash
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ prepare_serial_port() {
fi

if [[ $selection == *"2"* ]]; then
if is_pithree || is_pithreeplus || is_pifour; then
if is_pithree || is_pithreeplus || is_pifour || is_pifive; then
echo -n "$(timestamp) [openHABian] Making Bluetooth use mini-UART... "
if ! grep -qsE "^[[:space:]]*dtoverlay=(pi3-)?miniuart-bt" "${CONFIGTXT}"; then
if (echo "dtoverlay=miniuart-bt" >> "${CONFIGTXT}"); then echo "OK (reboot required)"; else echo "FAILED"; return 1; fi
Expand All @@ -594,7 +594,7 @@ prepare_serial_port() {
return 0
fi
else
if is_pithree || is_pithreeplus || is_pifour && grep -qsE "^[[:space:]]*dtoverlay=(pi3-)?miniuart-bt" "${CONFIGTXT}"; then
if is_pithree || is_pithreeplus || is_pifour || is_pifive && grep -qsE "^[[:space:]]*dtoverlay=(pi3-)?miniuart-bt" "${CONFIGTXT}"; then
echo -n "$(timestamp) [openHABian] Making Bluetooth use UART... "
if cond_redirect sed -i -E '/^[[:space:]]*dtoverlay=(pi3-)?miniuart-bt/d' "${CONFIGTXT}"; then echo "OK (reboot required)"; else echo "FAILED"; return 1; fi
fi
Expand Down

0 comments on commit e86ba87

Please sign in to comment.