Is it possible to build this kind of iOS Bluetooth app? - iphone

I want to know if it is possible to build this kind of bluetooth application on iOS platform.
There are two devices:
1. bluetooth device with installed camera module
- This device only has a camera module, a memory, and a bluetooth module.
2. iOS device. (sleeping - with screen black, possibly locked)
The bluetooth device can be used to do the following:
1. Press a button to take a picture
2. Send the picture via bluetooth to the Iphone,
3. Iphone wakes up, sends the picture to a server.
The key points that I'm curious about is
1. Is is possible to wake up the device with a bluetooth signal,
2. Is it possible to launch an application/wake up an application with a bluetooth signal so that it can process information/send it?
Also, if this functionality is possible, then can it be done with classic bluetooth module, without registering for the MFI program? or do I have to use BLE?

Techniques to discover the device:
1. Core Bluetooth Framework: only works for Bluetooth low energy i.e BLE.
2. EAaccessory Framework: Apple provides an API called External Accessory Framework, which can be used to interact with paired Bluetooth devices or device connected through wired, for which we have to fix the apple connector at the base of the device.
3. Gamekit Framework: if we are using game kit framework then it is necessary that the application is running in foreground in both of the device i.e if the application is in background then it is not possible to pear the device and second thing if we are using game kit framework then there is a limit of about 90k per 'send' ,so if our file is larger then 90k then we have to break it up.
If you have any queries then you can ask..

Related

How can I connect an iOS device to non iOS device (Arduino devices) via Bluetooth?

After searching on Google, I found that people say it's only possible to connect an iOS device with a non iOS device with the 'MFi program'. Is that true?
My project is mainly focused on sending and receiving information with the Arduino device via Bluetooth directly.
Is communication between iOS and non iOS devices without jailbreak possible? If yes, is there a reference?
(I viewed Stack Overflow question How can an iPhone access another non-iPhone device over wireless or Bluetooth?.)
As I stated in the above-linked question, general Bluetooth communication to external devices on non-jailbroken iOS devices is restricted to MFi-compliant Bluetooth hardware.
However, newer iOS devices (iPhone 4S, new iPad) are capable of Bluetooth 4.0 LE communication with external devices without the need for those devices to be MFi-compliant. This interaction is done through the new Core Bluetooth framework, which lets you send and receive arbitrary data to and from Bluetooth LE devices. This only works with those listed newer iOS devices, though.
Tim points out an interesting hack that you might be able to get away with in making your device appear like a Bluetooth HID keyboard. Devices like this barcode scanner have special modes to appear as HID devices to iOS. You might be able to pull something together based on this, but all data transfer will be one-way from your device, and it looks like this will require entering that data into text fields as if you had a keyboard connected.
Alasdair Alan's "iOS Sensor Apps with Arduino" is a good resource to look at. I've used Wifi with another microprocessor (mbed) but not sure about bluetooth. Alasdair is active on Twitter and he usually is kind enough to answer questions.

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/

Bluetooth data acquisition in background in iPhone 4G S

I want to develop an application for the iPhone 4GS that supports Bluetooth 4.
The application would continually listen to the data transmitted by a heart rate monitor over Bluetooth, and show information on a screen.
To achieve this, the application would have to listen to the data even when it's not the active foreground application.
Like Android, is it possible to silently listen to Bluetooth events on an iPhone as a background service?
I can't determine exactly what you're asking, but here are two tutorials for incorporating Bluetooth in iOS apps:
iPhone Bluetooth Programming
iOS Bluetooth Programming - Getting devices to see each other
Also, here is Apple's list of Supported Bluetooth profiles.
You won't find serial port profile (SPP) in iOS devices if you're looking for that.
So question about using it in the background would seem irrelevant.
You could use 'old style' FSK modem over BT audio an then decode the signal in
code. On the other hand you should consider going WiFi. Microchips MRF24WB0MA/RM for
example supports adhoc/infrastructure netwroks and it also has Bonjour support.

turn on bluetooth device from iphone

in my application i'm trying to turn on a bluetooth device from the iphone. The bluetooth device is one of those you put in your ear to talk without holding the phone. I wonder if it's possible to turn on the bluetooth wirelessly from my application.
No, because the bluetooth device would have to be ON to receive the signal to turn ON.
The user manages paired bluetooth devices. If you just need input, see: Can the iPhone 3.0 SDK provide full access to Bluetooth devices (headsets)?.

Can iPad know when your iPhone is close by?

Is there a way to create a background app( once this is available on the iPad ) that can detect when your iPhone is close by? So I'm thinking that it would require the use of bluetooth. I'm thinking you could use this for syncing and such.
Ignoring the aspect of backgrounding (which isn't really what you were asking about in totality):
The way this would work on a running application is that both devices would need to have the application running. Then, they would both have to register themselves through Bluetooth using Bonjour/GameKit.
With traditional bluetooth iPhone/iPad games, the game checks bluetooth and displays local bluetooth players, and then the user can select another player.
Your application would retrieve that list of local bluetooth iPhones, and compare the device name to the device name which you have determined to be your iPhone.
Here is some: GameKit Documentation.
You can do this with two actively running apps. But backgrounding these apps... of course: NDA.