W3C home > Mailing lists > Public > public-web-bluetooth-log@w3.org > August 2015

Re: [web-bluetooth] Scan by manufacturerData

From: Jeffrey Yasskin via GitHub <sysbot+gh@w3.org>
Date: Tue, 25 Aug 2015 16:00:14 +0000
To: public-web-bluetooth-log@w3.org
Message-ID: <issue_comment.created-134648172-1440518411-sysbot+gh@w3.org>
Android allows scanning by a mask of the manufacturer data bits: 
 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.

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 

GitHub Notif of comment by jyasskin
Received on Tuesday, 25 August 2015 16:00:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:58:20 UTC