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