问题
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 ?
回答1:
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/
回答2:
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.
来源:https://stackoverflow.com/questions/13768599/what-profile-can-i-use-with-corebluetooth