- From: Julien Racle via GitHub <sysbot+gh@w3.org>
- Date: Wed, 27 Jul 2016 14:13:32 +0000
- To: public-web-bluetooth-log@w3.org
Thanks @beaufortfrancois for re-phrasing and quoting issue #215 , which makes my mind clearer after reading it.. I'm raising the point in along with issues #255 / #253 / #243 related to peripheral's GATT connection state. I'm fine with conclusion of #215, in a sense that we don't need to have 2 events reporting disconnection (physical vs Realms). However, IMO I'd be more comfortable if connection status would reflect physical connection status. It means that if other Realm connects device, or if device is already connected by OS after pairing from bluetooth menu, then device.gatt.connected would return true. We would indeed have to add a brand new `gattserverconnected` event, so other Realms can be notified of external connection to device. As for polling, I'm not in favor of it.. and we could as well make device.gatt.connect() could just return if device is already connected, hence we'd keep code in simpler form : ``` navigator.bluetooth.requestDevice({filters: [{services: ['battery_service']}]}) .then(device => return device.gatt.connect()) ... ``` Again I'm fine with current specification of [gatt.connected](https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-connected), but just want to bring other view on it. As for more important matter, please see #255, which also talks about connected device retrieval. -- GitHub Notification of comment by jracle Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/256#issuecomment-235597791 using your GitHub account
Received on Wednesday, 27 July 2016 14:13:39 UTC