What profile can I use with CoreBluetooth? - iphone

I looking for informations about CoreBluetooth, I see iPhone4s/5 support Bluetooth 4.0 and Bluetooth LE.
Also, according to this note, I can use these profiles :
Hands-Free Profile (HFP 1.6)
Phone Book Access Profile (PBAP)
Advanced Audio Distribution Profile (A2DP)
Audio/Video Remote Control Profile (AVRCP 1.4)
Personal Area Network Profile (PAN)
Human Interface Device Profile (HID)
Message Access Profile (MAP)
Can I have access to them using CoreBluetooth and, if so, how could I access to them ?

You can't use any of the mentioned profiles if you want to communicate from the application. Core Bluetooth is meant for low energy,You can only implement GATT Profiles(like Heart Rate,Alert Notification) with BLE and BLE is for small data rates.You can only write or read characteristics to/from the device. In order to implement any of the mentioned profiles you require Serial Port Profile, which is supported only through MFi using External Accessory Framework.
GATT Profiles
http://developer.bluetooth.org/gatt/profiles/Pages/ProfilesHome.aspx
You can find External Accessory Framework documentation in the link below.
http://developer.apple.com/library/ios/#documentation/ExternalAccessory/Reference/ExternalAccessoryFrameworkReference/_index.html
MFi
https://developer.apple.com/programs/mfi/

CoreBluetooth framework is for Bluetooth Low Energy. The note seems to be dealing with "classic" Bluetooth only (since you see "old" devices) . In that case, you'll have to use ExternalAccessory framework. Its two technologies quite different, as you could see by searching in Google or in different questions here in StackOverflow.
There is a sample from Apple dealing with ExternalAccessory framework : EADemo.

Related

Bluetooth HFP (1.5) communication on iPhone

The Bluetooth v2.1 specifies the so called "Secure Simple Pairings" methods - one of those methods is called Out of band (OOB) and according to Wikipedia This method uses an external means of communication, such as Near Field Communication (NFC) to exchange some information used in the pairing process.
Whatever is the "external means of communication" of getting the PIN, the handsfree device id, etc. - is it possible on iPhone to initiate the hands-free connection from the code? I.e. if i have all necessary information in my application can I say iPhone to connect to the handsfree using given information?
If it is not part of the public API, has Apple some process to allow some companies to get access to some additional non-public features?
If you want to connect a Bluetooth 2.1 device to your iOS device, you must do it through the Settings->General->Bluetooth screen.
However, for the iPhone4S and the New iPad, you can detect and connect Bluetooth devices that Low-Energy devices.
The Bluetooth Low-Energy specification is part of the (some-what) new Bluetooth 4.0 protocol and only these two Apple devices have the necessary components to connect with low energy devices.

What can MFI enable?

I'm trying to determine what functionality I can add to a BT accessory by paying for the MFI authentication coprocessor. For example, could I...
A. Pass location data to the accessory?
B. Push incoming SMS messages to the accessory?
C. Launch my app on the phone from the accessory?
As Dennis mentioned, all information regarding the MFi program is covered under a VERY water tight NDA. However, what can be said is that all devices that connect to the iPad through Bluetooth or the docking connector port are accessed through the External Accessory framework. Documentation on the External Accessory framework is easily accessibly from Apple's documentation pages and can also be easily googled.
Communication with devices through the External Accessory framework is fairly simple once you've established a connection with a device. In short, the process is to find the desired connected accessory from an array of devices, establish a connection session and the session object contains a input and output stream. Data by creating a delegate that with the device and finally, monitor the associated input and output streams which you use to communicate with the device.
Again, the majority of the information associated with MFi is tightly sealed. However, as far as connecting to devices (that you have the right to connect to) is simple, well documented and is easily searchable since the framework is part of the standard, iOS library.
One other note on Bluetooth. There is also a Core Bluetooth framework that is available with iOS 5.0 and up. This is a much simpler framework that you can use to discover and auto pair with Bluetooth Low-Energy devices (which are part of the new Bluetooth 4.0 spec.)
If you are planning on making an iPad application or desire to have a fairly high level of backwards compatibility with earlier iOS devices, I wouldn't recommend using the new CoreBluetooth framework. The reason is because only the iPhone 4S and the soon to be released "New iPad" have the necessary Bluetooth chipset to connect with Bluetooth LE devices.
All Mfi information is under NDA.
It dosent cost anything to sign up and get access to the information , you can do it here.
https://developer.apple.com/programs/mfi/

Using the new MonoTouch.CoreBluetooth namespace

I have found a few samples on how to use GameKit for bluetooth communication and even accessing bluetooth functionality using native code but no example on how to use the MonoTouch.CoreBluetooth namespace.
Seems a shame using hacks when the full implementation is just waiting to be used.
Can anyone please share a sample or source (a link to a book would work as well) for the new MonoTouch.CoreBluetooth.
CoreBluetooth is just for communicating with devices that utilise the Bluetooth Low Energy Profile, such as watches, heart rate monitors etc.. It is not possible to use any other profiles with CoreBluetooth, so not possible to connect to another phone, a computer etc...
(Although given the name, I hope in future apple will provide lower level access to bluetooth comms in this framework)

Where can I get a complete list of Made For iPod devices that use Bluetooth?

Am working with a client to interface an iPad with a 3rd party device, a weight scale, that transmits its data via Bluetooth. I'm not building a an interface FOR the device, just trying to receive data FROM the device over Bluetooth.
The Apple doc indicates I need to use the External Accessory framework to communicate. You also "must include the UISupportedExternalAccessoryProtocols key in your application’s Info.plist" and list the specific protocol.
1) Is there a complete list of those protocols and what the format is for the Info.plist somewhere? The Manufacturer doc indicates it is certified as a Continua member, meaning it uses the ISO/IEEE 11073-104XX Personal Area Network device protocol. How do I plug that in?
2) Do I really need to use External Accessory framework for an ISO/IEEE standard device?
So, unfortunately the External Accessory framework is for communicating with devices that are certified as part of the MFI (Made For iPod/iPhone) program. If your bluetooth scales are not certified by Apple you are SOL.
You can apply to have a device entered into the MFI program here: http://developer.apple.com/programs/mfi/ - but it's not a trivial enrolment process.
See more information on a similar question here: What are the protocols supported in Iphone's External Accessory Framework

iPhone SDK 3.0: where is the Bluetooth?

i'm participating in the iPhone Developer Program and i have access to the iPhone 3.0 firmware and SDK.
one of the new features of the iPhone 3.0 -- is ability to use Bluetooth, but i can't find any documentation about it.
can someone point me please -- where is it?
The only way of using bluetooth directly is if you join the Made for iPod / Works With iPhone program and integrate the Apple authentication chip into your custom device. Once you've done that, you can use the ExternalAccessory framework which exposes a low-level IO stream API to the device.
Frameworks like Core Audio will let you play and record music via bluetooth headsets and the Gamekit framework will let you discover and talk to other devices via bluetooth, but the fact that it's bluetooth is not exposed to the developer at all.
Look at the GameKit API - it provides simple high level access to BlueTooth connections between devices (built on Apple's Bonjour discovery service).
If I recall correctly, you aren't allowed direct access to the Bluetooth, but rather, you are able to use certain API calls that will search for nearby devices. However, I'm not a developer currently, so I can't point you at any documentation. Perhaps someone else can back me up with a bit more information.
My iphone 3G & 4 will connect to my Sony BT1500 car head unit which was made well before iPhone existed (i.e it's not iPod signed).