How to use Android device as a bluetooth headset for another mobile phone?
Asked Answered
F

1

7

I want to make my android device working as a bluetooth headset. I search the Android APIs, but I just find some interface which can make Android device working as a masters, not as a device(bluetooth headset). I'm also ready to modify the source codes of Android OS, and rebuild the OS. What I hope is, when Android devices connect to a mobile phone with bluetooth, the Android devices can work as a bluetooth headset. I don't know whether there are interfaces can do this, or I should modify the Android OS? Thank you!

Fodder answered 20/5, 2013 at 10:17 Comment(1)
Thank you very much! I have tried to connect RFCOMM channel between bonded devices with createRfcommSocketToServiceRecord(), and I tried several UUIDs, include 00001103-0000-1000-8000-00805F9B34FB, but most of them failed to connect. I don't know how to connect as a headset, and how to send AT commands. Can I just use Android APIs to implement this function? Whethe I should communicate with BlueZ?Fodder
I
1

You need to implement HFP profile in your android device, normally phone role is AG(Audio gateway) and headset roles is HF(Hands free) , think its as a server and client role. Connect RFCOMM channel to phone using UUID defined for HF , have SDP record updated,changes will be required to handle AT Commands as well. These will be the initial changes, once done you will need to handle audio packets(SCO packets) for voice calls

Iquique answered 20/5, 2013 at 10:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.