feat: enable BlueZ experimental mode by default to fix BLE connection issues
Fixes #3 BlueZ experimental mode is required for proper BLE connectivity. Without it, BlueZ attempts Classic Bluetooth (BR/EDR) connections instead of BLE (LE) connections, causing connection errors like "br-connection-profile-unavailable" and immediate disconnections after pairing. Changes: - install.sh: Automatically enables BlueZ experimental mode during installation - Detects BlueZ version (requires >= 5.49) - Creates systemd override to add -E flag to bluetoothd - Checks if already enabled to avoid duplicate configuration - Shows strong warning if user skips with --skip-experimental flag - Added --skip-experimental flag to opt-out (not recommended) - Updated help text to document new flag - tests/test_installer.sh: Added tests for experimental mode configuration - README.md: Documented BlueZ experimental mode in installation sections - Added to automated installation description - Added as required step in manual installation - Added troubleshooting section for BR/EDR connection errors - examples/config_example.toml: Added troubleshooting entry for BR/EDR errors The installer now: 1. Detects BlueZ version >= 5.49 (required for experimental mode) 2. Checks if already enabled (graceful skip) 3. Enables experimental mode by default unless --skip-experimental is used 4. Shows prominent warning if skipped (may cause BLE to break) 5. Handles edge cases (no systemd, old BlueZ, container environments) This addresses the root cause reported in issue #3 where devices were connecting then immediately disconnecting with BR/EDR profile errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
37d6302dd2
commit
0e00fbf2d6
4 changed files with 252 additions and 7 deletions
|
|
@ -253,6 +253,19 @@ power_mode = balanced
|
|||
# - Restart Bluetooth service (Linux: sudo systemctl restart bluetooth)
|
||||
# - Check device_name is not too long (max ~20 characters)
|
||||
#
|
||||
# 6. BR/EDR connection errors (br-connection-profile-unavailable, ProfileUnavailable):
|
||||
# IMPORTANT: This is the most common BLE connection issue!
|
||||
# - Symptoms: Devices connect then immediately disconnect, "ConnectDevice() unavailable" in logs
|
||||
# - Cause: BlueZ attempting Classic Bluetooth (BR/EDR) instead of BLE (LE) connections
|
||||
# - Solution: Enable BlueZ experimental mode (required for proper BLE connectivity)
|
||||
# Linux: sudo systemctl edit bluetooth
|
||||
# Add: [Service]
|
||||
# ExecStart=
|
||||
# ExecStart=/usr/lib/bluetooth/bluetoothd -E
|
||||
# Then: sudo systemctl daemon-reload && sudo systemctl restart bluetooth
|
||||
# - If you used install.sh, it should have enabled this automatically
|
||||
# - Verify: ps aux | grep bluetoothd (should show -E flag)
|
||||
#
|
||||
# For more troubleshooting, see README.md
|
||||
|
||||
# ============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue