When Python's disconnect callback fires but the driver layer (Android/Kotlin) maintains or quickly re-establishes the GATT connection, data was being dropped because address_to_identity was cleared. Changes: - Add _identity_cache with 60-second TTL to preserve identities after disconnect - Cache identity in _device_disconnected_callback before cleanup - Check cache in _handle_ble_data and restore identity if found - Add on_address_changed callback for dual connection deduplication - Add _address_changed_callback to migrate identity mappings - Support driver.request_identity_resync() for fallback recovery This fixes the "no identity for peer X, dropping data" warning that occurred when the Python layer lost track of a peer that was still connected at the driver level. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| BLEAgent.py | ||
| BLEFragmentation.py | ||
| BLEGATTServer.py | ||
| BLEInterface.py | ||
| bluetooth_driver.py | ||
| linux_bluetooth_driver.py | ||