Skip to content
5 changes: 4 additions & 1 deletion further_link/util/bluetooth/dis_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def pnp_id(self, options):
# product_id: 2 bytes (little-endian), product_version: 2 bytes (little-endian)
pnp_data = struct.pack(
"<BHHH",
1, # Vendor ID Source (1 = Bluetooth SIG)
# VENDOR_ID 0x0A5C is Broadcom's USB-IF assigned ID, not Bluetooth SIG.
# Using source=1 (BT SIG) with a USB-IF ID causes Windows to flag the
# PnP record as inconsistent and may reject the device.
2, # Vendor ID Source (2 = USB Implementer's Forum)
VENDOR_ID,
PRODUCT_ID,
product_version,
Expand Down
4 changes: 3 additions & 1 deletion further_link/util/bluetooth/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
FIRMWARE_REVISION = "0.0.0"
HARDWARE_REVISION = "0.0.0"
SYSTEM_ID = "0000000000000000"
APPEARANCE = 0x0A5C # Broadcom
# Previously 0x0A5C which is Broadcom's vendor ID, not a valid GAP Appearance.
# Windows 11 validates appearance values and rejects/misidentifies invalid ones.
APPEARANCE = 0x0080 # Generic Computer (valid Bluetooth SIG assigned value)
6 changes: 3 additions & 3 deletions tests/e2e/test_bluetooth_dis_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ def test_dis_pnp_id(dis_service):
value = char.getter_func(dis_service, {})

# PNP ID is a structured binary value with specific format
# First byte should be 1 (Vendor ID Source = Bluetooth SIG)
# First byte should be 2 (Vendor ID Source = USB Implementer's Forum)
assert len(value) == 7 # Should be 7 bytes total
assert value[0] == 1 # Vendor ID Source = 1 (Bluetooth SIG)
assert value[0] == 2 # Vendor ID Source = 2 (USB Implementer's Forum)

# Extract values from the struct format used in dis_service.py
vendor_id_source, vendor_id, product_id, product_version = struct.unpack(
"<BHHH", value
)

# Verify values match those in the implementation
assert vendor_id_source == 1
assert vendor_id_source == 2
assert vendor_id == VENDOR_ID # Vendor ID from the implementation
assert product_id == PRODUCT_ID # Product ID for pi-top [4]

Expand Down
Loading