diff --git a/apps/boot/ChangeLog b/apps/boot/ChangeLog index b7535f3de2..1d8e44b72f 100644 --- a/apps/boot/ChangeLog +++ b/apps/boot/ChangeLog @@ -71,3 +71,4 @@ 0.60: Minor code improvements 0.61: Instead of breaking execution with an Exception when updating boot, just use if..else (fix 'Uncaught undefined') 0.62: Handle setting for configuring BLE privacy +0.63: Only set BLE `display:1` if we have a passkey diff --git a/apps/boot/bootupdate.js b/apps/boot/bootupdate.js index 714f5f3a61..aa4a7e7b58 100644 --- a/apps/boot/bootupdate.js +++ b/apps/boot/bootupdate.js @@ -79,9 +79,9 @@ 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.bleprivacy || (s.passkey!==undefined && s.passkey.length==6)) { - let passkey = s.passkey ? `passkey:${E.toJS(s.passkey.toString())},` : ""; + let passkey = s.passkey ? `passkey:${E.toJS(s.passkey.toString())},display:1,mitm:1,` : ""; let privacy = s.bleprivacy ? `privacy:${E.toJS(s.bleprivacy)},` : ""; - boot+=`NRF.setSecurity({${passkey}${privacy}mitm:1,display:1});\n`; + boot+=`NRF.setSecurity({${passkey}${privacy}});\n`; } if (s.blename === false) boot+=`NRF.setAdvertising({},{showName:false});\n`; if (s.whitelist && !s.whitelist_disabled) boot+=`NRF.on('connect', function(addr) { if (!NRF.ignoreWhitelist) { let whitelist = (require('Storage').readJSON('setting.json',1)||{}).whitelist; if (NRF.resolveAddress !== undefined) { let resolvedAddr = NRF.resolveAddress(addr); if (resolvedAddr !== undefined) addr = resolvedAddr + " (resolved)"; } if (!whitelist.includes(addr)) NRF.disconnect(); }});\n`; diff --git a/apps/boot/metadata.json b/apps/boot/metadata.json index 2a93c19128..dcc55da58e 100644 --- a/apps/boot/metadata.json +++ b/apps/boot/metadata.json @@ -1,7 +1,7 @@ { "id": "boot", "name": "Bootloader", - "version": "0.62", + "version": "0.63", "description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings", "icon": "bootloader.png", "type": "bootloader",