How do I switch BLE service off?

Hi All,

BLE does not work on my rpi5. It gives D-bus errors…
With systemctl disable it does not work… also restart=no in the .serve file does not work…

So… how doe I switch it off?

Cheers,

Maarten

PS:

Sep 28 14:42:37 zynthian systemd[1]: bluetooth.service: Scheduled restart job, restart counter is at 23.
Sep 28 14:42:37 zynthian systemd[1]: Stopped bluetooth.service - Bluetooth service.
Sep 28 14:42:37 zynthian systemd[1]: Started bluetooth.service - Bluetooth service.
Sep 28 14:42:37 zynthian bluetoothd[1774]: Bluetooth daemon 5.76
Sep 28 14:42:37 zynthian bluetoothd[1774]: D-Bus setup failed: Connection “:1.38” is not allowed to own the service “org.bluez” due to security policies in the configuration file
Sep 28 14:42:37 zynthian bluetoothd[1774]: src/main.c:main() Unable to get on D-Bus
Sep 28 14:42:37 zynthian systemd[1]: bluetooth.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 14:42:37 zynthian systemd[1]: bluetooth.service: Failed with result ‘exit-code’.

Found it…

change:
restart=never

in /etc/systemd/system/bluetooth.service

Cheers

Please raise a ticket in issue tracker and add your solution as a comment.

Hi Riban,

I think the Bluetooth install is not as it is intended… A library is missing when I try to re-install.
After re-installing this lib and re-installing Bluetooth, Bluetooth MIDI works OK :slight_smile:
So →

Re-install bluetooth

sudo apt -y install python3-docutils
/zynthian/zynthian-sys/scripts/recipes/install_bluez.sh

Cheers,

Maarten

I also get a Bluetooth error message.

Thanks to your instructions, I could deactivate Bluetooth.

Of course it would be better if it could be repaired.

Maybe there will be an update.

Hi @highsiderr ,

This worked for me.

Cheers Maarten

root@zynthian://zynthian# sudo service bluetooth status :
● bluetooth.service - Bluetooth service
Loaded: loaded (/etc/systemd/system/bluetooth.service; static)
Active: activating (auto-restart) (Result: exit-code) since Thu 2024-10-03>
Process: 2992 ExecStart=/usr/libexec/bluetooth/bluetoothd (code=exited, sta>
Main PID: 2992 (code=exited, status=1/FAILURE)
CPU: 4ms

Sorry, I still get the bluetooth error when I activate it.

This is recorded as issue 1214. I will take a look when I get a moment.

FYI: Bluetooth management was modified in Oram and tested against a small but varied range of devices. It is plausible that I installed or compiled dependancies on the test machine that didn’t get caught by the update mechanism. I will check with a freshly imaged machine and work through the issues. The suggested solution does not look familiar to me so maybe it installs a library or other dependancy that is required. We do not use the standard Debian Bluetooth applications as they are missing some important elements that we have added, specifically direct integration with jackd. Manually installing applications or libs may interfere with zynthian’s normal operation.

1 Like

I did some work on this issue and the specific reported issue which should be fixed in the next point release but during that investigation and testing I found some issues that will take longer to resolve.

The main discovery worth mentioning is that the Bluetooth adapter and antenna on the Raspberry Pi is pretty poor. It only just works with my uncased RPi5 less than a metre from a BLE MIDI device. When this gets put inside a metal case like the zynthian, it gets even worse. There is no particularly practical way to improve the onboard Bluetooth so I would suggest that, beyond using a nearby Bluetooth keypad or mouse, it is of little use.

You can however plug in a USB Bluetooth adaptor which should be recognised and offered as an alternative Bluetooth interface in the configuration menu. You can select only one adapter to be active but the selection should be remembered across restarts. I have a fairly low cost TP-Link UB500 (£10 at a UK high street store) which works very well. It is plugged into the zynthian USB port hence is outside the enclosure and works to many metres.

Some of the issues I discovered can make things rather frustrating but, if you keep it simple, get it working then leave it alone, it tends to work well.

So, for fairly low cost you should be able to get BLE MIDI (and other Bluetooth devices) working with zynthian that should work okay in the next point release and should get better in later releases.

2 Likes