How to get pulseaudio-module-bluetooth

Hi / Ahoj

I would like to have omnia acting as bluetooth audio sink - to play audio from smartphone to usb-audio.

I have successfully configured pulseaudio and usb dac and i can play audio from my pc.

Now i need to install what other distributions call pulseaudio-module-bluetooth, but there is not such package.

I have tried to build it by buildroot starting at this site
but i was unsuccessful - i did not understand how to configure it to build it with this support.

Can someone give me some advice?

Thank you

Jakub Ladman

To compile only single package you might want to try to use pre-compiled OpenWRT SDK. It is sometimes kind of broken and I would suggest always extracting new version for new compilation, but on the other side it is much more faster than compiling whole OpenWRT and is less system dependent.

To have bluetooth support you have to recompile pulseaudio. Update feeds ./scripts/feeds update, copy directory feeds/packages/sound/pulseaudio to SDK packages directory, remove --disable-bluez flag in Makefile and ensure that files in bluetooth/* are installed in package. Also bump PKG_RELEASE to ensure that you are creating never version than you have in you router.

For more specific instructions about package creation see

Also you might want to try creating new packages from bluetooth/*, for example pulseaudio-bluetooth and push it to mainstream (we probably won’t accept patches for software that we don’t manage).

Ask if something I wrote wasn’t clear.

Thank you for a quick response.

This is route to point where i have been, i only didn’t the PKG_RELEASE bump.

But the build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.15_eabi/pulseaudio-8.0/ipkg-mvebu/pulseaudio-daemon/usr/lib/pulse-8.0/modules does not contain the needed bluetooth modules.

I guess that the bluetooth support was removed by configure script because some dependency is not fulfilled.
I have built the bluez package, but what’s next?

I have too few information what have to be done before.


Yes, it might be disabled because of some missing dependency, or because of some other configuration option (there is really lot of disable ones). I would suggest running openwrt make with -j1 V=99 to see configuration process output.

From my fast look in to it it seems like bluez support also depends on dbus.

Yes it seems to be dependent on dbus, but if i enable the dbus support the compilation fails :frowning:

But because this page exist , it must be solvable …

That’s weird. I tried and it compiled for me. I used precompiled SDK. Script I used might be seen here:

I just copied pulseaudio directory. Bumped release number and removed lines disabling dbus and bluetooth. And that was it. Compilation went trough and I got new package contains bluetooth SO files.

Are you sure that you have all dependencies necessary on host machine? Does pulseaudio compiled without that change? One sneaky dependency required on host machine is ccache for example.

I don’t know exactly what is needed, but i have ccache installed, at least.

This is the problem i see:

Package pulseaudio-daemon is missing dependencies for the following libraries:
Makefile:191: recipe for target ‘/home/ladmanj/DataDisk/omnia/OpenWrt-SDK-mvebu_gcc-4.8-linaro_musl-1.1.15_eabi.Linux-x86_64/bin/mvebu-musl/packages/base/pulseaudio-daemon_8.0-111_mvebu.ipk’ failed

ladmanj@ladmanj-ThinkPad-T420:~/DataDisk/omnia$ sh
-e \e[1;34mGetting current SDK for omnia\e[0m
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 422M 100 422M 0 0 5326k 0 0:01:21 0:01:21 --:–:-- 4535k
-e \e[1;34mCopy packages\e[0m
-e \e[1;34mBuilding omnia\e[0m ignoring type redefinition of ‘PACKAGE_getbranch-deploy’ from ‘tristate’ to ‘boolean’

configuration written to .config

make[1] world
make[2] package/compile
make[3] -C package/dbus compile
make[3] -C package/bluez compile
make[3] -C package/pulseaudio compile
make -r world: build failed. Please re-run make with -j1 V=s to see what’s going on
/home/ladmanj/DataDisk/omnia/.omnia-sdk/include/ návod pro cíl „world“ selhal
make: *** [world] Chyba 1

find /home/ladmanj/DataDisk/omnia/.omnia-sdk/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.15_eabi/pulseaudio-8.0/ipkg-mvebu/pulseaudio-daemon -name ‘CVS’ -o -name ‘.svn’ -o -name ‘.#’ -o -name '~’| xargs -r rm -rf
Package pulseaudio-daemon is missing dependencies for the following libraries:
Makefile:191: recipe for target ‘/home/ladmanj/DataDisk/omnia/.omnia-sdk/bin/mvebu-musl/packages/base/pulseaudio-daemon_8.0-111_mvebu.ipk’ failed
make[3]: *** [/home/ladmanj/DataDisk/omnia/.omnia-sdk/bin/mvebu-musl/packages/base/pulseaudio-daemon_8.0-111_mvebu.ipk] Error 1
make[3]: Leaving directory '/home/ladmanj/DataDisk/omnia/.omnia-sdk/package/pulseaudio’
package/Makefile:193: recipe for target ‘package/pulseaudio/compile’ failed
make[2]: *** [package/pulseaudio/compile] Error 2
make[2]: Leaving directory '/home/ladmanj/DataDisk/omnia/.omnia-sdk’
package/Makefile:190: recipe for target ‘/home/ladmanj/DataDisk/omnia/.omnia-sdk/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.15_eabi/stamp/.package_compile’ failed
make[1]: *** [/home/ladmanj/DataDisk/omnia/.omnia-sdk/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.15_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory ‘/home/ladmanj/DataDisk/omnia/.omnia-sdk’
/home/ladmanj/DataDisk/omnia/.omnia-sdk/include/ návod pro cíl „world“ selhal
make: *** [world] Chyba 2

1 Like

Well I compiled only pulseaudio, not dbus or bluez. They are already compiled in SDK, so no need of recompiling them if nothing changes. But your problem is probably because of ldd dependencies checking. So Probably solution would be to have in package pulseaudio-daemon definition makefile line such as this:

DEPENDS+= +libjson-c +dbus +bluez

This is the line that works.
DEPENDS+= +libjson-c +dbus +bluez +sbc

Maybe i got now my first grey hairs.

So, now i need to know what is the correct way to install it in the router.

Thank you

You have basically two options how to get it in to the router. One is to just use generated package bin/mvebu-musl/packages/base/*.ipk. In such case you have to edit Package command in /etc/updater/auto.lua after installation. You should set it to be something like this:

Package "pulseaudio" {content="SOME PATH", priority=60}

That should ensure that it won’t be replaced by updated version from repository. But in this case updating you have to do whole process again.

Other option is to create your own repository. You have to generate signing key using usign -G -p -s key.sec (usign is in SDK). How to set repository up then can be seen in git I linked you before. This takes more work, but automates future updates (updater handles it for you if you update repository).

But in both cases don’t forget to update you version as we release new one. I hope this helps.

1 Like

Thank you.

Because i am lazy and hate useless work, i started with scp-ing packages to omnia and installing by opkg install blahblah.ipk

And it was good idea, because the built packages does not work - may be only config is wrong, but it worth not creating repository or so, before i know that the packages can even work.

Problem 1) pulseudio doesn’t start if the bluetooth modules are in the listed modules to load inj config file.

Problem 2) can’t pair bluetooth device. I am reading messages similar to “no agent found”.

I am tired (also because of it), so i stopped trying. But maybe tomorrow i will continue.

If any hint available, please write it here :slight_smile: