I was trying to setup HFP uing ofono. I have the following setup
start pulseaudio, bluetoothd and ofonod
Connect to phone using bluetoothctl
./enable-modem
./dial-number
loopback
I was able to pair my nexus 4 device and use the script
./dial-number which actually sets a call up. But the audio of
the call doesn't route to the default sink. I see the
following error in ofonod
Reject SCO: Agent not registered
Which could be the reason for the audio problem.
Things that I have already tried.
Patched
http://cgit.freedesktop.org/~jprvita/pulseaudio/
file bluetooth-headsets-media-api.
Recompiled the raspbian kernel with
CONFIG_BT_SCO
CONFIG_BT_HCIUSB_SCO
enabled
Added
Enable = Source,Sink,Headset,Gateway,Control,Media
Disable = Socket
to /etc/bluetooth/audio.conf.
Things that could be wrong
When I do a pactl list cards, i see the bluetooth card at #0
with two profiles.
Profiles:
a2dp_source: High Fidelity Capture (A2DP
Source) (sinks: 0, sources: 1, priority: 10, available: yes)
headset_audio_gateway: Headset Audio Gateway
(HSP/HFP) (sinks: 1, sources: 1, priority: 20, available:
no)
off: Off (sinks: 0, sources: 0, priority: 0,
available: yes)
Active Profile: a2dp_source
But when I try making the headset_audio_gateway the default
profile. I get
$ sudo pactl set-card-profile 0 headset_audio_gateway
Failure: Input/Output error
Also read this in the pulseaudio notes
http://www.freedesktop.org/wiki/Software/PulseAudio/Notes/6.0/
"When building PulseAudio, it's possible to choose between
"native" and "ofono" BlueZ 5 headset backends."
How do I specify that I wish to use the ofono headset
backend? Is that the problem?