Re: [web-bluetooth] Scan by manufacturerData

Android allows scanning by a mask of the manufacturer data bits: 
http://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setManufacturerData(int,
 byte[], byte[]). Do we want that too?

Do we want to also allow matching just a prefix of the data?

We can allow just exact matches for now, and extend the 
array/buffersource value to an object if/when developers ask for more.

Should manufacturerData be a Map from id to array/buffersource or an 
object whose keys are the id? e.g.

```javascript
filters: [{ manufacturerData: {0x0043: [0xcf, 0x19, 0x00, 0x09, 0x01, 
0x00]} }]
filters: [{ manufacturerData: new Map([[0x0043, [0xcf, 0x19, 0x00, 
0x09, 0x01, 0x00]]] }]
filters: [{ manufacturerData: {0x0043: new UInt8Array([0xcf, 0x19, 
0x00, 0x09, 0x01, 0x00])} }]
filters: [{
  manufacturerData: {
    0x0043: {
      bits: new UInt8Array([0xcf, 0x19, 0x00, 0x09, 0x01, 0x00]),
      mask: new UInt8Array([0xff, 0xff, 0x00, 0xff, 0xff, 0x00]),
      matchType: 'prefix',
    }
  }]
```

I'm leaning toward using an object, and allowing `(BufferSource or 
sequence<octet>)`, but not expanding to the mask or prefix matches 
yet. 

-- 
GitHub Notif of comment by jyasskin
See 
https://github.com/WebBluetoothCG/web-bluetooth/issues/153#issuecomment-134648172

Received on Tuesday, 25 August 2015 16:00:17 UTC