Can CoreBluetooth framework pair and talk to a slave bluetooth 2.0 serial module? - ios

I would like to write an app for iPhone 4s that can talk to a slave bluetooth 2.0 serial module such as the HC-06, BC417, or EGBT-046S. Is this possible? Can anyone provide some sample code?

No, CoreBluetooth is for Bluetooth Low Energy. The External Accessory Framework can be used for Classic Bluetooth connection. But to be able to open on a serial link from the iPhone, you need a peripheral that complies with the Made For iPhone (MFi) program, and you need to be an MFi member to be able to buy one. Look at this question for more info: What's needed to use the Apple Accessory Protocol?

Related

iOS sample to connect a Bluetooth with MFI

I have an application for Android that communicates via Bluetooth with a hardware we develop. Now I need to develop an application for iOS that connects with the same hardware via bluetooth. This hardware makes serial communication via Bluetooth.
I've been researching quite recently and found two outputs:
- Bluetooth Low Energy (BLE).
- Bluetooth with "MFI Program".
Analyzing the smartphone today, both Android as iOS, the best option would be the MFI. Due to availability on older smartphones. Even already started the enrollment process over MFI program.
My question focuses on the development on iOS. And my question is:
Looking for Objective-C. Is there a difference between connecting to a Bluetooth Low Energy or MFI? Could someone show me an example of connecting via Bluetooth MFI?
As I understand it, devices enrolled in the MFi program use the EAAccessory framework, not CoreBluetooth. Documentation is here: External Accessory Programming Topics.
Sample code here.
MFI is for Bluetooth device Hardware.
Coming to connecting to BLE device from iOS devices, you have to use CoreBluetooth framework.
http://www.raywenderlich.com/52080/introduction-core-bluetooth-building-heart-rate-monitor
Check this link.

Does CoreBluetooth implement Direct Test Mode?

I learned that the Bluetooth 4.0 specification states a Direct Test Mode for the RF PHY (Bluetooth Core Specification v4.1, Volume 6, Part F). I'm using a BLE112 module, and Bluegiga's API implements these testing commands as test_phy_end(), test_phy_rx() and test_phy_tx().
Does CoreBluetooth implement them somehow? If not, is there another way to access the Direct Test Mode in iOS?
Apparently no there is not.
I spoke with a colleague who develops BLE firmwares.
You have to connect physically to the BLE chip.
A way to do it, could be for example, to have a MFI device that you connect to the lightning/30-pin connectors, and connect it to the BLE chip. But I don't know if it exists, and you may have to do it yourself.

Arduino and iPhone connection with Bluetooth 3.0

I would like to build an app that requires bluetooth connection. The Bluetooth HC05 module is connected to Arduino. I want to know what framework (or other related things) that I need to build an app that can connect to this Bluetooth module.
Still have no idea how to start. Anyone could help?
Unfortunately the answer might be "you can't do that".
iOS only supports the following Bluetooth profiles: HFP, PBAP, A2DP, AVRCP, PAN, HID and MAP. None of those can be used inside an app to communicate to your Arduino.
For the useful profiles like Serial Port Profile (SPP) and all arbitrary bluetooth communication you have to add an authentication chip to your Arduino. Unfortunately you can't buy these chips unless you have a MFi membership. And you won't get into the MFi program unless you are a company with a concrete product (mass market scale) in mind.
Fortunately, we now have Bluetooth Low Energy. Bluetooth LE can easily be used in iOS apps, without all the MFi hassle. So you should get a Bluetooth 4.0 module for your Arduino.
The framework that is used for Bluetooth 4.0 communication is called CoreBluetooth. You will find documentation, sample code and WWDC videos in the iOS Developer Center. Start with the Core Bluetooth Programming Guide

How to send file from iPhone to mac over bluetooth

I have created universal device application to transfer any kind of files via bluetooth using GameKit Framework.
My question is how to create on Desktop Application with same process or there any Framework? That can communicate also on the device. Can i have any sample please or tips how to do it.
There is Core Bluetooth that used low energy protocol. But i don't know how?
Anyone please give some idea or anything that i can use it.
Thank you
The Bluetooth functionality of the GameKit framework is iOS-only (see GKSession), so you won’t be able to use that on a Mac.
The CoreBluetooth framework on the other hand is available on both Mac and iOS devices supporting Bluetooth LE, with the one difference that the CBPeripheralManager is not available on Mac, so you can’t advertise a service on Mac. However you can have your iOS device act as a peripheral and connect from the Mac acting as a central. Data transfer should still work both ways.
The BTLE Central Peripheral Transfer sample code should be a good starting point.

Bluetooth and iOS - what protocols/ profiles are supported?

I am developing an iOS bluetooth app that needs to pair with a peripheral device.
What frame work do I need to use to interact with a device that has support for the following protocols/profiles:
A2DP
HFP
HSP
Are either of these possible with an iOS device without being a member of the the MFI program?
How do I support these profiles:
https://support.apple.com/kb/HT3647
Do I do that using corebluetooth?
These are standard profiles that are supported inherently by iOS. You don't need to add any software to make the phone work with these. At the same time apps running on the phone will have limited access to what device they can use or are using but for example the audio routing can be obtained.
All in all, as long as the device implements the profiles correctly, any application will be able to use it, not just yours.
There are two completely different methods of doing Bluetooth communications. One is with the classic Bluetooth profiles and the latest is using BLE (Bluetooth Low Energy).
Classic Bluetooth can be used with the ExternalAccessory framework and GameKit framework.
BLE uses CoreBluetooth.
The classic profiles supported are listed here:
http://support.apple.com/kb/HT3647

Resources