diff --git a/libs/bluetooth-android/_locales/bluetooth-android-jsdoc-strings.json b/libs/bluetooth-android/_locales/bluetooth-android-jsdoc-strings.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/libs/bluetooth-android/_locales/bluetooth-android-jsdoc-strings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/libs/bluetooth-android/_locales/bluetooth-android-settings-jsdoc-strings.json b/libs/bluetooth-android/_locales/bluetooth-android-settings-jsdoc-strings.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/libs/bluetooth-android/_locales/bluetooth-android-settings-jsdoc-strings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/libs/bluetooth-android/_locales/bluetooth-android-settings-strings.json b/libs/bluetooth-android/_locales/bluetooth-android-settings-strings.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/libs/bluetooth-android/_locales/bluetooth-android-settings-strings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/libs/bluetooth-android/_locales/bluetooth-android-strings.json b/libs/bluetooth-android/_locales/bluetooth-android-strings.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/libs/bluetooth-android/_locales/bluetooth-android-strings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/libs/bluetooth-android/_locales/bluetooth-jsdoc-strings.json b/libs/bluetooth-android/_locales/bluetooth-jsdoc-strings.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/libs/bluetooth-android/_locales/bluetooth-jsdoc-strings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/libs/bluetooth-android/_locales/bluetooth-strings.json b/libs/bluetooth-android/_locales/bluetooth-strings.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/libs/bluetooth-android/_locales/bluetooth-strings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/libs/bluetooth-disabled/_locales/ble-disabled-jsdoc-strings.json b/libs/bluetooth-disabled/_locales/ble-disabled-jsdoc-strings.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/libs/bluetooth-disabled/_locales/ble-disabled-jsdoc-strings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/libs/bluetooth-disabled/_locales/ble-disabled-strings.json b/libs/bluetooth-disabled/_locales/ble-disabled-strings.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/libs/bluetooth-disabled/_locales/ble-disabled-strings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/libs/bluetooth-disabled/pxt.json b/libs/bluetooth-disabled/pxt.json index f83e545d6..295c1fe34 100644 --- a/libs/bluetooth-disabled/pxt.json +++ b/libs/bluetooth-disabled/pxt.json @@ -18,6 +18,13 @@ "enabled": 0 } } + }, + "optionalConfig": { + "microbit-dal": { + "bluetooth": { + "enabled": 0 + } + } } } } \ No newline at end of file diff --git a/libs/bluetooth-no-pairing/README.md b/libs/bluetooth-no-pairing/README.md new file mode 100644 index 000000000..d50a48f57 --- /dev/null +++ b/libs/bluetooth-no-pairing/README.md @@ -0,0 +1,13 @@ +# Bluetooth settings for Android and Calliope mini 1 and 2 + +This extension set the BLE settings to make sure they work for iOS and Calliope mini 1 and 2: + +``` +"bluetooth": { + "open": 0, + "security_level": "SECURITY_MODE_ENCRYPTION_NO_MITM", + "whitelist": 1 +} +``` + +These settings are the default for Calliope mini 1 and 2, so this extension is only required to be included for Calliope mini 1 and 2 Projects where "bluetooth-pairing" was loaded before. \ No newline at end of file diff --git a/libs/bluetooth-android/_locales/android-bluetooth-ble-jsdoc-strings.json b/libs/bluetooth-no-pairing/_locales/bluetooth-no-pairing-jsdoc-strings.json similarity index 100% rename from libs/bluetooth-android/_locales/android-bluetooth-ble-jsdoc-strings.json rename to libs/bluetooth-no-pairing/_locales/bluetooth-no-pairing-jsdoc-strings.json diff --git a/libs/bluetooth-android/_locales/android-bluetooth-ble-strings.json b/libs/bluetooth-no-pairing/_locales/bluetooth-no-pairing-strings.json similarity index 100% rename from libs/bluetooth-android/_locales/android-bluetooth-ble-strings.json rename to libs/bluetooth-no-pairing/_locales/bluetooth-no-pairing-strings.json diff --git a/libs/bluetooth-no-pairing/pxt.json b/libs/bluetooth-no-pairing/pxt.json new file mode 100644 index 000000000..a056903cf --- /dev/null +++ b/libs/bluetooth-no-pairing/pxt.json @@ -0,0 +1,32 @@ +{ + "name": "bluetooth-no-pairing", + "description": "Bluetooth settings for iOS and Calliope mini 1 and 2.", + "dependencies": { + "core": "file:../core" + }, + "files": [ + "README.md" + ], + "public": true, + "searchOnly": true, + "weight": 100, + "icon": "./static/packages/bluetooth/icon.png", + "yotta": { + "config": { + "microbit-dal": { + "bluetooth": { + "open": 1, + "security_level": null, + "whitelist": 0 + } + } + }, + "userConfigs": [ + { + "description": "Bluetooth: No pairing required | Calliope mini 1 and 2 (iOS)", + "config": { + } + } + ] + } +} \ No newline at end of file diff --git a/libs/bluetooth-android/README.md b/libs/bluetooth-pairing/README.md similarity index 65% rename from libs/bluetooth-android/README.md rename to libs/bluetooth-pairing/README.md index 67cbd4a53..28cc7323b 100644 --- a/libs/bluetooth-android/README.md +++ b/libs/bluetooth-pairing/README.md @@ -1,6 +1,6 @@ # Bluetooth settings for Android and Calliope mini 1 and 2 -This extensiion set the BLE settings to make sure they work with the Android App: +This extensiion set the BLE settings to make sure they work for Calliope mini 3 or android + Calliope mini 1 and 2.: ``` "bluetooth": { @@ -10,4 +10,4 @@ This extensiion set the BLE settings to make sure they work with the Android App } ``` -These settings are the default for Calliope mini 3, so this extension is only required to be included for Projects using the Calliope mini 1 or Calliope mini 2. \ No newline at end of file +These settings are the default for Calliope mini 3, so this extension is only required to be included for Projects using the Calliope mini 1 or Calliope mini 2 on Android. \ No newline at end of file diff --git a/libs/bluetooth-android/_locales/ble-android-jsdoc-strings.json b/libs/bluetooth-pairing/_locales/bluetooth-pairing-jsdoc-strings.json similarity index 100% rename from libs/bluetooth-android/_locales/ble-android-jsdoc-strings.json rename to libs/bluetooth-pairing/_locales/bluetooth-pairing-jsdoc-strings.json diff --git a/libs/bluetooth-android/_locales/ble-android-strings.json b/libs/bluetooth-pairing/_locales/bluetooth-pairing-strings.json similarity index 100% rename from libs/bluetooth-android/_locales/ble-android-strings.json rename to libs/bluetooth-pairing/_locales/bluetooth-pairing-strings.json diff --git a/libs/bluetooth-android/pxt.json b/libs/bluetooth-pairing/pxt.json similarity index 56% rename from libs/bluetooth-android/pxt.json rename to libs/bluetooth-pairing/pxt.json index 41056c0e9..7018c659a 100644 --- a/libs/bluetooth-android/pxt.json +++ b/libs/bluetooth-pairing/pxt.json @@ -1,6 +1,6 @@ { - "name": "bluetooth-android-settings", - "description": "Bluetooth settings for Android and Calliope mini 1 and 2.", + "name": "bluetooth-pairing", + "description": "Bluetooth settings for Calliope mini 3 or android + Calliope mini 1 and 2.", "dependencies": { "core": "file:../core" }, @@ -20,6 +20,13 @@ "whitelist": 1 } } - } + }, + "userConfigs": [ + { + "description": "Bluetooth: Pairing required | Calliope mini 3 (iOS) | all Calliope mini Versions (Android)", + "config": { + } + } + ] } } \ No newline at end of file diff --git a/libs/core-mini-codal/pxt.json b/libs/core-mini-codal/pxt.json index 517385727..8859e0d08 100644 --- a/libs/core-mini-codal/pxt.json +++ b/libs/core-mini-codal/pxt.json @@ -3,7 +3,8 @@ "description": "The mini codal core library", "dependencies": { "core": "file:../core", - "microphone": "file:../microphone" + "microphone": "file:../microphone", + "bluetooth-pairing": "file:../bluetooth-pairing" }, "disablesVariants": [ "minidal" @@ -23,14 +24,12 @@ "touchmode.cpp" ], "yotta": { - "optionalConfig": { - "microbit-dal": { - "bluetooth": { - "open": 0, - "security_level": "SECURITY_MODE_ENCRYPTION_NO_MITM", - "whitelist": 1 + "userConfigs": [ + { + "description": "Calliope mini 3", + "config": { } } - } + ] } } diff --git a/libs/core/pxt.json b/libs/core/pxt.json index 989aac1e8..0242f27f9 100644 --- a/libs/core/pxt.json +++ b/libs/core/pxt.json @@ -128,6 +128,19 @@ "debug": 0, "heap_debug": 0 } - } - } + }, + "userConfigs": [ + { + "description": "Only load Bluetooth while pairing mode is activated (holding A+B and briefly the Reset button)", + "config": { + "microbit-dal": { + "bluetooth": { + "enabled": 0 + } + } + } + } + ] + }, + "partial": true } diff --git a/libs/localization-strings-stable/README.md b/libs/localization-strings-stable/README.md new file mode 100644 index 000000000..e56ef17c2 --- /dev/null +++ b/libs/localization-strings-stable/README.md @@ -0,0 +1,3 @@ +# Localization strings for Stable version + +This extensions includes strings, that are changed or deleted in newer version than the current release. \ No newline at end of file diff --git a/libs/bluetooth-android/_locales/bluetooth-android-ble-jsdoc-strings.json b/libs/localization-strings-stable/_locales/localization-strings-stable-jsdoc-strings.json similarity index 100% rename from libs/bluetooth-android/_locales/bluetooth-android-ble-jsdoc-strings.json rename to libs/localization-strings-stable/_locales/localization-strings-stable-jsdoc-strings.json diff --git a/libs/bluetooth-android/_locales/bluetooth-android-ble-strings.json b/libs/localization-strings-stable/_locales/localization-strings-stable-strings.json similarity index 100% rename from libs/bluetooth-android/_locales/bluetooth-android-ble-strings.json rename to libs/localization-strings-stable/_locales/localization-strings-stable-strings.json diff --git a/libs/localization-strings-stable/pxt.json b/libs/localization-strings-stable/pxt.json new file mode 100644 index 000000000..b710918f5 --- /dev/null +++ b/libs/localization-strings-stable/pxt.json @@ -0,0 +1,63 @@ +{ + "name": "localization-strings-stable", + "description": "Adds strings for translations.", + "dependencies": { + "core": "file:../core" + }, + "files": [ + "README.md" + ], + "public": true, + "weight": 0, + "searchOnly": true, + "yotta": { + "optionalConfig": { + }, + "userConfigs": [ + { + "description": "Only load Bluetooth while Paring-Mode is activated (holding A+B and briefly the Reset button)", + "config": { + "microbit-dal": { + "bluetooth": { + "enabled": 0 + } + } + } + }, + { + "description": "Disable partial flashing (increases available RAM)", + "config": { + "microbit-dal": { + "bluetooth": { + "partial_flashing": 0 + } + } + } + }, + { + "description": "Bluetooth: No pairing required", + "config": { + "microbit-dal": { + "bluetooth": { + "open": 1, + "security_level": null, + "whitelist": 0 + } + } + } + }, + { + "description": "Bluetooth: Pairing required", + "config": { + "microbit-dal": { + "bluetooth": { + "open": 0, + "security_level": "SECURITY_MODE_ENCRYPTION_NO_MITM", + "whitelist": 1 + } + } + } + } + ] + } +} \ No newline at end of file diff --git a/libs/v1/pxt.json b/libs/v1/pxt.json index e25bf6d75..f64c93c2d 100644 --- a/libs/v1/pxt.json +++ b/libs/v1/pxt.json @@ -20,19 +20,20 @@ "yotta": { "config": { "microbit-dal": { - "bluetooth": { - "enabled": 0 - }, "sram_end": "0x20004000", "RAM_SIZE": "\"16K\"" } }, - "optionalConfig": { - "microbit-dal": { - "bluetooth": { - "enabled": 0 + "userConfigs": [ + { + "description": "Calliope mini 1", + "config": { + } + },{ + "description": "Calliope mini 2", + "config": { } } - } + ] } } diff --git a/libs/v2/pxt.json b/libs/v2/pxt.json index 2ef663251..9f53707b0 100644 --- a/libs/v2/pxt.json +++ b/libs/v2/pxt.json @@ -22,6 +22,13 @@ "sram_end": "0x20008000", "RAM_SIZE": "\"32K\"" } - } + }, + "userConfigs": [ + { + "description": "Calliope mini 2", + "config": { + } + } + ] } } diff --git a/pxtarget.json b/pxtarget.json index d5c7bd1b1..986583961 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -15,7 +15,8 @@ "libs/radio", "libs/devices", "libs/bluetooth", - "libs/bluetooth-android", + "libs/bluetooth-no-pairing", + "libs/bluetooth-pairing", "libs/bluetooth-disabled", "libs/servo", "libs/radio-broadcast", @@ -23,7 +24,8 @@ "libs/settings", "libs/flashlog", "libs/datalogger", - "libs/audio-recording" + "libs/audio-recording", + "libs/localization-strings-stable" ], "cloud": { "workspace": false,