health 0.81: Ensure 'Privacy' (address randomnisation) is only added for Bangle.js 2,

+      and add warnings in documentation that it can cause connection issues
master
Gordon Williams 2025-07-29 11:15:04 +01:00
parent 64a92e281a
commit dc80eadbbb
4 changed files with 35 additions and 30 deletions

View File

@ -89,3 +89,5 @@ of 'Select Clock'
0.78: Fix menu scroll restore on BangleJS1 0.78: Fix menu scroll restore on BangleJS1
0.79: Ensure that tapping on pressure/altitude doesn't cause a menu to display temporarily 0.79: Ensure that tapping on pressure/altitude doesn't cause a menu to display temporarily
0.80: Add option to set LCD brightness to 0, keep default brightness at 1. 0.80: Add option to set LCD brightness to 0, keep default brightness at 1.
0.81: Ensure 'Privacy' (address randomnisation) is only added for Bangle.js 2,
and add warnings in documentation that it can cause connection issues

View File

@ -14,7 +14,7 @@ This is Bangle.js's main settings menu:
* **Locale** Set whether you want 12 hour time, and what day of the week the week starts on. * **Locale** Set whether you want 12 hour time, and what day of the week the week starts on.
See below for options under each heading: See below for options under each heading:
## Apps - App-specific settings ## Apps - App-specific settings
This is where you adjust settings for an individual app. (eg. Health app: Adjust how often heart rate tracking should fire.) This is where you adjust settings for an individual app. (eg. Health app: Adjust how often heart rate tracking should fire.)
@ -45,6 +45,8 @@ This is where you adjust settings for an individual app. (eg. Health app: Adjust
* **Passkey** allows you to set a passkey that is required to connect and pair to Bangle.js. * **Passkey** allows you to set a passkey that is required to connect and pair to Bangle.js.
* **Whitelist** allows you to specify only specific devices that you will let connect to your Bangle.js. Simply choose the menu item, then `Add Device`, and then connect to Bangle.js with the device you want to add. If you are already connected you will have to disconnect first. Changes will take effect when you exit the `Settings` app. * **Whitelist** allows you to specify only specific devices that you will let connect to your Bangle.js. Simply choose the menu item, then `Add Device`, and then connect to Bangle.js with the device you want to add. If you are already connected you will have to disconnect first. Changes will take effect when you exit the `Settings` app.
* **NOTE:** iOS devices and newer Android devices often implement Address Randomisation and change their Bluetooth address every so often. If you device's address changes, you will be unable to connect until you update the whitelist again. * **NOTE:** iOS devices and newer Android devices often implement Address Randomisation and change their Bluetooth address every so often. If you device's address changes, you will be unable to connect until you update the whitelist again.
* **Privacy** - (Bangle.js 2 only) enables BLE privacy mode (see [NRF.setSecurity](https://www.espruino.com/Reference#l_NRF_setSecurity)). This randomises the Bangle's MAC address and can also
remove advertising of its name. **This can cause connection issues with apps that expect to keep a permanent connection like iOS/Gadgetbridge**
## LCD ## LCD

View File

@ -1,7 +1,7 @@
{ {
"id": "setting", "id": "setting",
"name": "Settings", "name": "Settings",
"version": "0.80", "version": "0.81",
"description": "A menu for setting up Bangle.js", "description": "A menu for setting up Bangle.js",
"icon": "settings.png", "icon": "settings.png",
"tags": "tool,system", "tags": "tool,system",

View File

@ -192,7 +192,7 @@ function BLEMenu() {
var hidN = [/*LANG*/"Off", /*LANG*/"Kbrd & Media", /*LANG*/"Kbrd", /*LANG*/"Kbrd & Mouse", /*LANG*/"Joystick"]; var hidN = [/*LANG*/"Off", /*LANG*/"Kbrd & Media", /*LANG*/"Kbrd", /*LANG*/"Kbrd & Mouse", /*LANG*/"Joystick"];
var privacy = [/*LANG*/"Off", /*LANG*/"Show name", /*LANG*/"Hide name"]; var privacy = [/*LANG*/"Off", /*LANG*/"Show name", /*LANG*/"Hide name"];
return { var menu = {
'': { 'title': /*LANG*/'Bluetooth' }, '': { 'title': /*LANG*/'Bluetooth' },
'< Back': ()=>popMenu(mainMenu()), '< Back': ()=>popMenu(mainMenu()),
/*LANG*/'Make Connectable': ()=>makeConnectable(), /*LANG*/'Make Connectable': ()=>makeConnectable(),
@ -210,7 +210,32 @@ function BLEMenu() {
updateSettings(); updateSettings();
} }
}, },
/*LANG*/'Privacy': { /*LANG*/'HID': {
value: Math.max(0,0 | hidV.indexOf(settings.HID)),
min: 0, max: hidN.length-1,
format: v => hidN[v],
onchange: v => {
settings.HID = hidV[v];
updateSettings();
}
},
/*LANG*/'Passkey': {
value: settings.passkey?settings.passkey:/*LANG*/"none",
onchange: () => setTimeout(() => pushMenu(passkeyMenu())) // graphical_menu redraws after the call
},
/*LANG*/'Whitelist': {
value:
(
(settings.whitelist_disabled || !settings.whitelist) ? /*LANG*/"Off" : /*LANG*/"On"
) + (
settings.whitelist
? " (" + settings.whitelist.length + ")"
: ""
),
onchange: () => setTimeout(() => pushMenu(whitelistMenu())) // graphical_menu redraws after the call
}
};
if (BANGLEJS2) menu[/*LANG*/'Privacy'] = {
min: 0, max: privacy.length-1, min: 0, max: privacy.length-1,
format: v => privacy[v], format: v => privacy[v],
value: (() => { value: (() => {
@ -235,32 +260,8 @@ function BLEMenu() {
} }
updateSettings(); updateSettings();
} }
}, };
/*LANG*/'HID': { return menu;
value: Math.max(0,0 | hidV.indexOf(settings.HID)),
min: 0, max: hidN.length-1,
format: v => hidN[v],
onchange: v => {
settings.HID = hidV[v];
updateSettings();
}
},
/*LANG*/'Passkey': {
value: settings.passkey?settings.passkey:/*LANG*/"none",
onchange: () => setTimeout(() => pushMenu(passkeyMenu())) // graphical_menu redraws after the call
},
/*LANG*/'Whitelist': {
value:
(
(settings.whitelist_disabled || !settings.whitelist) ? /*LANG*/"off" : /*LANG*/"on"
) + (
settings.whitelist
? " (" + settings.whitelist.length + ")"
: ""
),
onchange: () => setTimeout(() => pushMenu(whitelistMenu())) // graphical_menu redraws after the call
}
};
} }
function showThemeMenu(pop) { function showThemeMenu(pop) {