diff --git a/apps/boot/ChangeLog b/apps/boot/ChangeLog index 82e55fa91..d7405e763 100644 --- a/apps/boot/ChangeLog +++ b/apps/boot/ChangeLog @@ -66,3 +66,4 @@ If settings.bootDebug is set, output timing for each section of .boot0 0.56: Settings.log = 0,1,2,3 for off,display, log, both 0.57: Handle the whitelist being disabled +0.58: "Make Connectable" temporarily bypasses the whitelist diff --git a/apps/boot/bootupdate.js b/apps/boot/bootupdate.js index 84745b792..a12d41e1b 100644 --- a/apps/boot/bootupdate.js +++ b/apps/boot/bootupdate.js @@ -79,7 +79,7 @@ if (global.save) boot += `global.save = function() { throw new Error("You can't if (s.options) boot+=`Bangle.setOptions(${E.toJS(s.options)});\n`; if (s.brightness && s.brightness!=1) boot+=`Bangle.setLCDBrightness(${s.brightness});\n`; if (s.passkey!==undefined && s.passkey.length==6) boot+=`NRF.setSecurity({passkey:${E.toJS(s.passkey.toString())}, mitm:1, display:1});\n`; -if (s.whitelist && !s.whitelist_disabled) boot+=`NRF.on('connect', function(addr) { if (!(require('Storage').readJSON('setting.json',1)||{}).whitelist.includes(addr)) NRF.disconnect(); });\n`; +if (s.whitelist && !s.whitelist_disabled) boot+=`NRF.on('connect', function(addr) { if (!NRF.ignoreWhitelist && !(require('Storage').readJSON('setting.json',1)||{}).whitelist.includes(addr)) NRF.disconnect(); });\n`; if (s.rotate) boot+=`g.setRotation(${s.rotate&3},${s.rotate>>2});\n` // screen rotation // ================================================== FIXING OLDER FIRMWARES if (FWVERSION<215.068) // 2v15.68 and before had compass heading inverted. diff --git a/apps/boot/metadata.json b/apps/boot/metadata.json index c652f6136..0a4e7e9d1 100644 --- a/apps/boot/metadata.json +++ b/apps/boot/metadata.json @@ -1,7 +1,7 @@ { "id": "boot", "name": "Bootloader", - "version": "0.57", + "version": "0.58", "description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings", "icon": "bootloader.png", "type": "bootloader", diff --git a/apps/setting/ChangeLog b/apps/setting/ChangeLog index 42bac0ea7..d090add58 100644 --- a/apps/setting/ChangeLog +++ b/apps/setting/ChangeLog @@ -66,4 +66,5 @@ of 'Select Clock' 0.58: On/Off settings items now use checkboxes 0.59: Preserve BLE whitelist even when disabled 0.60: Moved LCD calibration to top of menu, and use 12 taps (not 8) - LCD calibration will now error if the calibration is obviously wrong \ No newline at end of file + LCD calibration will now error if the calibration is obviously wrong +0.61: Permit temporary bypass of the BLE whitelist diff --git a/apps/setting/metadata.json b/apps/setting/metadata.json index 20213e81f..b2b19dd6b 100644 --- a/apps/setting/metadata.json +++ b/apps/setting/metadata.json @@ -1,7 +1,7 @@ { "id": "setting", "name": "Settings", - "version": "0.60", + "version": "0.61", "description": "A menu for setting up Bangle.js", "icon": "settings.png", "tags": "tool,system", diff --git a/apps/setting/settings.js b/apps/setting/settings.js index ffea3ddbb..d22f28412 100644 --- a/apps/setting/settings.js +++ b/apps/setting/settings.js @@ -658,6 +658,7 @@ function showUtilMenu() { function makeConnectable() { try { NRF.wake(); } catch (e) { } Bluetooth.setConsole(1); + NRF.ignoreWhitelist = 1; var name = "Bangle.js " + NRF.getAddress().substr(-5).replace(":", ""); E.showPrompt(name + /*LANG*/"\nStay Connectable?", { title: /*LANG*/"Connectable" }).then(r => { if (settings.ble != r) { @@ -665,6 +666,7 @@ function makeConnectable() { updateSettings(); } if (!r) try { NRF.sleep(); } catch (e) { } + delete NRF.ignoreWhitelist; showMainMenu(); }); }