[web-bluetooth] Clarify the role of requestDevice vs requestLEScan

jracle has just created a new issue for 
https://github.com/WebBluetoothCG/web-bluetooth:

== Clarify the role of requestDevice vs requestLEScan ==
Sorry for eventually re-opening closed discussion here, but I see 
ongoing discussions around connected peripherals ( #237 #243  #253 ) 
and scanning ( #191 ), with a pull-request ( #239 )for the latter, 
planned for [3rd milestone : BLE 
Scanning](https://github.com/WebBluetoothCG/web-bluetooth/milestones).

Forgetting a bit about this spec (that I'm re-discovering anyway... my
 concern is to clarify retrieving connected peripherals vs the ones 
which are just advertizing their services.

In Apple's CoreBluetooth API, 
[CBCentralManager](https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBCentralManager_Class/index.html)
 offers clean separation of [retrieving connected 
peripherals](https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBCentralManager_Class/index.html#//apple_ref/occ/instm/CBCentralManager/retrieveConnectedPeripheralsWithServices:)
 vs [scanning for 
peripherals](https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBCentralManager_Class/index.html#//apple_ref/occ/instm/CBCentralManager/scanForPeripheralsWithServices:options:).

Why not limiting `requestDevice` to retrieving connected peripherals 
only? We would still use `requestLEScan` to discover peripherals we're
 interested in, then use `requestDevice` to connect to their GATT 
server (though maybe those steps can be shortened some way).

I'm probably missing something here guys, sorry in advance!

Please view or discuss this issue at 
https://github.com/WebBluetoothCG/web-bluetooth/issues/255 using your 
GitHub account

Received on Tuesday, 26 July 2016 14:54:11 UTC