Setting Android as bluetooth Headset

776 Views Asked by At

I am newbie to Bluetooth,I would be grateful if anyone can explain me whether my thinking and route is correct and how to proceed further.

I am working on Android device(tablet) running on AM437x and supporting android kitkat(4.4). I want to implement Bluetooth headset functionality to it so user can make and receive calls to and from it using Bluetooth via connected android phone. The android Bluetooth stack (Bluedroid) supports the HFP profile in Audio Gateway role only. I want HFP-HandsFree role as well. This profile is available in Bluez/Bluetopia stack. Can we import the source code for them on Bluedroid? If yes what changes are required for it.

Going further this route I already have A2DP sink role, SBC decoder implemented on Bluedroid which is one of the requirement for HFP-HF role. Next step I need to broadcast the device as headset to do so we need to set BluetoothClass major class to Audio/Video (with the value of 1024 or 0x400) and BluetoothClass device class to Audio/Video wearable headset (with the value of 1028 or 0x404). So other Bluetooth devices will recognize the device as an audio/video headset. How do I change these? After connection is established, phone can initiate HandsFree communication with Cuff.

Once connection is established, I as per my understanding there will be three level connections which are Service Level Connection, Codec Connection and Audio Connection. Do you know where we should look into if we want to know how these connections are managed?

0

There are 0 best solutions below