summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-30 00:02:27 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-30 00:02:27 +0000
commit44a3e113419e6e1808a65ea4ef43b691fca42d49 (patch)
tree51501032d72840acd77737a70ab502e48cce8459
parentee7c0f6336cb8fda82ba51d0f4eb0274417816fd (diff)
parent2cb909a6798cae62415cefcc0d80f95176f27f78 (diff)
downloadcar-44a3e113419e6e1808a65ea4ef43b691fca42d49.tar.gz
Snap for 11157599 from 2cb909a6798cae62415cefcc0d80f95176f27f78 to 24Q1-release
Change-Id: I3c813a7017f6380af8dfcf9b7a4b0131db57bd2b
-rw-r--r--emulator/usbpt/bluetooth/bluetooth.prop38
1 files changed, 31 insertions, 7 deletions
diff --git a/emulator/usbpt/bluetooth/bluetooth.prop b/emulator/usbpt/bluetooth/bluetooth.prop
index fdd00c0..e84275d 100644
--- a/emulator/usbpt/bluetooth/bluetooth.prop
+++ b/emulator/usbpt/bluetooth/bluetooth.prop
@@ -1,11 +1,35 @@
# The default Bluetooth Class of Device
-# Service Field: 0x26 -> 38
-# - Bit 17: Networking
-# - Bit 18: Rendering
-# - Bit 21: Audio
-# Major Class: 0x04 -> 4 (Audio / Video)
-# Minor Class: 0x08 -> 8 (Car Audio)
-bluetooth.device.class_of_device=38,4,8
+#
+# Bluetooth uses "format 1" for class of device, which consists of 4 fields:
+# * Major Service Class
+# * Major Device Class
+# * Minor Device Class
+# * Format indicator (Fixed: 0b00)
+#
+# Class of device is represented by a 3-tuple. However, each value in the tuple does
+# *NOT* correspond to a field. Instead, class of device is stored internally as 24 bits,
+# and each value in the tuple corresponds to an octet.
+#
+# Format (24 Bits):
+# Service Major Minor fmt
+# (11 bits) (5 bits) (6 bits) 0b00
+# |23 13|12 8|7 2|1 0|
+# |<------------------->|<------->|<--------->|<->|
+# |0|0|1|0|0|1|1|0|0|0|0|0|0|1|0|0|0|0|1|0|0|0|0|0|
+# |<------------->|<------------->|<------------->|
+# |23 16|15 8|7 0|
+# | octet[0] = 38 | octet[1] = 4 | octet[2] = 32 |
+#
+# Major Service Class:
+# - Bit 21: Audio
+# - Bit 18: Rendering
+# - Bit 17: Networking
+# Major Device Class:
+# - Bit 10: Audio / Video
+# Minor Device Class:
+# - Bit 5: Car Audio
+# Format Bits (Fixed): 0b00 -> "Format 1"
+bluetooth.device.class_of_device=38,4,32
bluetooth.device.default_name=gCar Emulator
# The Bluetooth profiles that cars expect to have enabled. All other profiles