From f759af46e73642fcc6993213497eaf114e4e226a Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Thu, 13 Nov 2025 17:27:48 -0500 Subject: [PATCH] fix: Filter out 1-byte keepalive packets from Columba Android peers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add filtering for Android Columba's 15-second keepalive packets to prevent unnecessary processing. Keepalive packets are 1 byte (0x00) and should be ignored by the BLE interface. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/RNS/Interfaces/BLEInterface.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/RNS/Interfaces/BLEInterface.py b/src/RNS/Interfaces/BLEInterface.py index 3f69599..b89dd69 100644 --- a/src/RNS/Interfaces/BLEInterface.py +++ b/src/RNS/Interfaces/BLEInterface.py @@ -1413,6 +1413,12 @@ class BLEInterface(Interface): """ RNS.log(f"{self} received {len(data)} bytes from peer {peer_address}", RNS.LOG_EXTREME) + # Filter 1-byte keep-alive packets from Columba (Android) peers + # Columba sends 0x00 every 15 seconds to prevent Android BLE supervision timeout + if len(data) == 1 and data[0] == 0x00: + RNS.log(f"{self} received keep-alive from peer {peer_address}, ignoring", RNS.LOG_EXTREME) + return + # Look up peer identity to compute fragmenter key peer_identity = self.address_to_identity.get(peer_address) if not peer_identity: @@ -1496,6 +1502,12 @@ class BLEInterface(Interface): """ RNS.log(f"{self} received {len(data)} bytes from central {sender_address}", RNS.LOG_EXTREME) + # Filter 1-byte keep-alive packets from Columba (Android) peers + # Columba sends 0x00 every 15 seconds to prevent Android BLE supervision timeout + if len(data) == 1 and data[0] == 0x00: + RNS.log(f"{self} received keep-alive from central {sender_address}, ignoring", RNS.LOG_EXTREME) + return + # Check if we have peer identity peer_identity = self.address_to_identity.get(sender_address)