Module audio bluetooth (iOS and Android) - bluetooth

I'm working on university project that consists in audio speaker with bluetooth connected to mobile application.
I search a lot possibilities and bluetooth modules that comply my needs, but I have not found any module. I need a Bluetooth module that can receive audio and work in iOS and Android, but I see that a lot of modules with Classic Bluetooth (lowe than 3.0) do not work with iOS, but 3.0 and 4.0 version works with both but are not oriented in audio.
I'm looking for if someone can help me finding one kit with audio receive bluetooth for all plataforms intended for speaker and cheap. Or separately one bluetooth module receiver with 3.0 or upper version (because works in iOS), intended for audio streaming to an speaker, and with some UART pins (tx/rx for example) that can simplify the connection with a microcontroller. And one basic microcontroller oriented to bluetooth receives (with some bluetooth libraries) or simply to program with upp-level language. This microcontroller just receive the audio (bits) and send it to the speaker.
I read too that Smart Bluetooth or Bluetooth Low Energy works on iOS, but can't send audio, have small rate, but i think Smart Ready Bluetooth its possible, but not sure, I have just seen that supports Classic Bluetooth (oriented to audio) and Bluetooth Low Energy, it's possible sens audio with it?
In short, I'm looking for one module Bluetooth 3.o or 4.0 + EDR (that can send audio) for iOS and Android. I find HC05, CC2506X, or HC06 module, but I have read not works in iOS. And a basic microcontroller simply to program to receive this bluetooth audio to send in a speaker.
If someone know one basic kit, or useful information for me I would appreciate.
Thanks.

There is a bluetooth module BC127. it is available at Sparkfun. It dual mode. Means It can work as source and sink both.
Source means, It can Transmit Audio
Sink means, It can receive Audio
Here is link for https://learn.sparkfun.com/tutorials/understanding-the-bc127-bluetooth-module

