I would like to stream my music through my Bluetooth speaker but PulseAudio can't see the speaker. When I open the sound settings (pavucontrol) I can't change the output device to my speaker since it's not displayed.
What I already checked
The speaker is paired and connected through the Bluetooth interface in GNOME. I verified the connection using the bluetoothctl tool and made sure that the device is connected and trusted by OpenSUSE.
I checked if PulseAudio can see the device through the command line using pactl list sources short and pactl list sinks short and it's not there either.
I verified if PulseAudio has the right Bluetooth addon installed and it has.
Removing the configuration in ~/.config/pulse doesn't help
This question: Pulseaudio not detecting bluetooth headset couldn't help me either.
It worked a couple months ago without any issue but now it doesn't. Any advice to force PulseAudio to recognize my Bluetooth speaker?
Setup:
UE Boom Bluetooth speaker
GNOME OpenSUSE Leap 15.0
Pulseaudio 11.1
BlueZ 5.48
Try these steps to resolve the bluetooth audio issue on Opensuse Linux- These would work in ubuntu and other linux too. I am running on Opensuse linux 15.
First comment out the line
load-module module-bluetooth-discover
by editing the
sudo vim /etc/pulse/default.pa
Now you would need to reboot after this change is done. After rebooting,
we configure the bluetoothctl by running the following sequence of commands in a terminal:
> pactl load-module module-bluetooth-discover
> bluetoothctl
>> power on
>> agent on
>> default-agent
>> discoverable on
>> scan on
scanon will return with the name of the bluetooth speaker along with a code in the format '11:11:11:11:11:11' - thats ur bluetoooth speakers id. Note that down and use it in the next command trust and connect.
>> trust 11:11:11:11:11:11
>> connect 11:11:11:11:11:11
>> scan off
Do not close this terminal.
And these are all thats required to connect to a bluetooth speaker/headphone.
YOu can put the above in a script say - connectbluettooth.sh and run it everytime you login.
Last step change the speakers settings, your applications uses by running the below command:-
pavucontrol - Change the default audio device to the bluetooth speaker.
You can see my bluetooth speaker - 'Juarez' set in the pavucontrol tool in the screenshot.
Related
My question is about Lichee Pi Zero board (based on Allwinner/Sunxi V3s SoC).
Initially I used pre-built Linux image (kernel 4.10.02), it has no built-in Wi-Fi support (for Realtek 8327BS chip), so I downloaded the latest kernel version from here and built it with the default settings.
LCD is ok, Wi-fi looks good too (LED is blinkikng), but I cannot use keyboard anymore - there is no reaction from OS, when I connect something to USB (no message and no input from keyboard).
Hardware is OK and works good with the old Linux image.
I have also tried the latest kernel from kernel.org with the same bad result.
Please help to understand the reason. I suppose bad settings, but HID supoort is enabled.
Update 1.
I establish connection through UART. As I see, some USB features are detected during boot:
I'm able to load some drivers using insmod also:
Unfortunately, Linux still does not recognize any USB Device. I have connected mouse, keyboard, hub, mass storage and got no reaction from OS. It looks like devices do not get power (there is no light from mouse).
Update 2.
The best way I have found at the moment is to use buildroot-licheepi-zero.
It's very easy to use:
make licheepi_zero_defconfig
make menuconfig (optional)
make
After many-hour wainting I got the sdcard.img. It includes all neccessary files (zImage, RootFS, u-boot.bin, etc) and could be placed to SD with linux dd or etcher.
Linux boots successfully, but you can use terminal only through UART, as there is no LCD output.
You can put LCD itself to work:
make uboot-menuconfig
make
BUT there is still no user login prompt on the LCD after boot. So I need to log in and put command through UART.
Please share suggestion if any.
Update 3.
The change below enables login prompt on LCD (and disables it through UART):
make menuconfig
Now we are able to use Wi-Fi:
insmod /lib/modules/4.14.14-licheepi-zero/kernel/drivers/staging/rtl8723bs/r8723bs.ko
ifconfig wlan0 up
edit file /etc/wpa_supplicant.conf to add your Wi-Fi SSID and PSK
wpa_supplicant -B -d -i wlan0 -c /etc/wpa_supplicant.conf
udhcpc -i wlan0
Connection is established now, we can ping and so on.
There is still the question - how to enable full-functional terminal both on LCD and UART.
Many thanks!
With regards,
Maksim
The best solution is to use Buildroot.
Please check updates at topic start for details.
I use Bluetooth headset that use Bluetooth version 4.1. When I connect with android it shows the battery status. But with Linux (Ubuntu 18.04) I cannot get battery status. I tried with bluetoothctl, looking file in /sys/class/power_supply as in other questions, But they didn't help me.
askubuntu.com/questions/53880/is-there-any-way-to-check-the-battery-percentage-of-apple-wireless-peripherals
stackoverflow.com/questions/49078659/check-battery-level-of-connected-bluetooth-device-on-linux
My bluetooth device don't use GATT profile. It uses A2DP sink for streaming audio.
I looked Bluez documentation. They all said is do with GATT profile and get the attributes.
Is there a way to read battery status even with pragmatically in Linux properly? How does android device get the battery status? Is it a weakness of Linux Bluetooth stack?
Since this pull request by Dmitry Sharshakov, PipeWire has support for reporting battery status (with devices that use Apple HFP AT commands). It uses bluez's Battery Provider API, which is still experimental and is only available if bluetoothd is started with the -E flag.
On Arch Linux, it should be enough to run
cp /usr/lib/systemd/system/bluetooth.service /etc/systemd/system/
sed -i -r 's/ExecStart=.+/& -E/' /etc/systemd/system/bluetooth.service
systemctl daemon-reload
systemctl restart bluetooth
And the headset battery level should appear. To get the battery level programatically, you can then use UPower's DBus API.
I'm trying to get the onboard Broadcom bluetooth working in a Buildroot 2017.08 built linux on the Raspberry Pi Zero W. It's not showing me the adapter. Bluetooth USB dongles do work.
Things I've already done:
Added rpi-bt-firmware
Added Bluez-tools and Bluez5-utils
Kernel compiled with all sorts of Bluetooth support
Loaded bluetooth modules: bluetooth, bnep, btbcm, hci_uart
rfkill list (shows no bluetooth devices)
rfkill unblock bluetooth (just in case)
After boot I'm manually starting bluetoothd followed by bluetoothctl.
when I type "power on", "list" or "show" it does not give me any bluetooth controllers.
The hardware is working, on the same system I have Debian Jessie working fine with the bluetooth.
Also, given that USB bluetooth dongles work, I think the kernel is OK too.
What could possibly be the problem here??
Anything I could try to troubleshoot??
Anything I could install or add to make it work??
Anything is welcome at this point! :)
UPDATE
I have it working by running hciattach /dev/ttyAMA0 bcm43xx 921600 flow - at start-up. However, I have barely a clue what's going on here. Proper explanation will count as an answer.
I have also removed console=/dev/ttyAMA0 from the cmdline.txt, not sure though if that was necessary.
hciattach attaches serial HCI devices via UART to Bluez stack https://www.systutorials.com/docs/linux/man/8-hciattach/.
In your case the serial Broadcom HCI adapter is at /dev/ttyAMA0, so the command your run attaches it to Bluez as a bcm43xx HCI adapter.
Its probably done the same in your Debian Jessie setup.
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
I am working on using the Bluetooth low energy modem with Linux. I am using the command line option for that i.e. hcitool . I am able to the find the devices using the command: $ hcitool scan
It is working fine for me, also I am able to broadcast my device using :
sudo hciconfig hci0 leadv
It is also working fine. But I want to add the services and characteristic to the modem device which can be detected by other device. I have tried sdptool add but it is not working for me. Does anyone know how to add the services and characteristics to the peripheral using the command line tools in ubuntu?
Edit: My modem is broadcasting but not able to explore the services and characteristic to the other BLE device. Now I am able to set the name of device using hcio name command
Edit: Now I am able to render the services and characteristic, by simultaneously running sudo hcidump command. But I am not able to track from where I am getting those services and characteristics. One definite observation is those services are rendering from the machine.
SDP is absent in BLE. Broadcast/advertise frame and GATT client/server are used instead.
Several links:
BlueZ gatttool: command line tool to run common GATT procedures
BlueZ GATT's ready profiles
hint: DBUS
GATT and DBUS example
How can I connect to the FitBit Zip over Bluetooth 4.0 LE on Linux with bluez?
Bluetooth Low Energy: listening for notifications/indications in linux
http://comments.gmane.org/gmane.linux.bluez.kernel/29547
I used to broadcast BT services by following this article. This page not only shouws you how to advertise a profile, but also gives you an example on how to implement the HSP profile.
To know the bt class you need to announce, you can check this other page.