zynthian / zynthian-issue-tracking

Centralized Issue Tracking for Zynthian Project
https://github.com/orgs/zynthian/projects/1
11 stars 3 forks source link

Issue:BLE MIDI does not work. A library is missing. #1214

Open maarthome opened 1 month ago

maarthome commented 1 month ago

Describe the issue

When BLE is witched on, an error is occuring and the automatic restarting is not helping.

SO:

Re-install bluetooth

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

This will solve the problem :-) Cheers, Maarten

Hardware

Raspberry Pi 5 Model B Rev 1.0
Audio: Generic USB device
Display: Generic HDMI/DSI Display
Wiring: CUSTOM
I2C: Not detected
Profile: V5_MDin

System

Debian GNU/Linux 12 (bookworm)
Build Date: 2024-09-11
Memory: 22% (912M/4045M)
SD Card: 13% (14G/114G)
Temperature: 49.4ºC
Overclock: Medium

MIDI & UI

Tuning: 440 Hz
Master Channel: Off
Preload Presets: On
ZS3 (SubSnapShots): On
Power Save: 10 minutes
Audio Levels on Snapshots: On

Software

zyncoder: oram (71de6d2) 
zynthian-ui: v5touch (1a55956)
zynthian-sys: oram (af3c24c)
zynthian-data: oram (ddfa009)
zynthian-webconf: oram (24eb349)
riban-bw commented 3 weeks ago

python3-docutils is an odd package to resolve this. I wonder whether it has another dependancy that it installs that actually resolves the issue.

Do you have the actual error and logs? I want to better understand the issue and implement a robust solution.

I did not experience an issue with RPi4 in V5 so maybe this is a RPi5 specific issue.

maarthome commented 3 weeks ago

Hi Brian,

I am sorry to perhaps confuse everybody. I do not have the loggings anymore... What I do know is that activating Bluetooth resulted in not being able to start the bluetooth service. Reinstalling bluetooth (via zynthian's script 'install_bluez.sh') did not work because a file/package was missing. I now, vaguely remember that 'rst2...' was missing. i looked up on the internet which package contained that file or package and installed it. After that the 'install_bluez.sh' script worked fine and my bluetooth, on indeed a PI5, works!

So you are absolutely right... the 'python3-docutils' is not needed in full. If you think it is usefull, I can install a fresh zynthian and generate the error message. But perhaps you know with this last info what the issue is.

Cheers,

Maarten

riban-bw commented 3 weeks ago

Thanks for the update. I will try to reproduce on my RPi5.

riban-bw commented 2 weeks ago

There is a dbus permission issue. Need to add a config, e.g. add a file called bluetooth.conf to /etc/dbus-1/system.d with content:

<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>

    <!-- allow root to send to agents -->
    <allow send_interface="org.bluez.Agent"/>
  </policy>

  <!-- allow users at the console, see consolekit or libpam-foreground -->
  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of bluetooth group to communicate with hcid -->
  <policy group="bluetooth">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>
riban-bw commented 2 weeks ago

This is fixed in Vanglesis (testing). Please validate.

riban-bw commented 2 weeks ago

I have validated that this resolves the original issue so will add to next point release. There remain issues with Bluetooth that should be reported and tracked on a different ticket.