Merge remote-tracking branch 'origin/main' into battery_reporting_improvement

This commit is contained in:
MickiusMousius 2023-12-17 09:47:50 +10:30
commit ed088b770d
6 changed files with 52 additions and 36 deletions

View file

@ -27,7 +27,7 @@ jobs:
run: | run: |
cd app/tests/ble cd app/tests/ble
export TESTS=$(ls -d * | grep -v central | jq -R -s -c 'split("\n")[:-1]') export TESTS=$(ls -d * | grep -v central | jq -R -s -c 'split("\n")[:-1]')
echo "::set-output name=test-dirs::${TESTS}" echo "test-dirs=${TESTS}" > $GITHUB_OUTPUT
run-tests: run-tests:
needs: collect-tests needs: collect-tests
strategy: strategy:
@ -40,7 +40,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Cache west modules - name: Cache west modules
uses: actions/cache@v3.0.2 uses: actions/cache@v3
env: env:
cache-name: cache-zephyr-modules cache-name: cache-zephyr-modules
with: with:
@ -72,7 +72,7 @@ jobs:
run: BSIM_COMPONENTS_PATH="${GITHUB_WORKSPACE}/tools/bsim/components/" BSIM_OUT_PATH="${GITHUB_WORKSPACE}/tools/bsim/" ./run-ble-test.sh tests/ble/${{ matrix.test }} run: BSIM_COMPONENTS_PATH="${GITHUB_WORKSPACE}/tools/bsim/components/" BSIM_OUT_PATH="${GITHUB_WORKSPACE}/tools/bsim/" ./run-ble-test.sh tests/ble/${{ matrix.test }}
- name: Archive artifacts - name: Archive artifacts
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
with: with:
name: "log-files" name: "${{ matrix.test }}-log-files"
path: app/build/**/*.log path: app/build/**/*.log

View file

