Skip to content

Commit 9ea2323

Browse files
committed
Improve error messaging
1 parent 519750a commit 9ea2323

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

js/workflows/ble.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ class BLEWorkflow extends Workflow {
153153
this.bleServer = await device.gatt.connect();
154154
} catch (error) {
155155
await this._showMessage("Failed to connect to device. Try forgetting device from OS bluetooth devices and try again.");
156+
// Disable the reconnect button
157+
this.connectionStep(1);
156158
}
157159
if (this.bleServer && this.bleServer.connected) {
158160
console.log('> Bluetooth device "' + device.name + ' connected.');
@@ -168,6 +170,7 @@ class BLEWorkflow extends Workflow {
168170
this.debugLog("connecting to " + device.name);
169171
try {
170172
console.log('Watching advertisements from "' + device.name + '"...');
173+
console.log('If no advertisements are received, make sure the device is powered on and in range. You can also try resetting the device');
171174
await device.watchAdvertisements({signal: abortController.signal});
172175
}
173176
catch (error) {

0 commit comments

Comments
 (0)