Any Bluetooth module that acts as an A2DP Sink should work with both iOS and Android.
The specific Bluetooth version that the module implements is not important (as long as it's higher than 2.1), but it needs to be an A2DP Sink (which is only possible over classic Bluetooth)

Related

Connect Multiple Bluetooth Speakers with Raspberry Pi

I'm trying to connect several bluetooth devices with Raspberry PI to use them as speakers.
I'm using RetroPie as a distribution, because of the tests I've done it's the only one that matches and allows continuous synchronization with several bluetooth devices at the same time.
However, the system only detects the first device that connects as a sound card, the rest keep the bluetooth synchronization active, but it does not interpret them as audio cards even though it is indicated by blueman-manager.
Is there anything I can do to keep all devices synchronized and supported as audio cards?
Palm,
even so this a old post, it is not yet closed.
As I just got the same issue, here my answer.
What you try to do is to connect mutliple audio sreaming services (Speakers) to 1 audio bluetooth source, that is not possible like this. Therefore your PC only connects to the first box.
You could try multiple bluetooth dongles, but then you run into the timing issue with audio stream syncronization between the boxes.
The only solution is to use Bluetooth 4.1 upwards master-slave services.
Therefore the Speakers need to be connected to each other and seen as 1 device from the PC. In that mode the stream is skewed to ensure syncronous playing.
Many new Bluetooth speakers support this mode.
Hope that helped.

Android Things and Bluetooth

As far as I read about the dev boards, every SoC is capable to use Bluetooth.
I didn't tested it yet, but can I use Android Things with a Bluetooth connection? My question is, how can I enable Bluetooth without an input device? If I want to enable Bluetooth on my phone (with code), I had to confirm it, but this can't be possible on Android Things.
Update: Since the release of Android Things developer preview 3, Bluetooth and BLE are now available.
Old Answer
No. You can not use Bluetooth with the current version of AndroidThings (developer preview 1).
It is said in the known issues part of the release notes that Bluetooth is currently disabled (and so is USB).
It is supposed to be included at some point, but at the moment if you try to get a BluetoothAdapter it does return null.
Android Things will use the latest version of Bluetooth called Bluetooth Low Energy and the only similarity between the two is that they have Bluetooth in the name!
Can I use Android Things with a Bluetooth connection?
Yes, well a Bluetooth Low Energy connection
https://www.link-labs.com/bluetooth-vs-bluetooth-low-energy/
In summary, Bluetooth and Bluetooth Low Energy (BLE) are used for very different purposes. Bluetooth can handle a lot of data, but consumes battery life quickly and costs a lot more. BLE is used for applications that do not need to exchange large amounts of data, and can therefore run on battery power for years at a cheaper cost. It all depends on what you’re trying to accomplish.
Everything you need to know about BLE is written here:
https://developer.android.com/guide/topics/connectivity/bluetooth-le.html
how can I enable Bluetooth without an input device?
You do not pair BLE devices like you used to with the older Bluetooth (but you can use Bonding). Check this out:
Android Bluetooth Low Energy Pairing
https://stackoverflow.com/a/20093695/413127
But as stated by #shalafi Android Things doesn't currently support Bluetooth

Can anyone explain how voice commands works via Bluetooth remote(Nexus player remote) in Android(Nexus player)?

Can anyone please elaborate following questions?
How bluetooth stack handles audio data?
How audio commands are processed?
Did we need any service to process audio data?
Thanks in advance.
Basically, voice commands over BLE require:
some audio codec for reducing required bandwidth (ADPCM and SBC are common, OPUS is emerging),
some audio streaming method through BLE,
decoding and getting the audio stream from BLE daemon to a command processing framework.
In the android world, command processing framework is google sauce (closed) that most easily gets its audio from an ALSA device. What is left to be done is getting audio from the remote to an ALSA device.
So for audio streaming, either you:
use a custom L2CAP channel or a custom GATT service, this requires a custom android service app and/or modifications to Bluedroid to handle those, it will need a way to inject audio stream as ALSA, most probably with a "loop" audio device driver,
declare audio as custom HID reports, this way, Bluedroid injects them back to the kernel, then add a custom HID driver that processes these reports and exposes an audio device.
Audio over BLE is not standard, so all implementations do not do the actual same thing. In Nexus Player case, implementation uses HID: It streams an ADPCM audio stream, chunked in HID reports. There is a special HID driver "hid-atv-remote.c" in Android linux kernel that exposes an ALSA device in addition to input device. Bluedroid has no information about audio, all it does is forwarding HID reports from BLE to UHID.

Can PulseAudio/ALSA work without built-in soundcard?

I am new to PulseAudio and ALSA, so please go easy on me. This might seem like a dumb question, but it is quite important to have it answered.
I am developing application on ARM imx6 board (lets call it BOARD1), with built-in sound card support. With ALSA, I am able to play audio throgh Headset_OUT. But now, we want to move to a new board (lets call it BOARD2), which does not have built in soundcard. But the idea is to connect a bluetooth module to the BOARD2 and have the audio streamed to the bluetooth speaker.
My question is, is it possible to use PULSEAUDIO to send/receive audio to external (bluetooth) audio device without local embedded soundcard (i.e. is it possible to do audio encoding/decoding in just software with pulseaudio and gstreamer combination) ?
Regards

Sending audio to a bluetooth enabled speaker, IOS

I want to add a function to my App, where the user can choose to play the audio on a bluetooth enabled speaker. I have a Parrot Easydrive in my car and this works for phonecalls and for example the Dictafoon App among others.
I understand that I should use the Core Audio framework. WHen a bluetooth device is connected it is said that it is easy to stream the audio to that connection. I am now looking for Core Audio sample code (or a book) where connecting and streaming to a bluetooth device with Core Audio is explained.
Can anyone shed a light on this? If there is another framework or sample code which I can use please mention it!
Many thanks in advance!
You don't write any specific Core Audio code, it is the same process as is used to play audio via AirPlay.
Basically you put a MPVolumeView into your UI, and the underlying framework will redirect your audio output for you. Once you implement this you will be able to use Bluetooth and any AirPlay enabled device with your app.

Resources