diff -Nru pi-bluetooth-0.1.15ubuntu1/debian/changelog pi-bluetooth-0.1.15ubuntu1~20.10.1/debian/changelog --- pi-bluetooth-0.1.15ubuntu1/debian/changelog 2020-10-14 19:29:19.000000000 -0500 +++ pi-bluetooth-0.1.15ubuntu1~20.10.1/debian/changelog 2021-04-26 09:40:19.000000000 -0500 @@ -1,3 +1,7 @@ +pi-bluetooth (0.1.15ubuntu1~20.10.1) groovy; urgency=medium + + * Merged upstream fixes for CM4 and Pi 400 (LP: #1921915) + pi-bluetooth (0.1.15ubuntu1) groovy; urgency=medium * Merged new upstream version (LP: #1897920) diff -Nru pi-bluetooth-0.1.15ubuntu1/debian/pi-bluetooth.bthelper@.service pi-bluetooth-0.1.15ubuntu1~20.10.1/debian/pi-bluetooth.bthelper@.service --- pi-bluetooth-0.1.15ubuntu1/debian/pi-bluetooth.bthelper@.service 2018-08-20 11:01:22.000000000 -0500 +++ pi-bluetooth-0.1.15ubuntu1~20.10.1/debian/pi-bluetooth.bthelper@.service 2021-03-30 09:34:52.000000000 -0500 @@ -4,5 +4,6 @@ After=bluetooth.service [Service] -Type=simple +Type=oneshot ExecStart=/usr/bin/bthelper %I +RemainAfterExit=yes diff -Nru pi-bluetooth-0.1.15ubuntu1/usr/bin/bthelper pi-bluetooth-0.1.15ubuntu1~20.10.1/usr/bin/bthelper --- pi-bluetooth-0.1.15ubuntu1/usr/bin/bthelper 2020-08-19 09:33:51.000000000 -0500 +++ pi-bluetooth-0.1.15ubuntu1~20.10.1/usr/bin/bthelper 2021-03-30 09:34:52.000000000 -0500 @@ -18,9 +18,7 @@ exit 0 fi -if ( /usr/bin/hcitool -i $dev dev | grep -q -E '\s(B8:27:EB:|DC:A6:32:)' ); then - echo Raspberry Pi BDADDR already set -else +if ( /usr/bin/hcitool -i $dev dev | grep -q -E '\s43:4[35]:' ); then SERIAL=`cat /proc/device-tree/serial-number | cut -c9-` B1=`echo $SERIAL | cut -c3-4` B2=`echo $SERIAL | cut -c5-6` @@ -29,6 +27,8 @@ /usr/bin/hcitool -i $dev cmd 0x3f 0x001 $BDADDR /bin/hciconfig $dev reset +else + echo Raspberry Pi BDADDR already set fi # Force reinitialisation to allow extra features such as Secure Simple Pairing diff -Nru pi-bluetooth-0.1.15ubuntu1/usr/bin/btuart pi-bluetooth-0.1.15ubuntu1~20.10.1/usr/bin/btuart --- pi-bluetooth-0.1.15ubuntu1/usr/bin/btuart 2020-07-29 02:42:59.000000000 -0500 +++ pi-bluetooth-0.1.15ubuntu1~20.10.1/usr/bin/btuart 2021-03-30 09:34:52.000000000 -0500 @@ -1,7 +1,7 @@ #!/bin/sh HCIATTACH=/usr/bin/hciattach -if grep -q "Pi 4" /proc/device-tree/model; then +if grep -q "raspberrypi,4" /proc/device-tree/compatible; then BDADDR= else SERIAL=`cat /proc/device-tree/serial-number | cut -c9-` @@ -11,8 +11,8 @@ BDADDR=`printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa))` fi -if [ -e /sys/class/bluetooth/hci0 ]; then - # Bluetooth is already enabled +if ( /usr/bin/hcitool dev | grep -q -E '\s(B8:27:EB:|DC:A6:32:)' ); then + # On-board bluetooth is already enabled exit 0 fi