PulseAudio Bluetooth Speaker crash on Raspberry Pi - linux

I just bought a JBL speaker, tested it on my phone and proceeded with this tutorial on my Raspberry Pi:
https://www.raspberrypi.org/magpi/bluetooth-audio-raspberry-pi-3/
I managed to pair and trust the speaker, but I can't connect to the device from bluetoothctl, only from audio settings.
Problem is, most of the times it doesn't work. I've managed to have audio for 3 seconds in a timespan of ... 4 hours.
This is where PulseAudio crashes:
E: [pulseaudio] bluez4-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.bluez.Manager" doesn't exist
I've tried a lot of things from forums, nothing worked.
Thank you for your help!

I had a similar problem, but then I used a USB bluetooth adaptor for connecting to my speaker, and now I get a nice stable connection all the time.
I can't be 100% sure that this will fix your problem, but give it a try. It seems that the built in bluetooth adaptor for rasp Pi 3 isn't great. I used an Asus adaptor, but if you need to buy one, you can find a list of the officially supported adaptors # https://www.raspberrypi.org/.
Stephen

Related

Receiving data from a BLE device to a raspberry Pi3

I never used a raspberry pi before and I have a project part of which includes receiving data from a BLE blood pressure device over Bluetooth to a raspberry pi 3. I can pair the device to my raspberry but I have no idea what to do next. I need to be able to receive the measurements in my raspberry please help and thank you in advance.
PS: the device I'm trying to use is very similar to this one:
https://ibb.co/71365k5
Thanks for your answers, I have tried "Gatt" and "Gatttool" but the problem is after pairing the device is meant to send the measurement to its application on an android phone, without it I cannot read the blood measurement characteristic or it just does not exist.
Linux uses BlueZ as a default bluetooth stack. It exposes DBus APIs for implementing software using Bluetooth.
If you don't want to use this API directly, which can sometimes feel a bit low level you have many libraries that wrap it, such as https://github.com/getsenic/gatt-python that also comes with examples.
All other solutions requires replacing the Bluetooth stack on Linux and hence your other existing Bluetooth pairings to the system will stop working.

Bluetooth dongle BLED112 on Debian 10 is not working

I just randomly found a Bluegiga BLED112 Bluetooth dongle and I tried to connect it to my Debian 10 laptop as a basic dongle for Bluetooth audio outs.
Unfortunately I wasn't able to solve all the issues I had, starting from the fact that the device is not fully listed once used lsusb and just a mere ID number - namely ID 2458:0001 - pops out and bluetooth or bluez helps weren't successful either.
This given, I tried to follow several of the guides you can find online, also by running available scripts, but again nothing worked.
So if it's possible, what should I do in order to run such a dongle for the basic use I mentioned above - i.e. just for connecting my stereo speakers to my computer?
Thanks
The BlueGiga BLED112 is not a regular Bluetooth USB dongle. It gives you a virtual com port that can be used to access an API that in turn acts as a BLE device.
It is ment to be used for development of IOT solutions.
Also it does not support Bluetooth Classic, it only supports Bluetooth Low Energy.

Raspberry's sound Bug with a bluetooth headphone

everybody!
I'm trying to connect my raspberry pi 3 bluetooth to my headset. However the sound bug. It's kind of intermittently cutting off quite randomly, which makes it sound terrible.
I'm using the Raspberry 3's built-in bluetooth with Pulseaudio on Raspberry Pi OS V4.19.
How do I fix it?
This sounds like the known issue. You might want to follow some of the issues that are open around this topic:
https://github.com/Arkq/bluez-alsa/issues/60
https://github.com/raspberrypi/linux/issues/1552
https://github.com/balenalabs/balena-sound/issues/62

Bluetooth HFP on the Raspberry Pi

i am trying to connect my raspi with a BT-Headset with the build in bluetooth. it is working with pulseaudio 5.0 and bluez 5.23.
But the thing is it just supports A2DP. i want to use it as a real Headset so i Need HFP. I read that bluez 5 doesnt Support this Profile anymore and with pulseaudio 5 and bluez 5.23 it wont work.
Now i got a bluetoothdongle with my Headset and if i am using the bluetoothdongle instead the buildin Bluetooth it is working. i can record Sound. But i get a better Audio Output with the build in (with dongle it is lagging) . Maybe it is because the dongle uses the hfp Profile directly and therefore the Audio ouput isnt that good anymore.
So i was wondering if this is gonna work with every Bluetoothdongle which supports the HFP/HSP Profile.
And my other question is how does pulseaudio and bluez work together. and how would the BT-dongle would work with pulseaudio together?
Bluez 4 supported hfp and hsp. pulseaudio 5 is backwards compatible so this would be an Option i think. does anyone has tried it?
thanks

usb_claim_interface() on Raspberry Pi

I'm trying to get a USB HID device to work on Raspberry Pi.
The code utilizes the RawHID lib for MacOSX/Linux/Windows.
I got it working on MacOSX, but for other reasons I can't use it on that OS anymore. Now I'm trying to get it to work on Raspberry Pi via hid_LINUX.c.
When I tried it out, it just completely fails to connect. I added the debug info, and found out it's failing here:
if (usb_claim_interface(u, i) < 0) {
printf(" unable claim interface %d\n", i);
continue;
}
I tried googling for ages and I see various things about...
modprobe.d blacklist (didn't work, although that looked for for rtl devices... not sure)
updating all packages (didn't work)
compiling your own version of libhid (I don't know why I'd have to do this, considering the creator of the USB device recommended this RawHID lib which uses libusb-dev (usb.h), and which works fine on OS X and Windows)
Does anyone have any possible ideas how I can proceed? How do I 'free' my USB device so I can claim it?
I have a Raspberry Pi B+
Apparently I can not comment (insufficient reputation) so I answer instead:
I finally found the reason for my problem with the comment "Now I solved it by just running the code with sudo rights" above, so I'm grateful!
I use a Pi 3b for Domoticz for > 3 years. (same software on PC before that) After a failed update, followed by a complete re-install, my CM15 Domoticz interface (connected via USB) would be recognized as present with lsusb, but would not work. I boot my PI from a USB key, so maybe the -very old- USB key failed, so I bought a new USB 3.0 key. No joy. USB 3.0 uses more power, maybe draining USB power from my CM15, so I bought a bigger supply. Did not solve the problem.So I bought a new memory card, no change.
Searching for "usb_claim_interface failed -6 mochad" brought me here for a correct diagnostic and the way to make it work "manually"
Not yet the solution; normally libusb starts the "interface" software (mochad) when it finds a new USB device connected, but "claiming it" apparently now requires more permissions. Now that I understand the problem, I'll find the answer.
Thanks much for showing the way dennis-tra!

Resources