ble-device-info-service/protocol: document PnP ID

This explains the Pybricks-specific usage of the PnP ID fields.
This commit is contained in:
David Lechner
2021-12-27 12:38:51 -06:00
parent 5f7a63fe5a
commit 78dd03d80f
2 changed files with 11 additions and 0 deletions
+4
View File
@@ -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;
};
+7
View File
@@ -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
*