Changes

Jump to: navigation, search

B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt

No change in size, 08:34, 5 November 2014
no edit summary
console.log("Re-connect to remote LE device.");
gatt.connect().then { ( function onResolve() {
console.log("Re-connection succeeds. ConnectionState becomes:", gatt.connectionState);
}, function onReject(aReason) {
var gatt = device.gatt;
if (gatt && gatt.connectionState === "connected") {
gatt.disconnect().then { ( function onResolve() {
console.log("Disconnection succeeds. ConnectionState becomes:", gatt.connectionState);
}, function onReject(aReason) {
var gatt = device.gatt;
if (gatt && gatt.connectionState === "connected") {
gatt.readRemoteRssi().then { ( function onResolve(rssi) {
console.log("Remote RSSI value:", rssi);
}, function onReject(aReason) {
120
edits

Navigation menu