How to setup device as a bluetooth headset? - android

Let us suppose we have a two devices with Android:
Custom android device with microphone, speaker, bluetooth and without GSM part.
Android smartphone (like a Nexus 5 or SGS4).
We need to make calls programmatically from first device through second via Bluetooth. What we are need to do to implementing it? Setup first device as headset? Or something else?

Step by step tutorial: http://developer.android.com/guide/topics/connectivity/bluetooth.html
One device as server, one device as client.

Related

Dialling and Making a call from a tablet connected over Bluetooth with a phone

I am looking to build an app to make call's from my tablet (Galaxy Tab A7 Lite) via bluetooth connected mobile phone (iPhone 13). Its a regular cellular call from my phone to another phone number....and NOT looking for VOIP call..i.e call over internet.. This must however use the microphone and audio system of the tablet.
The inspiration/use of this is to create a custom dashboard in my car and would like to use my current tablet for it. In my other car I already have something like this, i.e. it allows me to call over bluetooth, however that came part of the system I purchased on Aliexpress together with the app already installed.
The output I want is something like this
Any suggestions would be very helpful.

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

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!
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

How to change Bluetooth device class on an Android phone?

Is it possible to make an Android phone present itself as not being from the Phone device class when connecting over Bluetooth? For example, imagine I wanted to pretend my phone was a Bluetooth keyboard to another device.
I've been looking around the Bluetooth API and I don't see anyway to change it.
COD(Class of device) cannot be changed from the application. For bluez stack in phone, COD is defined in adapter.c . Though if u want that ur phone can act as a keyboard to some other device, may be adding SDP record can help. If peer device searches for the services supported on your phone, it can recognize as HID device with the SDP record

Arduino + Bluetooth module + Android

I'm trying to think of a way to do a simple home automation project that involves an Arduino, a Bluetooth module and an Android phone. The idea is that I have two Arduino boards in different parts of my home. And if I walk into a room then a LED lights up on the board that has discovered my phone. If I walk out of the Bluetooth range, the LED should turn off.
I have tried the DomoticHome project with a router, but it's only for manual on/off and it's based on the Ethernet module.
I don't want to make an Android application from scratch, but I would like to take some existing open-source application that I could extend to use Bluetooth and/or turn on the LED automatically.
Actually, you might skip that Android application requirement. Just make the Arduino board l2ping your phone by Bluetooth periodically and switch your LED based on success or fail.
As a side effect, you could automate with just any phone, that supports Bluetooth. But the devil is in the detail. It might be necessary to pair boards and phone initially.
Additionally, most Android phones switch off visibility after a minute or two. So you will have to check, whether a ping will work then. (I don't know whether l2ping is available on Arduino out of the box, but it should be portable easily.) Trying to open a Bluetooth port on your mobile device may be an alternative to l2ping. So a no-application-solution should be possible.
Best way to do this would be using a handshake signal every 1 second or 2 seconds.. the bluetooth module should send HI if mobile receives that i should reply with HI.. Once the mobile does not reply it should turn the lights off.. If it receives the HI it should turn the light back on..I have a code that can connect to these bluetooth modules using serial communication..its very simple to use..i will check and send you the code.. All the best..

How to make an Android phone as bluetooth headset

I have 2 Android Phones, and I want to connect them together via bluetooth, and make one of them a bluetooth headset.
So, my question is how to program the second phone to change its role profile to "Bluetooth Headset" when establishing the connection ?
I've found this post but my question is a little bit different
Thank for any advice or idea :)
You cannot on Android. At least using the built-in Bluetooth A2DP profile.
Your phone will only act as a transmitter (source), not a receiver (sink).
Please look at these two answers I gave on why this is not possible :
Is it possible to send/receive voice from PC to Android device over Bluetooth
Receive audio via Bluetooth in Android
You can, on the other hand, develop two apps each acting as a client/server using your own protocol. The server could be streaming audio content to the client via Bluetooth for instance.
Another way to consider this, since using an Android device as an A2DP sink is not feasible on every phone, is building these two apps using your wifi connection. It could be much more rapid and the sound sound be of a much better quality.

Categories

Resources