Skip to content

Commit 57b970c

Browse files
committed
Merge dev-v1.5.5 into main for v1.5.5 release
2 parents ec2b22e + 0deb805 commit 57b970c

File tree

5 files changed

+214
-236
lines changed

5 files changed

+214
-236
lines changed

RELEASE_NOTES_v1.5.4.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

RELEASE_NOTES_v1.5.5.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Release Notes v1.5.5
2+
3+
## Bug Fixes
4+
5+
- **Fixed thread safety race conditions**: Six pairing/polling state fields were accessed across threads without mutex protection, risking missed IRK captures on dual-core ESP32 variants.
6+
- **Fixed 32-bit timer overflow**: Absolute timer comparisons would fail after ~49.5 days of uptime. All timer checks now use wraparound-safe arithmetic.
7+
- **Fixed post-disconnect IRK lookup**: Used the event's embedded connection descriptor instead of `ble_gap_conn_find`, which could fail after NimBLE removed the descriptor.
8+
- **Fixed config defaults mismatch**: Python schema defaults now match the intended C++ behavior (`continuous_mode=true`, `max_captures=10`).
9+
- **Fixed BLE name validation**: Compile-time limit reduced from 29 to 12 bytes to match the runtime Samsung S24/S25 compatibility constraint.
10+
11+
## Improvements
12+
13+
- IRK cache size now scales with `max_captures` setting instead of being hardcoded to 10.
14+
- Replaced `esp_restart()` with `App.safe_reboot()` to avoid watchdog timeouts on profile change.
15+
- Consolidated `dump_config` output into a single log line, removing `vTaskDelay` workarounds.
16+
- Replaced magic number for NimBLE DHKey error with a named constant.
17+
- Simplified `is_valid_irk`, MAC generation, and NVS health check logic.
18+
- Added input validation for BLE profile select to reject invalid values.
19+
- Removed unused `on_auth_complete` method and `to_hex_fwd` dead code.

components/irk_capture/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818

1919

2020
def validate_ble_name(value):
21-
"""Validate BLE name length (BLE spec: max 29 bytes for advertising packet)"""
21+
"""Validate BLE name length (12 bytes max for Samsung S24/S25 compatibility)"""
2222
value = cv.string(value)
23-
if len(value.encode("utf-8")) > 29:
23+
if len(value.encode("utf-8")) > 12:
2424
raise cv.Invalid(
2525
f"BLE name too long ({len(value.encode('utf-8'))} bytes). "
26-
f"Maximum 29 bytes for BLE advertising packet. Shorten your name."
26+
f"Maximum 12 bytes for Samsung S24/S25 compatibility with "
27+
f"single-UUID advertising. Shorten your name."
2728
)
2829
return value
2930

@@ -59,8 +60,8 @@ def validate_continuous_mode_config(config):
5960
cv.GenerateID(): cv.declare_id(IRKCaptureComponent),
6061
cv.Optional(CONF_BLE_NAME, default="IRK Capture"): validate_ble_name,
6162
cv.Optional(CONF_START_ON_BOOT, default=True): cv.boolean,
62-
cv.Optional(CONF_CONTINUOUS_MODE, default=False): cv.boolean,
63-
cv.Optional(CONF_MAX_CAPTURES, default=1): cv.int_range(min=0, max=255),
63+
cv.Optional(CONF_CONTINUOUS_MODE, default=True): cv.boolean,
64+
cv.Optional(CONF_MAX_CAPTURES, default=10): cv.int_range(min=0, max=255),
6465
}
6566
).extend(cv.COMPONENT_SCHEMA),
6667
validate_continuous_mode_config, # Cross-field validation

0 commit comments

Comments
 (0)