-
Add
Enable=Source
to /etc/bluetooth/audio.conf right after[General]
. -
Find address in form XX:XX:XX:XX:XX:XX of phone with
hcitool scan
. -
Pair and trust smartphone with
sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX
andsudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes
. -
Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink:
pactl load-module module-loopback \ source=bluez_source.XX_XX_XX_XX_XX_XX \ sink=alsa_output.pci-0000_00_1b.0.analog-stereo
You can find your own values for source and sink with pacmd list-sources
and pacmd list-sinks
.
Is it possible to change the code in a way that will allow streaming audio from iPhone to Linux?
When I ran this code on Ubuntu 14.04, and connected an iPhone via bluetooth to the Ubuntu box, I got the following two lines:
{HandsfreeGateway.PropertyChanged} [/org/bluez/27095/hci0/dev_00_34_5E_22_F5_61] State = connecting
{HandsfreeGateway.PropertyChanged} [/org/bluez/27095/hci0/dev_00_34_5E_22_F5_61] State = disconnected