IOS: How to detect make/model of paired Bluetooth 3.0 device? - ios

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

Related

iOS - Bluetooth to serial device - Will it work?

I've been playing around with a bluetooth to serial device for a while now trying to get it to work with Android. I've got it communicating properly with Android and every thing seems to be working fine there.
Now I need to get it to work with iOS. It seems Apple is being all Apple like as always and only supporting certain interfaces. According to this document, only UART, USB, SPI, PCM, SPDIF, and SPP are supported with the device that I'm using. More information on the device can be found here.
I'm not really sure what any of those are other than USB and SPP, but I believe SPP doesn't work with iOS.
So my question is will this device work with iOS for bluetooth to serial communication?
Also, if this device won't work (which I'm assuming it won't), what are some good bluetooth to serial options? According to some of my research, I need an MFi certified device?
Upon further research it looks like Bluetooth LE is an option using devices like these with connectBlue Low Energy Serial Port Service:
http://www.u-blox.com/en/bluetooth-wifi-multiradio-modules/bluetooth-low-energy/ols425-olp425-modules.html
http://www.spezial.cz/pdf/RBS421-Product-Brief.pdf
I was able to get Bluetooth to serial working on iOS by using a Bluetooth Low Energy to serial device which uses the TruConnect service. I followed this guide to get everything working:
https://truconnect.ack.me/1.5/apps/communicating_via_ble#reading_from_a_truconnect_device_serial_interface
This is the device I ended up using:
https://serialio.com/product/bluetooth-serial-adapter/bluesnap-smart-bluetooth-40-rs232-adapter
We have been following this issue for some time and you are correct: the only way to get serial data from a device to your application is via an MFi certified device.
Previously answered here.

iOS PKPKT BLE concept

I understand that the iOS App "PKPKT" is using BLE (Bluetooth Low Enery). But what I am curious about it is, is it purely using BLE only? Or does it switching between BLE and Classic Bluetooth?
I tested with a iPhone 5 and a iPhone 5s with both installed the app. I turned on bluetooth on both devices. And then i checked the "DEVICES" list to see if the other iPhone is paired with one another, I found that they are not. Until i launched the PKPKT on one of the device, and the i check the "DEVICE" list again, now they are paired and connected. So, i'm thinking is this pairing done by the BLE pairing? Meaning one of "Just works", "Out of Band", or "Passkey entry" methods.
There is also a "Chat" functionality in that app. This make me curious if the chatting function using BLE or Classic Bluetooth?
So my question is actually "Is switching between BLE and Classic bluetooth possible?". This is part of the study on this BLE technology. Hopefully someone could help me and other newbie on this new technology.
Thanks in advance!
I wrote PKPKT. I only use BLE. No classic. iBeacon is cool but doesn't have the background scanning needed to discover other players. I use game center, but only for scores, no sessions. It's optional in the app to enable game center (those banners can be distracting!)
The chat is also over BLE.
Because the connections are not encrypted, you don't need to manually pair the devices, and "just works"
I think you might find this link helpful. It implements something that looks to be a simpler version of PKPKT. I believe the app uses a combination of GameKit/iBeacon. The app requires iOS7.0+ and states, "PKPKT does the hard work of finding other players by detecting them using Bluetooth Low Energy (BLE) in the background." iBeacon would be the most battery-efficient way of accomplishing this and is a new feature in iOS 7. There is a wealth of information online(particularly on SO) about peer to peer bluetooth gaming using GameKit, if you are interested.
We can't say for sure unless the developer lets us know. If one were to attempt to recreate the application, GameKit and iBeacon would be the technologies that I believe most would recommend.
You might find this project helpful as an overview of how to use Bluetooth LE to communicate between two devices. You don't need to pair the devices, and unlike iBeacons, it works when the app is in the background.
SimpleShare - Easy Proximity-based Sharing for iOS
You can use the delegate methods of the SimpleShare project to easily share arrays of strings between nearby users running your app, such as user IDs, which you could then use to get more info, photos, etc, about that user from a web service.

How to connect iOS with BLE and previous versions of Bluetooth

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 and bluetooth

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.

Using custom/existing bluetooth HID with iOS Devices?

I am working on building or using an existing bluetooth HID device (something like this http://www.icontrolpad.com) and to get my iOS device to read the data coming from it. So i have some questions regarding this:-
Is it possible at all to do this, considering that the Bluetooth stack is not available on non jail broken devices.
Do i need to register with apples Mfi program? If i don't need to, what are the alternatives?
If i do register with Apple's Mfi program will i get access frameworks that will allow me to read data off the Bluetooth stack.
Considering that there will be a custom application sitting on the iOS device that needs to communicate with the HW im building, what are the implications w.r.t the approval of the app from Apple's side?
Thanks in advance, any help is greatly appreciated!
Core Bluetooth framework is available for Bluetooth Low Energy devices on iOS 5, no MFi membership is required.
With Made for iPhone, you basically get a serial pipe to your device using the ExternalAccesory Framework (in fact, it IS using the serial port profile plus some authentication). So you while you cannot use an actual HID device, you could send your data over.

Resources