W3C home > Mailing lists > Public > public-web-bluetooth-log@w3.org > June 2016

[web-bluetooth] Add a "connectable" filter to requestDevice

From: François Beaufort via GitHub <sysbot+gh@w3.org>
Date: Tue, 14 Jun 2016 09:11:30 +0000
To: public-web-bluetooth-log@w3.org
Message-ID: <issues.opened-160132574-1465895490-sysbot+gh@w3.org>
beaufortfrancois has just created a new issue for 
https://github.com/WebBluetoothCG/web-bluetooth:

== Add a "connectable" filter to requestDevice ==
It would be nice to either add a "connectable" filter to requestDevice
 to only show Bluetooth Devices that are connectable

```js
let options = { filters: [{ services: [0x1234], connectable: true }],
                optionalServices: ['battery_service'] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
...
```

or make `requestDevice` calls only match Bluetooth Devices that are 
connectable as the intent behind `requestDevice` seems to connect to 
the GATT Server. The non-connectable bluetooth devices would be 
handled with `requestLEScan`.

Please view or discuss this issue at 
https://github.com/WebBluetoothCG/web-bluetooth/issues/243 using your 
GitHub account
Received on Tuesday, 14 June 2016 09:11:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 14 June 2016 09:11:33 UTC