paypal / gatt

Gatt is a Go package for building Bluetooth Low Energy peripherals
BSD 3-Clause "New" or "Revised" License
1.12k stars 283 forks source link

Extra manufacturer data replaces existing. #74

Closed yene closed 7 years ago

yene commented 8 years ago

It seems my Wellcore iBeacon has additional manufacturer data, which replaces the existing in unmarshall.

[2 1 6 26 255 76 0 2 21 226 197 109 181 223 251 72 210 176 96 208 245 167 16 150 224 0 1 0 0 197 2 10 0 4 22 83 81 67 7 255 0 0 0 84 0 0]

As you can see it is the standard 25 byte iBeacon sequence, followed by [255 0 0 0 84 0 0]. I don't know for what the extra bytes are. The iBeacon works fine with iOS.

yene commented 8 years ago

Data comes from a scan response, the response data gets added to the previous advertisement and later replaces the manufacturer data. https://github.com/paypal/gatt/blob/master/linux/hci.go#L261

Raw bytes of the scan repsonse: [2 1 4 0 81 120 104 243 123 152 16 2 10 0 4 22 83 81 67 7 255 0 0 0 84 0 0 184]

yene commented 8 years ago

Same issue was reported in noble https://github.com/sandeepmistry/noble/issues/305