feat: Add service UUID filter to BLE scanner for more efficient scanning
Filter BLE scanner to only detect devices advertising the Reticulum service UUID, reducing noise from non-Reticulum BLE devices and improving scan efficiency. Changes: - Pass service_uuids parameter to BleakScanner initialization - Only detects devices with our service UUID (37145b00-442d-4a94-917f-8f42c5da28e3) - Reduces callback invocations for irrelevant BLE devices Benefits: - More efficient scanning (fewer devices to process) - Less CPU usage processing non-Reticulum devices - Faster peer discovery 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
16d4cb8be9
commit
37d6a9fbec
1 changed files with 4 additions and 1 deletions
|
|
@ -653,7 +653,10 @@ class LinuxBluetoothDriver(BLEDriverInterface):
|
|||
scan_time = 1.0
|
||||
|
||||
self._log(f"🔍 Starting BleakScanner (power_mode={self.power_mode}, scan_time={scan_time}s, service_uuid={self.service_uuid})", "EXTRA")
|
||||
scanner = BleakScanner(detection_callback=detection_callback)
|
||||
scanner = BleakScanner(
|
||||
detection_callback=detection_callback,
|
||||
service_uuids=[self.service_uuid] if self.service_uuid else None
|
||||
)
|
||||
|
||||
try:
|
||||
self._log("🔍 Calling scanner.start()", "EXTRA")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue