-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added bluetooth dongle support for Rpi4 users #21
Open
barrymac
wants to merge
32
commits into
stefanor:main
Choose a base branch
from
barrymac:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit b43ec97.
stefanor
reviewed
Feb 5, 2025
Thank you for looking at this! |
Thanks to you for creating it! I battled for quite some time before discovering some comments about the RPi4 bluetooth. So I tried a dongle and it just worked. |
Yeah, I'll admit that I use an external Bluetooth dongle too... But I just disable the internal one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Victron BLE Plugin: Raspberry Pi 4 Stability & Multi-Adapter Support
Summary
This update adds critical support for external Bluetooth adapters to address instability with Raspberry Pi 4's built-in Bluetooth hardware when used with Victron devices. Users can now select between adapters (e.g.,
hci1
for USB dongles) via SignalK UI to bypass Pi 4's unreliable native Bluetooth stack.Key Changes
🛠️ Pi 4 Hardware Workarounds
🪲 Why This Matters for Pi 4 Users
Pi 4's built-in Bluetooth:
➔ Fails to maintain stable GATT connections
➔ Causes packet loss with Victron devices
External dongles (e.g., CSR4.0/Plugable BT4LE) resolve these issues.
Full Changelog
Features
007d6c8
: Core Bluetooth adapter selection logic9471a9d
: UI configuration for adapter switchingee255ed
: Packet logging (size/timestamp/RSSI) for debuggingFixes & Stability
d9ba0c3
: Compatibility with Bleak 0.20+ APIs3e7aa1c
: Adapter selection via OS environment6a21b55
: Health monitoring and restart logicCode Quality
c62a146
/a911e39
: Type hint improvements4dcba99
: Reduced log noise for productionVerification Steps
hci1
→ Confirm logs show[DEBUG] Using Bluetooth adapter hci1
electrical.devices.*.deviceName
Tested Hardware: Raspberry Pi 4 (Buster) + Victron Orion XS/SmartShunt + Plugable USB-BT4LE dongle.
Requires:
bleak>=0.20.0