I want to develop an app which will communicate with devices via bluetooth. I am not able to find any tutorial to help me with this. I don't mean bluetooth 4.0 LE but classic bluetooth. All I have found is CoreBluetooth framework but I think this is only for bluetooth LE. I have found also something like IOBluetooth and IOBluetoothUI but I am not sure if it is for Mac OS or for iOS. But still can't find any tutorial or something to help me understand whole process (discovering, establish connection, communication,...). Can you help me with this?
OK so I just found this article.
According to this article there are 5 ways how to work with Bluetooth:
Enroll MFI program - expensive and long period process
CoreBluetooth framework - works only with Bluetooth 4.0 LE devices
GameKit framework - only for iOS device (two iPhones) so you can't work with other device then with iOS
Private API - app with private API won't be approved by Apple on the Appstore
Jailbreak
It seems there isn't normal official way how to work with bluetooth.
My case: I want to communicate with not iOS device which has bluetooth 2.1 and I want to have it on the app store -> I can use only first one so I am screwed...
You can check out GameKit's bluetooth feature. A basic tutorial here
Also you can check Ray Wenderlich's tutorial which is a bit more enchanced one. Can be found here.
Related
I'd really like to start testing my iOS apps Bluetooth capabilities, but have run into a few problems:
I have a device made with a RN-42 module, but it's not the Apple version and I don't have the Apple authentication module at the moment (I ordered it, but shipping from China can take a while). I know what the messages will look like, but can't send them to my iPhone!
I can use the module with my Macbook, but not in the iOS simulator! Apple has taken down all of the documentation related to getting the iOS < 7.0 to use a separate bluetooth dongle, and my efforts have left my 6.1 simulator endlessly spinning on the bluetooth screen.
I'm new to using Bluetooth, so this may be a dumb question...
Is there a way of getting a bluetooth client device (I have a Mac, another iPhone, and an Android tab) to act as a server module that can send (and receive) Bluetooth data to my iPhone?
Client/Server as per developer.bluetooth.org
Thanks!
Not 100% sure your meaning of "server module". But in CoreBluetooth, you can use CBPeripheralManager to broadcast data to other iOS or Mac apps.
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBPeripheralManager_Class/Reference/CBPeripheralManager.html
If you're using standard Bluetooth (i.e. not Bluetooth LE or Bluetooth Smart or whatever you want to call it), you'll need to enroll in the MFI program or work with an MFI certified device (such as a Redpark cable) and use the External Accessories library provided by Apple. If you're using Bluetooth LE, you can use the Core Bluetooth library provided by Apple. If you fall into neither of those cases, sorry, you can't use Bluetooth on iOS.
we are about to start developing an app for iOS that reads data sent via Bluetooth from a device. Which framework should we use if the Bluetooth device that sends the data is not BLE 4.0? In addition to this, if it is possible to develop to app by using a different framework, will the same app also be able to connect to BLE 4.0?
Any pointer is highly appreciated.
Thanks in advance for any pointer.
The framework you are looking for is the ExternalAccessory.framework (although there are limitations). You can use it and the Corebluetooth.framework inside the same app, but they will not be related on which devices they can connect to. Corebluetooth is Bluetooth low energy only. Check this answer and the related links for more information on using the ExternalAccessory.framework :
How to use bluetooth classic instead of le
IOS noob question here, though I hope its not a repetition.
Developing on XCode 4.3 targeting IOS 4+.
I am struggling with finding guidance on how to get a list of paired Bluetooth devices. Seems like there are multiple bluetooth interfaces but for dedicated purposes. Please correct me if I got the following wrong:
CoreBluetooth: Bluetooth LE (Bluetooth 4.0)
Gamekit: peer-peer based on session id
EAAccessory: MFi Bluetooth devices
There seems also to have been a defunct "BlueToothManager" API in XCode 3.0. Can someone share with me how to get a list of BlueTooth devices currently paired with the device running my app? I am only interested in make, model, identifier (or serial number). I dont actually need to communicate with the devices, just to be sure.
Thanks in advance.
Try download this examples and get your need solves:
CoreBluetooth-Demo Link doesn't work. Links to github 404
Appcelerator-iPhone-Bluetooth-Module
proximity
bluewoki
Titanium-Bluetooth-Module
Hope will be a helpful
I am trying to make some code regarding USB HID devices. I have found an article about Bluetooth programming which uses Game Kit Framework.
Now I'm looking for some tutorial or maybe some code to work on connecting HID device via USB. Where should I look? Is Game Kit the right way? Is it difficult to implement communication between iOS and HID device?
Actually I just found out that you can develop for external devices with MFi program. It's nicely described here. Also some technical info in Apple's documentation.
But I don't really know what that means... ?
You can use IOKit for USB, but it's a private framework on iOS - so it depends if you want to deploy to the App Store.
Here is the USB Intro for Mac, I'm not sure if it's the same on iOS - but just to get the idea.
The new iPhone 4S has support for Bluetooth 4.0 Low Energy devices. Is there an API for communicating with these devices in iOS?
It is part of the iOS 5.0 SDK. You can download the SDK and check it out.
As someone has mentioned, the APIs are available in the iOS 5.0 SDK. However, bear in mind that those APIs only provide support for ATT client, if you want to add services and act as a server you're out of luck for now. I truly hope Apple will add server support at some point, since some profiles (Alert Notification or Proximity) would benefit enormously: being able to be notified when you receive a new SMS/email or being able to "ping" your phone to find it would be great.
TI has a nice development package that includes a BLE peripheral, programmer, sample code, and sample iOS App. This is a great place to start and shows off most aspects of the Core Bluetooth API in iOS
http://processors.wiki.ti.com/index.php/Category:BluetoothLE