I'm currently using my Android 13 phone in my car, with my bluetooth aftermarket radio. I've just added an Raspberry Pi with a display which I want to use to display currently played track. The question is, can I use AVRCP with one host, and two receivers? I was unable to find clear information, besides some hinting that it might be impossible
Related
I wanted to check if this is possible, i looked around in the net and i didn't find one answer.
Is it possible to use a phone via app to send a signal into a circuit and to receive the same signal back in the app?
Basically is there a library that i can use to work with such signals?
Thanks.
A phone, even smart, is not really intended to control an electrical circuit by sending it signals.
To do this comfortably, you need GPIO, ie pins whose you can control the output.
Your best bet is probably to buy yourself an Arduino, and to have it communicate with your phone over bluetooth.
You'll most likely have to develop your own application, as well as the program for the Arduino.
You could also have a look at the Raspberry, as it offers GPIO as well.
It might be a good tool for managing another circuit, but it all depends on what you exactly want to achieve.
I am trying to automate my dorm room for the upcoming semester. I have a bunch of arduino uno's lying around and I want to use them to control different appliances in the room, which I want to do via an IPhone app. I found a few tutorials online about using an HC-05 but none explicitly say if I need more than one if I want to control different devices from the same app or really anything about controlling multiple devices with one app.
TL;DR I want to control a bunch of devices from my phone, before I go out and buy the wrong parts what do I need and how do I connect multiple devices to one bluetooth device?
You can not use the HC05 module with an iPhone. Apple pushes BLE (Bluetooth Low Energy). If you were using an android app, it would work perfectly. My best advice would be to get one of these. They work well with arduino. That one would connect to one arduino, and that arduino could be connected to multiple relays to control lights, fans, etc.
I need to be able to send and receive audio over bluetooth and it seems A2DP is the thing that does this
Using the code given here, I managed to get my phone to detect and pair with the remote bluetooth device, then establish an A2DP connection which sent all the audio output of the android device to the remote one via bluetooth
I was previously able to do such two way data communication with the same remote bluetooth device via RFCOMM (the android phone needed to be the one initiating the communication though, I could not do it through the remote device though I know it is possible). Once the RFCOMM link was established, the android device could send data to the remote device, as well as receive data from it
What I need now is something similar, but for audio (preferrably using A2DP, but I am open to using whatever else, as long as it gets the job done). While snooping around SO I've got hints that receiving audio data on phone (at least an unrooted normal one, rooting is not an option for me) via A2DP is not possible (see for example, here). But I have also seen headsets that allow making phone calls entirely through bluetooth (well, wirelessly actually, I am assuming it must be bluetooth). For example, for an incoming call, you can just press a button on the bluetooth earpiece, then you can talk as well as listen to the other party. If a phone cannot be used as an audio sink, how do such headsets do it?
I need some ideas on how I should go about writing an android app to send as well as receive audio data via bluetooth (for simplicity lets consider it similar to the Bluechat sample program, but involving audio instead of text). Is it possible at all (through java)? Is it possible only through NDK? How do the devices on the market do it? Is it a different profile than A2DP?
PS: My test devices are Samsung Galaxy 2 (phone) with Gingerbread and Asus Nexus 7 (tablet) with KitKat. Incidentally the remote bluetooth device (it is a development board) comes with a sample project that is supposed to turn the board into an A2DP audio source. if I run this sample project on the board, using the phone's and tablet's built-in bluetooth settings, I can sort of pair with the remote board, but the android devices do not receive any audio.
There are two different A2DP profiles, A2DP source and A2DP sink. The A2DP source profile is supported by Android thus allowing you to stream music from your device to a sink like a bluetooth speaker. To my knowledge the A2DP sink profile is not enabled, which is why you're unable to stream music to your mobile phone and have it act as a speaker. I only know this from having googled around some time ago so things may have changed.
It is possible to enable the A2DP sink profile by editing /etc/bluetooth/audio.conf and rebooting your phone. Unfortunately this has the side-effect of disabling the A2DP source profile and thus cannot be used in a widely distributed app. The other downside is that there is not much of a java software stack for working with that profile so you'd have to do quite a bit of work to get things rolling.
To answer your question as to why a headset is able to connect to the Android, that is because headsets use a different profile called Headset profile (HSP), commonly used by headsets, or Handsfree profile (HFP) commonly used in cars. Both profiles have two sides: a client side and the gateway side (mobile phone). The audio quality of both of these profiles is considered voice quality. 8 or 16kHz sample rates and a crappy codec. There is also a lot of protocol for answering/making calls, etc... I'm not sure if you'd even get audio to transmit without an active connection to the phone network.
For A2DP Sink support -
Yes. It is possible. I have done it in Android JB.
Android device as a receiver for A2DP profile - Please read my reply.
I'm hoping to have an Android broadcast to multiple Bluetooth headsets at once - the idea is to have a radio-like stream that users of an app can tap into. It is important that all users hear the music in sync (that is, the song ends at the same time for everyone).
I have not been able to determine if A2DP will allow streaming to multiple receivers, but I'd be open to other streaming solutions if you have them. Extra points if Android and iOS devices can play with each other!
I dont think streaming to multiple devices over A2DP is currently supported.
According to http://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html in BluetoothA2dp class overview: "Android only supports one connected Bluetooth A2dp device at a time".
I have two Creative WP-380 that have ShareMe function that permit to listen the same stream audio in the same time. I and my wife watch movie with our linux notebook using that couple of headsets.
One is the master, bluetooth connected with the notebook, and the second is the slave, paired with the first.
Works excellent with our android tablets!
It was possible with Windows Mobile 6.5 on a HTC Touch Pro 2 (a bad smartphone because of it´s slow CPU). I used two A2PD Headphones simultaneously.
When I use Bluetooth on my computer, I have a choice of a few different types of devices to look for. One choice is "headset".
I want to make an application that will connect to another device as though it is nothing but a headset. So the audio and microphone will route from the Android phone to the other device.
Is this possible within the Bluetooth API? If so, is the Bluetooth Chat example the best thing to start with for something like this? Most of the information I can find deals with the opposite situation (using an actual headset with an Android device.)
Most phones are only bluetooth masters, cannot act as devices... I am afraid you are out of luck... Unless what you are doing is on a completely different device and in that case, no, the API will not handle that case.