-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
DietPi-Config | Support USB Bluetooth on RPi #3611
Comments
Since you're on RPi1 without internal BT but with a BT dongle, it is connected via USB and not via UART, hence you don't need to enable the UART device or hciuart.service, nor install Little research: https://rasspberrypi.wordpress.com/2012/09/03/install-bluetooth-dongle-on-raspberry-pi/
Probably we need to change dietpi-config to differentiate between RPi devices with and without internal Bluetooth. |
Thanks @MichaIng, tried your suggestion and it works (did a scan and found my phone). The hciuart service didn't need to be disabled as it was removed (I guess by purging pi-bluetooth package). Tomorrow I'll see if I can get that BT link up and running with the Jabra speaker :-) |
Ah yes that makes sense.
Would be great. I'll add generic Bluetooth support then for all devices where we don't know about an internal solution. Long-term also for the ones with internal BT it would be nice to allow usage of a USB adapter, a bid like you can disable internal WiFi but still enable general WiFi. |
Using bluetoothctl I'm not able to connect to the speaker unfortunately:
Any ideas? I managed to pair it, but it's not establishing a connection Edit: Tried to remove and re-pair, I get the jabra prompt briefly and then it seems to discconect:
This is the dongle I use: https://www.aliexpress.com/item/32686102148.html?spm=a2g0s.9042311.0.0.3df24c4dDNYkA9 I bought the rounded end, BT4.0 one |
Probably Do |
Nothing BT related in dmesg, but lots of errors in journalctl for bt:
Rebooted and tried to connect:
And also:
Also, when manually starting pulseaudio, it is complaining that it is running as root, should I make a new non-root user and run it through that user? When I start pulseaudio and then try to connect with bluetoothctl it seems to work briefly. Then the connection drops and when I exit bluetoothctl I see pulseaudio also terminated. Some more logging:
Seems when I pause audio (i.e. Spotify with Spotify Connect through Spotty on LMS and squeezelite on the pi1) after a few seconds I get that disconnection. When I start pulseaudio (always running without arguments), then connect to the speaker and then never start audio playback, it looks like pulseaudio and the BT connection is staying alive (at least for 5 minutes and counting). If I then start audio playback, it streams (haven't tested if it indefinitely stays alive), when I pause playback, pulseaudio stops. Any arguments I should run pulseaudio with? |
Ah, I am dumb, Bluez does not support ALSA natively since v5, but you can install it: https://github.com/Arkq/bluez-alsa The alternative is indeed to go with PulseAudio and use the related Bluetooth module: https://packages.debian.org/buster/pulseaudio-module-bluetooth |
Thanks for the hint, I'll give it a try today or tomorrow and report back. EDIT: Compiled and installed bluez-alsa, it seems stable now. One thing I did notice was that sqeezelite service was not running after a reboot, not sure if it is related but I've never seen it not running before. I rebooted a second time and again squeezelite was not running. Any reason for the 10s delay in the settings? Seems quite long. Now it seems I still need to add a service entry in systemd for bluealsa to run with root at boot time, do you perhaps have an example on what should go into the service file to get this running from boot? Many thanks @MichaIng for the amazing support 👍 |
Please check:
In which settings you mean?
The official docs about it look very complete, including ondemand activation via dbus 👍: https://github.com/Arkq/bluez-alsa/wiki/Systemd-integration |
Nothing out of the ordinary
I did a systemctl enable squeezelite and it created a symlink, for some reason the service was disabled at boot. I guess we can disregard this ;-) The 10 second setting is from the issue you linked to, your comment: #3456 (comment) Thanks for the link to the systemd integration, must've missed that one. |
Ah actually
If you see |
I'm not sure where to see the log line with the "DietPi-Services start" part. The service status is this which looks OK:
|
When you run |
For reference, the output ;-)
Strange that it say it's booting it. And maybe a different thing but I notice avahi is started, yet when I do anything with sudo I get the following:
|
Very strange, how did you set this hostname? Is it added to loopback address (127.0.1.1) via |
Ah there is actually a bluealsa package available on the RPi repo:
So no need to compile oneself and it ships with a default ALSA config, systemd unit and all this. Even available for all other archs, so we could use this and implement Bluetooth audio into |
Whoops, didn't see your post there. For me this ticket can be closed, so far the BT connection and squeezelite for Spotify playback with LMS > Squeezelite > Jabra over BT dongle connection --> works great. |
I'll keep the issue open as a request/ToDo to add USB Bluetooth support natively to About the hostname, could you paste the output of:
or
|
Appending local loopback with the mdns name fixes the message. |
Jep, replacing |
This resolves the issue that UART-based Bluetooth is attempted to be enabled on non-onboard WiFi/BT RPi models: 702b976 Bluetooth audio support is a dedicated question and requires bluealsa as shown above. This is handled now here where some more info has been accumulated: #3456 |
Nearly 2025 and BT is still elusive on DietPi... Wow! I've spent the last 4 days attempting to get DietPi to work on a Raspberry Pi 3B and a Pi 4. What an absolute waste of time. I feel like I've been in hell for the last 4 days. I hope you guys can fix it cause using a Pi as an audio player is a pretty simple project. But w/o BT, it's worthless. Moving on to a different variant. Good luck getting this working! |
@Talk2Giuseppe If you want to use a Bluetooth speaker/audio device, as it requires additional software, please check this issue: #3456 |
Required Information
Linux skyspeaker 4.19.97+ #1294 Thu Jan 30 13:10:54 GMT 2020 armv6l GNU/Linux
Additional Information (if applicable)
Trying to get a BT dongle from AliExpress working on my rpi1 with Dietpi installed and have it connect to a Jabra speaker, to stream music rather than the 3,5mm jack (too much noise). I used dietpi-config to enable bluetooth. starting hciuart failed. I then tried a couple of suggestions from earlier issues but no luck, I do not get a /dev/ttyAMA0
Assure related kernel modules are loaded: lsmod | grep -E '(bnep|btbcm)' <== Yes
Assure the serial device is available: ls -Al /dev/ttyAMA0 <== No
Assure any serial console + boot messages on this serial device is disabled:
/DietPi/dietpi/func/dietpi-set_hardware serialconsole disable ttyAMA0 <== Executed this
Reinstall related packages: apt install --reinstall bluez bluez-firmware pi-bluetooth <== Executed this
This is what the hciuart service spews out:
Any ideas?
Edit: Updated to dietpi 6.30.0, same issue.
The text was updated successfully, but these errors were encountered: