Skip to content

Commit

Permalink
fix(bluetooth): include it if Appearance matches the value assigned f…
Browse files Browse the repository at this point in the history
…or 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/
  • Loading branch information
aafeijoo-suse committed Jun 26, 2023
1 parent 0ecb038 commit 8079cea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules.d/62bluetooth/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ check() {
# Warn user if a Peripheral (0x500) is found of minor class:
# * Keyboard (0x40)
# * Keyboard/pointing (0xC0)
grep -qiE 'Class=0x[0-9a-f]{3}5[4c]0' /var/lib/bluetooth/*/*/info 2> /dev/null \
# and if Appearance is set to the value defined for keyboard (0x03C1)
grep -qiE -e 'Class=0x[0-9a-f]{3}5[4c]0' -e 'Appearance=0x03c1' /var/lib/bluetooth/*/*/info 2> /dev/null \
&& dwarn "If you need to use bluetooth, please include it explicitly."
fi

Expand Down

0 comments on commit 8079cea

Please sign in to comment.