120
edits
No edit summary |
|||
| Line 197: | Line 197: | ||
; Sample | ; Sample | ||
device.fetchUuids().then | device.fetchUuids().then ( function onResolve(uuids) { | ||
console.log("Resolved with uuids:"); | console.log("Resolved with uuids:"); | ||
for (var i = 0; i < uuids.length; i++) { | for (var i = 0; i < uuids.length; i++) { | ||
| Line 224: | Line 224: | ||
var autoConnect = false; | var autoConnect = false; | ||
device.connectGatt(autoConnect).then | device.connectGatt(autoConnect).then ( function onResolve(gatt) { | ||
// gatt.connectionState is connected. | // gatt.connectionState is connected. | ||
console.log("Resolved with gatt. Connection state:", gatt.connectionState); | console.log("Resolved with gatt. Connection state:", gatt.connectionState); | ||
edits