Skip to content

Commit 8079cea

Browse files
committed
fix(bluetooth): include it if Appearance matches the value assigned for keyboard
Following the Bluetooth spec [1], Assigned Numbers Document, Rev. 2023-05-04, Section 2.6.3, Appearance Sub-category, the Appearance value defined for keyboards is 0x03C1. This value must be checked to include the bluetooth module in hostonly mode, because some Bluetooth keyboards do not set the Class attribute. [1] https://www.bluetooth.com/specifications/assigned-numbers/
1 parent 0ecb038 commit 8079cea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules.d/62bluetooth/module-setup.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ check() {
1111
# Warn user if a Peripheral (0x500) is found of minor class:
1212
# * Keyboard (0x40)
1313
# * Keyboard/pointing (0xC0)
14-
grep -qiE 'Class=0x[0-9a-f]{3}5[4c]0' /var/lib/bluetooth/*/*/info 2> /dev/null \
14+
# and if Appearance is set to the value defined for keyboard (0x03C1)
15+
grep -qiE -e 'Class=0x[0-9a-f]{3}5[4c]0' -e 'Appearance=0x03c1' /var/lib/bluetooth/*/*/info 2> /dev/null \
1516
&& dwarn "If you need to use bluetooth, please include it explicitly."
1617
fi
1718

0 commit comments

Comments
 (0)