I want to transfer some data from an embedded device to an iOS device using Bluetooth.
I am well aware that this is not possible using regular bluetooth serial communication as iOS devices does not implement any API to do this.
Here is what I collected from my researches :
iOS devices support the following BT profiles (HFP,PBAP,A2DP,AVRCP,PAN,HID,MAP)
=> http://support.apple.com/kb/ht3647
iOS most recent devices support Bluetooth Low Enery (Bluetooth Smart ready) devices although it is low rate transfer.
iOS does NOT support data transfer using Bluetooth.
My questions is whether it is possible (or not) to use a bluetooth module within the range of accepted profiles in order to transfer data.
The idea would be the following :
Is this possible ?
Basically, the question is even simpler. Is it possible to record an audio stream coming from a bluetooth headset and save this stream to a file ?
Related
I am using a HM-10 bluetooth to pair with my iPhone but I noticed that HM-10 can't be paired with iPhone using the "settings". It just won't show up in my bluetooth list. I will need a special app like "Lightblue" or "Bluecap" to pair it.
My question is, if I need a certain app to pair the bluetooth module with my iPhone, why is that many devices such as bluetooth speakers could be paired using the "settings" even without having an app?
Are there any bluetooth modules that could be paired without having an app like "Lightblue" or "Bluecap"?
Pairing through settings is only available for devices that use legacy profiles such as handsfree or A2DP.
Bluetooth Low Energy devices, such as the HM-10 are discoverable by any app using Core Bluetooth. Apps, like LightBlue, are just general purpose BLE apps that let you explore available BLE devices.
BLE devices only require pairing if they are using encryption on their characteristics. In this case, iOS will show the pairing dialog and complete the pairing process when the app attempts to read the encrypted characteristic.
To use the HM-10 you will need to write your own app to perform whatever communication task you are trying to achieve.
You can use nrf52832 as Bluetooth module.
If you are not making hobby project hm10 is very bad choice
I shifted from hm10 to nrf52832 before 6 months
I am writing an app for iOS that needs to receive data from a Bluetooth device (classic Bluetooth, not BLE). I need a pretty fast data transfer, 1Mbit/s or faster if possible. This already works using SPP in Android.
Apple only supports some Bluetooth profiles as listed here: https://support.apple.com/en-us/HT204387 I think these profiles are the only ones supported without being in the MFi program. MFi is too difficult to deal with so I would really like to avoid it. SPP is of course not available.
Of these profiles, PAN and maybe A2DP and HFP seem likely to be usable for bulk data transfer. A2DP or HFP would be a hack as they are really not designed for non-audio data. This seems to leave PAN.
How can an iOS app transfer data from a classic Bluetooth device using PAN? I would like the app to connect and somehow establish a data connection. This may be over IP (like tethering or reverse tethering using PAN) or non-IP. I want something which behaves a lot like the SPP profile, in other words a bidirectional serial link between the two sides.
Note: The Bluetooth device on the other side of this can do anything that is needed (I am writing the device firmware at the same time using a bluetooth stack, probably the TI dual-mode stack). Extra bounty if you can give me example of PAN tethering using any Bluetooth stack (TI, Synergy, dotstack etc).
See also: Is possible to communicate via Bluetooth PAN in iOS with tethered devices
So my question is can we create an iOS app that can receive data from any bluetooth devices? Even the devices we buy it form eBay?
Any encoding when the data sent from the devices make us can not decode them? Or another description : Can the bluetooth device limit the app that can connect to them ?
Thank you very much.
An iOS app can receive data from any bluetooth device which must confirm the protocol of Bluetooth(GATT, ATT, L2CAP).
Bluetooth device can limit the device to connect by the data format(such as CRC, XOR), the device even can limit the special MAC address of bluetooth to connect if your app not sale on App Store
Below is a simple description to Core Bluetooth, please check the detail Core Bluetooth Programming Guide
The bluetooth device is a Peripheral to produce data, iOS app is a Central that can receive data or send limited data to Central.
When the Peripheral begins advertise, the Central can search and connect to it, when the connection is build, Central can notify or read the Characters in Services of Peripheral
An iOS app can connect to any device that supports the GATT profile with Bluetooth Low Energy/Bluetooth Smart using the Core Bluetooth framework.
Generally, a peripheral cannot prevent your app from connecting to the device, but your ability to read/interpret the data offered by the device will be limited by:
The documentation provided by the device vendor
Your ability to "reverse engineer" the information if documentation is not provided
Any handshake/security methods that the vendor may have implemented; For example the device may require your app to respond with specific data in response to data from the device - see point 2.
Devices that use legacy Bluetooth (i.e. not BLE) are only supported if they offer generic services such as audio - these are supported by the AV framework, or if they are MFi certified - these are supported by the External Accessory framework.
We are building an iOS app that does basic speech recognition. Basically, the app counts the number of words you speak into the iOS device. The app works well when speaking into the standard microphone built into the iPhone. However, when connecting a wireless Bluetooth audio device, we are unable to use that Bluetooth device as a method for recording voice audio. We are using following software and devices:
built for iOS7.0/7.1 with the OpeanEars library for speech recognition
we’re using the ZOMM Wireless Leash (http://www.zomm.com/ | http://www.amazon.com/ZOMM-Wireless-Bluetooth-Speakerphone-Black/dp/B003N3J6BU/ref=sr_1_1?ie=UTF8&qid=1409515088&sr=8-1)
Tried other Bluetooth devices with the same behavior (Bluedio 66i and Bluedio DF200)
Unable to capture audio in default Voice Memo app
as far as we know this is simply using standard BlueTooth protocol, as we understand it, once the bluetooth device is paired it should automatically start accepting it as a device for recording/audio capture
According to OpenEars, the Bluetooth audio devices should be picked up automatically (http://www.politepix.com/forums/topic/enabling-bluetooth-support/). Are we right in assuming this?
We used the VoiceMemo app (the voice recording app that ships with iOS) to test out the bluetooth device as a “control” experiment:
Pair the ZOMM with the iOS device
Open VoiceMemo
Select ZOMM as input device from within the VoiceMemo app
Start recording
Stop recording – no audio was captured
Unfortunately this meant that neither our app nor the standard voice recording app is able to use the bluetooth device as a means for recording audio. Either way it’s hard to rule the device as simply the issue.
We’re curious to understand if this simply a hardware issue (and need a BT-enabled device that supports voice recording to iOS) or if there is something in the code we need to enable in order for the app to start accepting the device as recordable.
Also, more details about the ZOMM headset:
ZOMM specifications:
Bluetooth Wireless Compatibility:
This ZOMM device supports the following Bluetooth wireless protocols and profiles:
• Bluetooth core technology v2.1+EDR
• Hands-Free Profile (HFP) v1.5 headset role
• Headset Profile (HSP) v1.2 headset role
Bluetooth Wireless Interoperability:
This ZOMM device is designed to be interoperate with all Bluetooth wireless products that support compatible profiles and roles
including:
Bluetooth core technology v3.0, v2.1+EDR, v2.0 +EDR, v1.2
Bluetooth master and slave roles
Bluetooth Hands-Free Profile (HFP) v1.5 and prior headset (HS) role
Bluetooth Headset Profile (HS) v1.2 and prior headset (HS) role
Any idea on what we could do to resolve this issue and use Bluetooth together with the OpenEars library on iOS7.1?
Thanks! Philip
testing with Voice Memo is logical, however the app may not be allowing the route the change when BT is connected. A detailed explanation is here. iOS: Using Bluetooth audio output (kAudioSessionProperty_OverrideCategoryEnableBluetoothInput) AudioSession
With OpenEars, I believe you can enable logging to track when the audio route changes. So, you can verify via logging that it is listening to where it should be or .... not listening. I would suggest upgrading as of this post http://www.politepix.com/forums/topic/small-bug-when-running-on-ios-8/ . If you scroll to the bottom you can see BT should work now.
Another test worth running is SaveThatWav within OE. I have not used it, but you should be able to verify what you are listening too.
I’ve been reading that BLE only works with a small amount of profiles (based on GATT and other smaller use specific profiles), but I’ve seen many Bluetooth 4.0 headphones that use A2DP available on the market (examples below). However, all of the bluetooth 4.0 headphones have one thing in common…use of the aptX codec. What is aptX and is it way to get A2DP to work as a profile using bluetooth 4.0? Is there another way anyone knows about to pass audio and remote control commands to a mobile device over BLE?
Example 1
Example 2
BLE will not support A2DP. from the specifications provided on the link, these devices are dual mode(supports both BT Classic and BT LE).APTx is a codec and provides better sound quality than SBC but SBC is mandatory to support in A2DP profile.