ble-reticulum/src/ble_reticulum
torlando-tech 2694192d28 fix: consume duplicate identity handshake when identity already known via Kotlin callback
When Kotlin provides the identity via callback (from the identity characteristic read),
the address_to_identity mapping gets set BEFORE the 16-byte handshake data arrives
through _data_received_callback. Previously, _handle_identity_handshake would see the
identity already exists and return False, causing the 16-byte handshake data to be
passed to the reassembler where it fails with "Invalid fragment type 0xXX".

The fix checks if received 16-byte data matches the known identity and consumes it
silently if so. This prevents the handshake data from being misinterpreted as a
fragment.

Symptoms fixed:
- BLEReassembler: Invalid fragment type 0xc9 (first byte of peer identity)
- Messages not flowing even though connections appear established

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 13:09:56 -05:00
..
__init__.py refactor: rename package from RNS.Interfaces to ble_reticulum 2025-12-29 23:30:07 -05:00
BLEAgent.py refactor: rename package from RNS.Interfaces to ble_reticulum 2025-12-29 23:30:07 -05:00
BLEFragmentation.py refactor: rename package from RNS.Interfaces to ble_reticulum 2025-12-29 23:30:07 -05:00
BLEGATTServer.py refactor: rename package from RNS.Interfaces to ble_reticulum 2025-12-29 23:30:07 -05:00
BLEInterface.py fix: consume duplicate identity handshake when identity already known via Kotlin callback 2026-01-18 13:09:56 -05:00
bluetooth_driver.py fix: add identity cache to prevent data loss on reconnection 2025-12-30 12:38:08 -05:00
linux_bluetooth_driver.py fix(ble): prevent duplicate identity rejection from triggering blacklist 2026-01-17 16:19:06 -05:00