Bluetooth LE transport (unstable, in testing, WIP) #21

Merged
skobkin merged 4 commits from new_features into master 2026-02-11 06:48:58 +03:00
Owner

Summary

This PR introduces end-to-end Bluetooth LE transport support for MeshGo desktop and exposes it in the UI as Bluetooth LE (unstable) for field testing.

What’s Included

  • Added a new BLE transport implementation: internal/transport/bluetooth.go.
  • Wired BLE into transport factory/runtime flow (internal/app/connection_transport.go).
  • Extended config with BLE settings and validation:
    • connection.connector = bluetooth
    • connection.bluetooth_address
    • connection.bluetooth_adapter
  • Added BLE support to debug CLI:
    • --connector bluetooth
    • --bluetooth-address
    • --bluetooth-adapter
  • Updated app startup/status handling to recognize Bluetooth transport.
  • Added Bluetooth tools in Settings:
    • connector option renamed to "Bluetooth LE (unstable)"
    • manual address/adapter fields
    • Scan button with result picker (select device -> autofill address)
    • Open Bluetooth Settings button (Linux/Windows)
  • Added Linux-specific hardening for D-Bus/BlueZ edge cases:
    • stale scan recovery
    • retry on in-progress scan
    • connect retry with discovery on specific BlueZ object/method failure
  • Extracted shared Bluetooth error classification into:
    • internal/bluetoothutil/errors.go

Testing

Added/updated tests for:

  • config validation
  • transport factory behavior
  • BLE transport helpers
  • Bluetooth scan/sorting/selection logic
  • Bluetooth OS settings launcher
  • UI initial status handling
  • debug CLI target formatting
  • shared Bluetooth error helpers

Notes

  • This is intentionally marked unstable in UI for broader hardware/OS testing.
  • Pairing is still OS-driven; app currently provides settings shortcut and scan/selection UX.
## Summary This PR introduces end-to-end Bluetooth LE transport support for MeshGo desktop and exposes it in the UI as Bluetooth LE (unstable) for field testing. ## What’s Included - Added a new BLE transport implementation: internal/transport/bluetooth.go. - Wired BLE into transport factory/runtime flow (internal/app/connection_transport.go). - Extended config with BLE settings and validation: - `connection.connector` = `bluetooth` - `connection.bluetooth_address` - `connection.bluetooth_adapter` - Added BLE support to debug CLI: - `--connector bluetooth` - `--bluetooth-address` - `--bluetooth-adapter` - Updated app startup/status handling to recognize Bluetooth transport. - Added Bluetooth tools in Settings: - connector option renamed to "Bluetooth LE (unstable)" - manual address/adapter fields - Scan button with result picker (select device -> autofill address) - Open Bluetooth Settings button (Linux/Windows) - Added Linux-specific hardening for D-Bus/BlueZ edge cases: - stale scan recovery - retry on in-progress scan - connect retry with discovery on specific BlueZ object/method failure - Extracted shared Bluetooth error classification into: - `internal/bluetoothutil/errors.go` ## Testing Added/updated tests for: - config validation - transport factory behavior - BLE transport helpers - Bluetooth scan/sorting/selection logic - Bluetooth OS settings launcher - UI initial status handling - `debug` CLI target formatting - shared Bluetooth error helpers ## Notes - This is intentionally marked unstable in UI for broader hardware/OS testing. - Pairing is still OS-driven; app currently provides settings shortcut and scan/selection UX.
skobkin self-assigned this 2026-02-11 06:44:05 +03:00
skobkin merged commit e315c6a5f9 into master 2026-02-11 06:48:58 +03:00
skobkin deleted branch new_features 2026-02-11 06:48:58 +03:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
skobkin/meshgo!21
No description provided.