@ -55,13 +55,12 @@ jobs:
- name: Install @actions/artifact - name: Install @actions/artifact
run: npm install @actions/artifact run: npm install @actions/artifact
- name: Build and upload artifacts - name: Build and upload artifacts
uses: actions/github-script@v4 uses: actions/github-script@v7
id: boards-list id: boards-list
with: with:
script: | script: |
const fs = require('fs'); const fs = require('fs');
const artifact = require('@actions/artifact'); const {default: artifact} = require('@actions/artifact');
const artifactClient = artifact.create();
const execSync = require('child_process').execSync; const execSync = require('child_process').execSync;
@ -90,7 +89,7 @@ jobs:
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : ''; const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`; const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`;
await artifactClient.uploadArtifact(artifactName, files, rootDirectory, options); await artifact.uploadArtifact(artifactName, files, rootDirectory, options);
} catch (e) { } catch (e) {
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`); console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
console.error(e); console.error(e);
@ -111,7 +110,7 @@ jobs:
include-list: ${{ steps.compile-list.outputs.result }} include-list: ${{ steps.compile-list.outputs.result }}
steps: steps:
- name: Join build lists - name: Join build lists
uses: actions/github-script@v4 uses: actions/github-script@v7
id: compile-list id: compile-list
with: with:
script: | script: |
@ -158,7 +157,7 @@ jobs:
node-version: "14.x" node-version: "14.x"
- name: Install js-yaml - name: Install js-yaml
run: npm install js-yaml run: npm install js-yaml
- uses: actions/github-script@v4 - uses: actions/github-script@v7
id: core-list id: core-list
with: with:
script: | script: |
@ -187,7 +186,7 @@ jobs:
node-version: "14.x" node-version: "14.x"
- name: Install js-yaml - name: Install js-yaml
run: npm install js-yaml run: npm install js-yaml
- uses: actions/github-script@v4 - uses: actions/github-script@v7
id: boards-list id: boards-list
with: with:
script: | script: |
@ -264,7 +263,7 @@ jobs:
nightly-include: ${{ steps.nightly-list.outputs.result }} nightly-include: ${{ steps.nightly-list.outputs.result }}
steps: steps:
- name: Create nightly list - name: Create nightly list
uses: actions/github-script@v4 uses: actions/github-script@v7
id: nightly-list id: nightly-list
with: with:
script: | script: |
@ -315,7 +314,7 @@ jobs:
- name: Install js-yaml - name: Install js-yaml
run: npm install js-yaml run: npm install js-yaml
- name: Aggregate Metadata - name: Aggregate Metadata
uses: actions/github-script@v4 uses: actions/github-script@v7
id: aggregate-metadata id: aggregate-metadata
with: with:
script: | script: |
@ -333,7 +332,7 @@ jobs:
result-encoding: string result-encoding: string
- name: Organize Metadata - name: Organize Metadata
uses: actions/github-script@v4 uses: actions/github-script@v7
id: organize-metadata id: organize-metadata
with: with:
script: | script: |
@ -390,7 +389,7 @@ jobs:
id: changed-files id: changed-files
with: with:
format: "json" format: "json"
- uses: actions/github-script@v4 - uses: actions/github-script@v7
id: board-changes id: board-changes
with: with:
script: | script: |
@ -398,7 +397,7 @@ jobs:
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards')); const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
return boardChanges.length ? 'true' : 'false'; return boardChanges.length ? 'true' : 'false';
result-encoding: string result-encoding: string
- uses: actions/github-script@v4 - uses: actions/github-script@v7
id: core-changes id: core-changes
with: with:
script: | script: |

View file

@ -25,7 +25,7 @@ jobs:
run: | run: |
cd app/tests/ cd app/tests/
export TESTS=$(ls -d * | grep -v ble | jq -R -s -c 'split("\n")[:-1]') export TESTS=$(ls -d * | grep -v ble | jq -R -s -c 'split("\n")[:-1]')
echo "::set-output name=test-dirs::${TESTS}" echo "test-dirs=${TESTS}" >> $GITHUB_OUTPUT
run-tests: run-tests:
needs: collect-tests needs: collect-tests
strategy: strategy:
@ -38,7 +38,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Cache west modules - name: Cache west modules
uses: actions/cache@v3.0.2 uses: actions/cache@v3
env: env:
cache-name: cache-zephyr-modules cache-name: cache-zephyr-modules
with: with:
@ -65,7 +65,7 @@ jobs:
run: west test tests/${{ matrix.test }} run: west test tests/${{ matrix.test }}
- name: Archive artifacts - name: Archive artifacts
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
with: with:
name: "log-files" name: "${{ matrix.test }}-log-files"
path: app/build/**/*.log path: app/build/**/*.log

View file

@ -142,29 +142,44 @@ menuconfig ZMK_BLE
if ZMK_BLE if ZMK_BLE
config ZMK_BLE_EXPERIMENTAL_FEATURES config ZMK_BLE_EXPERIMENTAL_CONN
bool "Experimental: Enable experimental/advanced BLE settings/features" bool "Experimental BLE connection changes"
imply ZMK_BLE_PASSKEY_ENTRY
imply BT_GATT_AUTO_SEC_REQ imply BT_GATT_AUTO_SEC_REQ
help
Enables a combination of settings that are planned to be default in future versions of ZMK
to improve connection stability. This includes changes to timing on BLE pairing initation,
restores use of the updated/new LLCP implementation, and disables 2M PHY support.
config ZMK_BLE_EXPERIMENTAL_SEC
bool "Experimental BLE security changes"
imply BT_SMP_ALLOW_UNAUTH_OVERWRITE imply BT_SMP_ALLOW_UNAUTH_OVERWRITE
help help
Enables a combination of settings that are planned to be default in future versions of ZMK. Enables a combination of settings that are planned to be officially supported in the future.
This includes changes to timing on BLE pairing initation, BT Secure Connection passkey entry, This includes enabling BT Secure Connection passkey entry, and allows overwrite of keys from
restores use of the updated/new LLCP implementation, disables 2M PHY support, and allows previously paired hosts.
overwrite of keys from previously paired hosts.
config ZMK_BLE_EXPERIMENTAL_FEATURES
bool "Experimental BLE connection and security settings/features"
select ZMK_BLE_EXPERIMENTAL_CONN
select ZMK_BLE_EXPERIMENTAL_SEC
help
Enables experimental connection changes and security features.
config ZMK_BLE_PASSKEY_ENTRY config ZMK_BLE_PASSKEY_ENTRY
bool "Require passkey entry on the keyboard to complete pairing" bool "Require passkey entry on the keyboard to complete pairing"
default n default n
select RING_BUFFER select RING_BUFFER
config BT_SMP_ALLOW_UNAUTH_OVERWRITE
imply ZMK_BLE_PASSKEY_ENTRY
choice BT_LL_SW_LLCP_IMPL choice BT_LL_SW_LLCP_IMPL
default BT_LL_SW_LLCP_LEGACY if !ZMK_BLE_EXPERIMENTAL_FEATURES default BT_LL_SW_LLCP_LEGACY if !ZMK_BLE_EXPERIMENTAL_CONN
endchoice endchoice
config BT_CTLR_PHY_2M config BT_CTLR_PHY_2M
default n if ZMK_BLE_EXPERIMENTAL_FEATURES default n if ZMK_BLE_EXPERIMENTAL_CONN
# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI # BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI
config BT_TINYCRYPT_ECC config BT_TINYCRYPT_ECC

View file

@ -8,10 +8,10 @@
/ { / {
chosen { chosen {
zmk,kscan = &kscan0; zmk,kscan = &settings_reset_kscan;
}; };
kscan0: kscan { settings_reset_kscan: settings_reset_kscan {
compatible = "zmk,kscan-mock"; compatible = "zmk,kscan-mock";
columns = <1>; columns = <1>;
rows = <0>; rows = <0>;

View file

@ -9,8 +9,10 @@ See [Configuration Overview](index.md) for instructions on how to change these s
## Kconfig ## Kconfig
| Option | Type | Description | Default | | Option | Type | Description | Default |
| -------------------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | -------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES` | bool | Enables a combination of settings that are planned to be default in future versions of ZMK. This includes changes to timing on BLE pairing initation, BT Secure Connection passkey entry, restores use of the updated/new LLCP implementation, disables 2M PHY support, and allows overwrite of keys from previously paired hosts. | n | | `CONFIG_ZMK_BLE_EXPERIMENTAL_CONN` | bool | Enables a combination of settings that are planned to be default in future versions of ZMK to improve connection stability. This includes changes to timing on BLE pairing initation, restores use of the updated/new LLCP implementation, and disables 2M PHY support. | n |
| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts) | n | | `CONFIG_ZMK_BLE_EXPERIMENTAL_SEC` | bool | Enables a combination of settings that are planned to be officially supported in the future. This includes enabling BT Secure Connection passkey entry, and allows overwrite of keys from previously paired hosts. | n |
| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y | | `CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES` | bool | Aggregate config that enables both `CONFIG_ZMK_BLE_EXPERIMENTAL_CONN` and `CONFIG_ZMK_BLE_EXPERIMENTAL_SEC`. | n |
| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts.) | n |
| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y |