|
1 | 1 | # Release Notes v1.5.7 |
2 | 2 |
|
| 3 | +This release note reflects changes from `v1.5.6` to `v1.5.7`. |
| 4 | + |
3 | 5 | ## Boot Stability and GATT Reliability |
4 | 6 |
|
5 | 7 | - **Fixed Keyboard profile boot crash**: The Keyboard BLE profile was causing GATT registration to fail at boot because NimBLE rejects HID services with no characteristics. Added a minimal `HID Protocol Mode` characteristic (`0x2A4E`) to make the HID service structurally valid. |
|
16 | 18 | - **Fixed `irk_last_try_ms_` first-poll bypass**: The IRK poll interval guard was bypassed on the first poll because the timestamp initialized to 0. It is now set to `now_ms()` alongside `enc_ready_` when encryption completes. |
17 | 19 | - **Fixed `mac_rotation_retries_` and `mac_rotation_ready_time_` unprotected writes**: These members are now reset inside existing `MutexGuard` blocks, consistent with the documented threading model. |
18 | 20 | - **Made getters thread-safe**: `get_ble_profile()` and `get_ble_name()` now acquire `state_mutex_` before reading shared state. |
19 | | -- **Fixed `host_synced_` cross-core visibility**: Uses `std::atomic<bool>` to ensure the NimBLE task's write is visible to the ESPHome main loop on dual-core ESP32 variants. |
20 | 21 |
|
21 | 22 | ## Correctness Fixes |
22 | 23 |
|
|
25 | 26 | - **Fixed BLE name length silent truncation**: The `name_len` field is now clamped to 29 bytes with a warning log before the `uint8_t` cast. |
26 | 27 | - **Fixed `commit_err` misleading log**: NVS set and commit errors are now tracked with separate variables so the log accurately reports which operation failed. |
27 | 28 | - **Advertising switch state now reflects reality**: The advertising switch publishes the actual runtime state after start/stop attempts rather than echoing only the requested state. |
28 | | -- **NVS profile range validation**: Persisted BLE profile values are range-checked before `static_cast`, preventing undefined behavior from corrupted NVS data. |
29 | | -- **BLE name whitespace trimming**: `sanitize_ble_name()` trims leading and trailing spaces after character filtering. |
30 | 29 |
|
31 | 30 | ## Observability and Diagnostics |
32 | 31 |
|
|
40 | 39 |
|
41 | 40 | - **Removed dead code**: Unused helper `read_peer_bond_by_conn()`, unused constant `IRK_MIN_POLL_INTERVAL_MS`, unused local `adv_success`. |
42 | 41 | - **Replaced magic GAP event numbers with named constants** for readability and safer maintenance across ESP-IDF/NimBLE SDK variants. |
43 | | -- **Added explicit standard library includes**: Added `<string>`, `<vector>` to header and `<cstring>` to implementation, removing reliance on transitive includes. |
44 | 42 |
|
45 | 43 | ## Files Updated |
46 | 44 |
|
47 | 45 | - `components/irk_capture/irk_capture.cpp` |
48 | 46 | - `components/irk_capture/irk_capture.h` |
49 | 47 | - `ESPHome Devices/irk-capture-base.yaml` |
50 | 48 | - `ESPHome Devices/irk-capture-full.yaml` |
51 | | -- `ESPHome Devices/irk-capture-device-remote.yaml` |
52 | | -- `RELEASE_NOTES_v1.5.7.md` (this file; replaces `RELEASE_NOTES_v1.5.6.md`) |
| 49 | +- `RELEASE_NOTES_v1.5.7.md` |
| 50 | +- `RELEASE_NOTES_v1.5.6.md` (archived) |
| 51 | +- `RELEASE_NOTES_v1.5.5.md` (archived) |
0 commit comments