diff --git a/messages.go b/messages.go index a8e73d3..55fff57 100644 --- a/messages.go +++ b/messages.go @@ -966,10 +966,23 @@ type StatusMessage struct { States map[string]bool `json:"states,omitempty"` } +type ManufacturerDataElement struct { + // The company ID, which must be one of the assigned company IDs. + // The full list is in here: + // https://www.bluetooth.com/specifications/assigned-numbers/ + // The list can also be viewed here: + // https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml + // The value 0xffff can also be used for testing. + CompanyID uint16 `json:"company-id,omitempty"` + + // The value, which can be any value but can't be very large. + Data []byte `json:"data,omitempty"` +} + type BleAdvertisementPayload struct { - LocalName string `json:"localName,omitempty"` - Bytes []byte `json:"bytes,omitempty"` - ManufacturerData map[uint16][]byte `json:"manufacturerData,omitempty"` + LocalName string `json:"localName,omitempty"` + Bytes []byte `json:"bytes,omitempty"` + ManufacturerData []ManufacturerDataElement `json:"manufacturerData,omitempty"` } type BleDevice struct {