Bluetooth + HSP + Raspberry?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mikel,


Thanks for all the help so far! I've gotten a bit further again, but
no sigar yet!

Enable=Gateway was definitely the ticket: I set it and now
HandsfreeGateway.Connect shows up and executes correctly, my phone
suddenly shows a new checkbox "Phone audio: Connected to phone audio".
Superb! So I called myself as a test and -lo and behold- the bluetooth
symbol shows up when I pick up.

However, after this I checked the PA sources and no bluetooth source
is to be seen.
Not only that, when I hung up the phone my kernel bailed out on me :-)

(I suppose this now takes me to ofono configuration land?)


 - bram

On Fri, Jun 14, 2013 at 12:03 PM, Mikel Astiz <mikel.astiz.oss at gmail.com> wrote:
> Hi Bram,
>
> On Fri, Jun 14, 2013 at 10:20 AM, Bram de Jong <bram.dejong at gmail.com> wrote:
>> Hi Mikel,
>>
>>> As Tanu mentioned, this can be done calling
>>> HandsfreeGateway.Connect(). You can do this in command line or using a
>>> tool such as d-feet. People tend to think that Audio.Connect()
>>> connects all audio profiles but this is not the case in BlueZ 4: you
>>> have to explicitly call HandsfreeGateway.Connect() for HSP/HFP and
>>> AudioSource.Connect() for A2DP.
>>
>> Aha! Hmm, I'm using d-feet but I can't see the method
>> HandsfreeGateway.Connect on bluez. I do see Audio.Connect, but no
>> mention of HandsfreeGateway.
>
> That's because oFono is not running or correctly set up.
>
>>
>>> Alternatively, you can initiate the connection from the phone. This
>>> should work out of the box assuming the device is marked as trusted.
>>
>> I'm actually always initiating from the phone side. On Android I do
>> have a checkbox on the phone that reads "Media audio: connected to
>> media audio" which to me sounds a bit like A2DP and not HFS.
>
> Exactly (but "HFS" should be HSP/HFP).
>
>>
>>> More importantly, in order to make all this work, you'll also need a
>>> telephony component which implements the headset role (note that BlueZ
>>> doesn't do this). I would recommend oFono 1.12 but older versions
>>> should also work fine.
>>
>> Is there anything specific I need to configure for this to work or
>> does the package just need to "be" there?
>> Also, as I said before, I'm only trying to OUTPUT the audio to the
>> HSP/HFP, not use the Pi as a microphone, or does ofono need to be
>> present anyway?
>
> oFono needs to be present anyway, it makes no difference that you're
> interested in one-way audio.
>
> Installing oFono should generally be fine assuming it was compiled
> with --enable-bluetooth. In a similar way, BlueZ should be compiled
> with --with-telephony=ofono.
>
> If it doesn't work, make sure your BlueZ audio.conf includes
> Enable=Gateway. This might be necessary depending on the exact BlueZ
> version you're using (e.g. some distros have patches to enable this
> profile/role by default).
>
> Cheers,
> Mikel



-- 
http://www.samplesumo.com
http://www.freesound.org
http://www.smartelectronix.com
http://www.musicdsp.org

office: +32 (0) 9 335 59 25
mobile: +32 (0) 484 154 730


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux