Fix: Add missing tunnel registration for BLEPeerInterface
Problem: - BLEPeerInterface was spawning but never calling owner.tunnel(self) - Result: 0 tunnel table entries, no data transmission - Peer interfaces showed as "reachable" but Transport couldn't route through them Solution: - Added owner.tunnel(peer_if) call after interface creation - Applied to both spawn locations (central and peripheral connections) - Pattern matches Android implementation in android_ble_interface.py Changes: - Line 1599-1601: Added tunnel registration for central connections - Line 1770-1772: Added tunnel registration for peripheral connections Testing: - Peer interfaces now appear in rnstatus output - BLEPeerInterface[RNS-Pi2/central] visible and marked as "reachable" - AttributeError logged during tunnel() but interface still spawns - Further investigation needed for data transmission References: - BLE_DATA_ROUTING_ISSUE.md - Root cause analysis - BLE_SESSION_2025_10_31_PROGRESS.md - Detailed session notes - android_ble_interface.py:403 - Reference implementation 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
69b994af06
commit
effb98f7a7
1 changed files with 10 additions and 0 deletions
|
|
@ -1595,6 +1595,11 @@ class BLEInterface(Interface):
|
|||
|
||||
# Register with transport
|
||||
RNS.Transport.interfaces.append(peer_if)
|
||||
|
||||
# Register as tunnel for routing
|
||||
if hasattr(self, 'owner') and self.owner:
|
||||
self.owner.tunnel(peer_if)
|
||||
|
||||
self.spawned_interfaces[conn_id] = peer_if
|
||||
|
||||
RNS.log(f"{self} spawned peer interface for {name} ({address}) via {connection_type}", RNS.LOG_DEBUG)
|
||||
|
|
@ -1761,6 +1766,11 @@ class BLEInterface(Interface):
|
|||
|
||||
# Register with transport
|
||||
RNS.Transport.interfaces.append(peer_if)
|
||||
|
||||
# Register as tunnel for routing
|
||||
if hasattr(self, 'owner') and self.owner:
|
||||
self.owner.tunnel(peer_if)
|
||||
|
||||
self.spawned_interfaces[conn_id] = peer_if
|
||||
|
||||
# Create fragmenter using negotiated MTU from GATT server (if available)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue