WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] Blueman error in Pi-400, picore-13.0.3  (Read 3566 times)

Offline tcl_user5

  • Newbie
  • *
  • Posts: 34
[Solved] Blueman error in Pi-400, picore-13.0.3
« on: July 15, 2022, 03:51:37 PM »
I have installed Blueman on Pi-400 (picore-13.0.3). When I try to run it with blueman-manager, I am getting the following error and Bluetooth does not start.
"blueman-manager version 2.1.3 starting,
Stale PID, overwriting
Segmentation fault"

I have loaded the following bluetooth related extensions onboot:-
1) firmware-rpi-bt
2) blueman
3) bluez-tools
4) bluetooth-5.10.77-piCore-v71


« Last Edit: July 23, 2022, 12:10:03 PM by Rich »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #1 on: July 16, 2022, 10:37:53 AM »
Did you check bluetoothd was running?

Did you try starting blueman-manager/blueman-applet from a terminal window?

Do you see the same problem with piCore64?
« Last Edit: July 16, 2022, 10:53:39 AM by Juanito »

Offline tcl_user5

  • Newbie
  • *
  • Posts: 34
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #2 on: July 17, 2022, 01:05:49 AM »
(1) I tried bluetoothctl in terminal window. I got the message- trying to connect to bluetoothd but nothing happens subsequently.

(2) I had tried blueman-manager from terminal window. The reported error of ""blueman-manager version 2.1.3 starting, Stale PID, overwriting Segmentation fault" was received in response to the blueman-manager command.

(3) I tried piCore64. The same problem is NOT there. In response to blueman-manager, it asks whether bluetooth should be automatically turned on.
However, I am getting a different error (adapter not found) in piCore64 after saying yes to above question. Pl see attachment.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #3 on: July 17, 2022, 01:26:42 AM »
It sounds like you need:
Code: [Select]
sudo /usr/local/etc/init.d/bluez start

Offline tcl_user5

  • Newbie
  • *
  • Posts: 34
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #4 on: July 17, 2022, 01:50:21 AM »
(1) I have already done that at startup.

/usr/local/etc/init.d/bluez start
/usr/local/etc/init.d/dbus start

is included in /opt/bootsync.sh

(2) Does bluetooth have to be enabled by some setting in cmdline.txt or config.txt ? I feel so since I am getting the message of "No default controller available" on using bluetoothctl.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #5 on: July 17, 2022, 02:12:36 AM »
You don’t need to start dbus, the bluez init.d will start it.

What does this give:
Code: [Select]
ps aux | grep blue

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #6 on: July 17, 2022, 03:45:29 AM »
Sorry - I'd forgotten that several bluetooth startup commands are required on piCore/piCore64.

The bluez extension info file gives details.

I used an old script (see attached) after loading bluez and blueman using an RPi4 running piCore64 and was able to pair with another device using blueman.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1240
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #7 on: July 18, 2022, 08:22:47 AM »
That script should work.  There have been recent tweaks to the startup.   It is based on RaspiOS bluetooth.   Which is in this repo:  https://github.com/RPi-Distro/pi-bluetooth


Offline tcl_user5

  • Newbie
  • *
  • Posts: 34
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #8 on: July 18, 2022, 08:55:10 AM »
Hi Juanito,

(1) The script- bt_start.sh works properly on RPi-400 running PiCore64. Thanks for sharing the same.

