Bluetooth Speaker support with Bluez 4.101 - bluetooth

I would like to know if audio streaming using external bluetooth speaker is supported with bluez 4.101.
I have tried the same using bluez 5.43 on Raspberry Pi and it works well with bluetoothctl and aplay.
However,I could not find bluetoothctl in bluez 4.101 and on connecting with rfcomm command, I am unable to stream music even when the speaker is connected.
Finally, I need to bring in the streaming feature on OpenWRT platform, so it would be really helpful if anyone could provide any leads on this.

Related

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.

How to handle voice from Bluetooth?

I am working on a Raspberry pi based embedded project which turn a raspberry pi to a bluetooth based voice processing system. I have a BLE mic and BLE receiver connected to the RPI, I have BlueZ integrated to my stack. I am able to connect both together. But the problem I am facing now is in handling Audio from the mic. I don't have ALSA or pulse audio in my system. Is there a way to get PCM data from the bluez stack directly? it would be helpful if there is a architecture for handling voice with BLE.

Do i need Bluez when using a bluetooth dongle

i am new to Linux and Bluetooth. i know that the standard implementation of the bluetooth protocol stack is bluez. I know that alsa is not supporting bluez anymore and if you want to use audio over bluetooth, you need pulseaudio. so pulseaudio should support HSP/HFP since version 6 and bluez 5.x. Know i was wondering if i can connect a usb-dongle to my hardwareboard (raspberryPi) there is a serial connection to the board. is that right? so the Dongle has the BT-STack and you can use alsa audio over USB like an USB HEadset?
i hope someone can help me.
The answering this vast addressable question is not that easy. I have few hints which will help you to narrow down.
BlueZ is user layer stack to communicate or use the functionality of Linux Kernel Bluetooth subsystem and provides helpers to developers.
USB Dongle itself doesn't have any stack and I don't really understand your question in that sense. To brief, USB Bluetooth Dongle is just the hardware device with Bluetooth functionalities. To make it functional, you need Linux Kernel Bluetooth system support enabled and either you can directly make use of "socket" system calls to pair,connect etc., or use BlueZ to develop applications with API's
BlueZ itself doesn't provide API's for developers, instead it makes use of the DBus to provide methods, properties and signals with vast range functionalities. Check here
If you interested in Audio Playback using Bluetooth, then you should register your media player and audio sink with BlueZ with according media DBus Interfaces.
To add, I am currently developing a framework library to wrap the DBus functionality provided by BlueZ for friendly development of applications. Check this repo and it is currently in initial development phase.

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

Using Bluetooth low energy in linux command line

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.

Resources