Solvedpulseaudio modules bt PPA Ubuntu 19.10
✔️Accepted Answer
So more Docker hacking and I have the emulated bluetooth device functioning which results in a working systemd
controlled bluez service inside of a Docker container. I'm kind of surprised this actually works.
/tmp/bluez/emulator# ./btvirt -l 1 &
[1] 16400
/tmp/bluez/emulator# hciconfig -a
hci0: Type: Primary Bus: Virtual
BD Address: 00:AA:01:00:00:23 ACL MTU: 192:1 SCO MTU: 0:0
DOWN
RX bytes:0 acl:0 sco:0 events:35 errors:0
TX bytes:431 acl:0 sco:0 commands:35 errors:0
Features: 0xa4 0x08 0x08 0xc0 0x58 0x1e 0x7b 0x83
Packet type: DM1 DH1 HV1
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
/tmp/bluez/emulator# systemctl start bluetooth
/tmp/bluez/emulator# systemctl status bluetooth
* bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-12-26 09:22:56 UTC; 9s ago
Docs: man:bluetoothd(8)
Main PID: 16411 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4915)
Memory: 1.5M
CGroup: /system.slice/containerd.service/system.slice/bluetooth.service
-16411 /usr/lib/bluetooth/bluetoothd
Dec 26 09:22:56 systemd[1]: Starting Bluetooth service...
Dec 26 09:22:56 bluetoothd[16411]: Bluetooth daemon 5.50
Dec 26 09:22:56 systemd[1]: Started Bluetooth service.
Dec 26 09:22:56 bluetoothd[16411]: Starting SDP server
Dec 26 09:22:56 bluetoothd[16411]: Bluetooth management interface 1.14 initialized
/tmp/bluez/emulator# bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
I can now move on to building pulseaudio-modules-bt
with the instructions above
Other Answers:
Please save me from myself, Eoan support will be very welcome.
@non5ense, here, hold my
Could you please post the exact command set for this?
I read the main readme and ended up with these. It's possible you may need to troubleshoot other packages/modules you don't have available that I had already installed. This will probably fail in the cmake
or make
stages.
Note: Steps 1 and 2 may be superfluous if you already had it installed previously.
- Add existing repo to install some of the required libraries
sudo add-apt-repository ppa:eh5/pulseaudio-a2dp
- Change eoan to disco to install old packages
sudo vi /etc/apt/source.list.d/eh5-ubuntu-pulseaudio-a2dp-eoan.list # change eoan to disco
sudo apt update
sudo apt install pulseaudio libavcodec58 libldac pulseaudio-modules-bt
- Install build dependencies (these are the ones I needed that I didn't already have):
sudo apt install pulseaudio libavcodec58 libldac pulseaudio-modules-bt libbluetooth-dev libsbc-dev libpulse-dev git virtualenv build-essential python3-dev libdbus-glib-1-dev libgirepository1.0
sudo apt install pulseaudio libavcodec58 libldac pulseaudio-modules-bt libbluetooth-dev libsbc-dev libpulse-dev git virtualenv build-essential python3-dev libdbus-glib-1-dev libgirepository1.0-dev pkg-config libtool sbc-tools libtool cmake-dev pkg-config libtool sbc-tools libtool cmake
- Backup existing bluez/bluetooth modules:
sudo find /usr/lib -regex ".*\(bluez5\|bluetooth\).*\.so.bak"
- Checkout repo into a location you like building in and cd into that folder
git clone https://github.com/EHfive/pulseaudio-modules-bt.git
cd pulseaudio-modules-bt/
- The pa folder is a link to the official pulse audio repository. Update the pulseaudio submodule to point to the v13.0 tag of the pulse audio repo:
git submodule update --init
cd pa/
git stash (if you there is anything uncommited)
git fetch
git fetch --tags
git checkout v13.0
- Build the bluetooth modules
cd ..
mkdir build
cd build/
cmake ..
make
- Install the modules & restart pulseaudio
sudo make install
pulseaudio -k
pulseaudio --start
- I had to restart bluetooth service cause it was being silly and repair my headphones
sudo systemctl restart bluetooth
Enjoy the AptX/LDAC goodness, until it breaks again or the eoan
repo support is added by our developer overlords.
Built & packaged deb in case anyone needs it.
pulseaudio-modules-bt.zip contains pulseaudio-modules-bt_1.3-0~eoan0_amd64.deb
sudo add-apt-repository ppa:eh5/pulseaudio-a2dp
sudo vim /etc/apt/source.list.d/eh5-ubuntu-pulseaudio-a2dp-eoan.list # change eoan to disco
sudo apt update
sudo apt install pulseaudio libavcodec58 libldac pulseaudio-modules-bt
sudo dpkg -i pulseaudio-modules-bt_1.3-0~eoan0_amd64.deb
OK, some news. I was hacking around this afternoon and in the Bluez repo I found this directory:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/emulator
After building this with the --enable-testing
configuration flag, and running btvirt
, I managed to get a virtual bluetooth adaptor in my machine:
$ sudo hciconfig -a
[sudo] password for [me]:
hci1: Type: Primary Bus: Virtual
BD Address: 00:AA:01:00:00:23 ACL MTU: 192:1 SCO MTU: 0:0
UP RUNNING
RX bytes:0 acl:0 sco:0 events:61 errors:0
TX bytes:4935 acl:0 sco:0 commands:61 errors:0
Features: 0xa4 0x08 0x08 0xc0 0x58 0x1e 0x7b 0x83
Packet type: DM1 DH1 HV1
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: 'bxps #2'
Class: 0x1c010c
Service Classes: Rendering, Capturing, Object Transfer
Device Class: Computer, Laptop
HCI Version: 5.0 (0x9) Revision: 0x0
LMP Version: 5.0 (0x9) Subversion: 0x0
Manufacturer: Bluetooth SIG, Inc. (63)
bluetoothctl also shows this device as being present:
Controller 00:AA:01:00:00:23 mymachine #2 [default] < this is the virtual adaptor
Controller 9C:B6:D0:FF:5E:3C mymachine
Anyway, what this means is I will be able to run this binary to emulate bluetooth on my hosted server that doesn't have a bluetooth adaptor and automate the build using a privileged docker container that also has systemd installed. I should be able to generate binaries for each supported LTS and the current rolling release with specific containers for each.
So my next step is to create a repo to house the build scripts in and do some testing with the virtual BT adaptor with Docker. I should be able to satisfy the build tests @EHfive presented above all in Docker
After generating the debs for installation, I'll need to setup a PPA on launchpad, which I haven't done before and then create some post-deb build steps to publish the files directly to the PPA. Hopefully it will end up being a one click build and publish with the only intermission being dependency and build error debugging.
Anyway, thanks for all the work above, this is a great template for me to generate the debs for eoan
and avoid some of the errors I made with my manual install (on my work machine
Note: Another consideration, I'll probably only be able to test on x86_64 at this time. I'm guessing other archs like ARM will be difficult to test on an x86_64 machine :|
Ubuntu 19.10 is out. Will it be supported via PPA?