(2) However, the script does not work on the same device while running on Picore-13.0.3. It throws up an error of being unable to load the bluetooth module (modprobe: can't load bluetooth (kernel.tclocal/net/bluetooth/bluetooth.ko) : unknown symbol in module, or unknown parameter)

P.S- On PiCore64, after running the script, I was able to connect the RPi-400 to a bluetooth speaker. But unable to test audio ouput on the paired device as I was not getting any audio output in the RPi-400. While trying to play a video on Firefox, pavucontrol was relaying sound to "Dummy output". I am trying to fix the same (read suggestions of setting hdmi_drive = 2 in config.txt). So, I will update after testing audio output on the paired Bluetooth device.

Strangely, while running Picore-13.0.3, I was able to get audio output on the same RPi-400 device through attached speakers on a Samsung TV monitor connected using HDMI. The same setup was not giving audio output with PiCore64. I wonder why..

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #9 on: July 18, 2022, 09:46:46 AM »
It throws up an error of being unable to load the bluetooth module (modprobe: can't load bluetooth (kernel.tclocal/net/bluetooth/bluetooth.ko) : unknown symbol in module, or unknown parameter)

It looks like the bluetooth-KERNEL extension in piCore is missing a kernel module - "modinfo bluetooth" will give the dependencies, which you can modprobe one by one to find which one is missing.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #10 on: July 18, 2022, 12:09:58 PM »
Ah - it looks like bluetooth-5.10.77-piCore-v7l is missing the following:
Code: [Select]
usr/local/lib/modules/5.10.77-piCore-v7/kernel/crypto/ecdh_generic.ko
usr/local/lib/modules/5.10.77-piCore-v7/kernel/crypto/ecc.ko

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #11 on: July 19, 2022, 03:30:50 AM »
Updated bluetooth-5.10.77-piCore-v7l posted.

Offline tcl_user5

  • Newbie
  • *
  • Posts: 34
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #12 on: July 19, 2022, 03:52:06 AM »
I was able to fix the issue of no audio output ("Dummy output" in pavucontrol) in RPi-400 by changing the "dtoverlay=vc4-kms-v3d" setting in config.txt to "dtoverlay=vc4-fkms-v3d". Now, I am able to get audio output through HDMI when connecting to a Samsung TV monitor with speakers.

After running the bt_start.sh script shared by Juanito, Bluetooth pairs properly when running PiCore64. However, there is no audio output on the Bluetooth device (headphone). Audio output continues to be sent over HDMI after pairing.

Other users may kindly confirm whether they are able to get audio output on bluetooth device after pairing in RPi-400.

Either I am missing setting some parameter in config.txt or there is some issue in the way pavucontrol is interacting with Blueman in Picore64. I mention this issue since in TinyCorePure64, after pairing with bluetooth device, pavucontrol displays bluetooth device and inbuilt speaker modes out of which you can toggle any option. Similar option is not seen after bluetooth pairing in PiCore64.

Just to rule out any hardware issues, I checked using Raspberry Pi OS and sound works fine on HDMI output and Bluetooth devices on the same RPi-400 device with a toggle option similar to what I mentioned above.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14791
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #13 on: July 19, 2022, 05:36:47 AM »
I believe the hdmi audio output depends on the order in which extensions are loaded - graphics-KERNEL would need to be loaded before the audio/bluetooth extensions.

Using dtoverlay=vc4-kms-v3d and an RPi4 running piCore64, audio will switch between the audio jack and bluetooth headphones without problems (see attached) - I don't have an hdmi connected audio device to test.

Edit: I managed to test hmdi audio - it works.
« Last Edit: July 19, 2022, 05:44:48 AM by Juanito »

Offline tcl_user5

  • Newbie
  • *
  • Posts: 34
Re: Blueman error in Pi-400, picore-13.0.3
« Reply #14 on: July 21, 2022, 05:05:40 AM »
On Pi-400 running PiCore64, I am getting HDMI audio output (on TV monitor) properly. I am not getting audio output on paired bluetooth device.

In the playback tab of Pavucontrol, I am not able to toggle between HDMI and Bluetooth. Even when HDMI audio output is set to zero level or source in Pavucontrol changed to "Off", HDMI sound continues to play at the same audio level.

This makes me feel that I am missing some boot/configuration parameter which needs to be set for making audio work on bluetooth and audio is going to HDMI output by default.

I tried adding snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_a2dp=1 snd_bcm2835.enable_hdmi=1 to cmdline.txt. But it
has not helped. (I am not sure about snd_bcm2835.enable_a2dp being the right parameter, I used it similar to snd_bcm2835_hdmi and a2dp being the bluetooth sink). Kindly advise if these parameters need to be added in the first place for getting audio on bluetooth and whether they are correct.

I am also attaching my config.txt, cmdline.txt  just to ensure I am not missing anything basic. My onboot.lst is as follows
Code: [Select]
openssh.tcz
Xorg.tcz
aterm.tcz
wbar.tcz
flwm.tcz
firmware-rpi-bt.tcz
alsa.tcz
bluez.tcz
firefox.tcz
blueman.tcz
libpci.tcz
pavucontrol.tcz