show bluetooth pin when available
This commit is contained in:
10
index.html
10
index.html
@@ -1759,16 +1759,16 @@
|
|||||||
// start bluetooth pairing
|
// start bluetooth pairing
|
||||||
try {
|
try {
|
||||||
console.log("start bluetooth pairing");
|
console.log("start bluetooth pairing");
|
||||||
const pin = await rnode.startBluetoothPairing();
|
await rnode.startBluetoothPairing(async (pin) => {
|
||||||
|
alert("Bluetooth Pairing Pin: " + pin);
|
||||||
|
await rnode.close();
|
||||||
|
});
|
||||||
console.log("start bluetooth pairing: done");
|
console.log("start bluetooth pairing: done");
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
alert(error);
|
alert(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
alert("RNode should now be in Bluetooth Pairing mode. A pin will be shown on the screen when you pair with it from Android bluetooth settings.");
|
alert("RNode is in pairing mode. Close this alert and then pair from Android bluetooth settings. A pin will be shown on screen.");
|
||||||
|
|
||||||
// done
|
|
||||||
await rnode.close();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async readAsBinaryString(blob) {
|
async readAsBinaryString(blob) {
|
||||||
|
|||||||
Reference in New Issue
Block a user