diff --git a/src/ble-device-info-service/protocol.ts b/src/ble-device-info-service/protocol.ts index b94296ae..b1dfb101 100644 --- a/src/ble-device-info-service/protocol.ts +++ b/src/ble-device-info-service/protocol.ts @@ -31,9 +31,13 @@ export enum PnpIdVendorIdSource { * Decoded data from the PnP ID characteristic. */ export type PnpId = { + /** For Pybricks hubs, this should be PnpIdVendorIdSource.BluetoothSig */ vendorIdSource: PnpIdVendorIdSource; + /** For Pybricks hubs, this should be LegoCompanyId (from ble-lwp3-service/protocol). */ vendorId: number; + /** For Pybricks hubs, this should be one of HubType (from ble-lwp3-service/protocol). */ productId: number; + /** For Pybricks hubs, this should be hub variant if applicable (from ble-lwp3-service/protocol). */ productVersion: number; }; diff --git a/src/ble-lwp3-service/protocol.ts b/src/ble-lwp3-service/protocol.ts index 4ddb149d..b9223cef 100644 --- a/src/ble-lwp3-service/protocol.ts +++ b/src/ble-lwp3-service/protocol.ts @@ -5,6 +5,13 @@ // // https://lego.github.io/lego-ble-wireless-protocol-docs/ +/** + * LEGO's Bluetooth SIG company identifier. + * + * https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/ + */ +export const LegoCompanyId = 0x0397; + /** * LEGO Powered Up Hub type IDs *