ble-reticulum/src/ble_reticulum
torlando-tech 622ccc7de4 fix(ble): update BLEPeerInterface.peer_address on MAC rotation
When BLE MAC address rotation occurs (same identity, different address),
the BLEPeerInterface.peer_address field was not being updated. This caused
sends to fail with "Cannot send - not connected" because Python was using
the stale address that no longer matched Kotlin's connectedPeers map.

This fix updates peer_address in all code paths where MAC rotation can occur:
- _mtu_negotiated_callback: when interface already exists for identity
- _handle_identity_handshake: when interface already exists for identity
- _address_changed_callback: when address migration is triggered
- _spawn_peer_interface: when reusing existing interface for new address

Fixes bidirectional BLE communication failure where peripheral could not
send data to central after MAC rotation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 16:45:37 -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(ble): update BLEPeerInterface.peer_address on MAC rotation 2026-01-13 16:45:37 -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 refactor: rename package from RNS.Interfaces to ble_reticulum 2025-12-29 23:30:07 -05:00