Is file transfer possible to iPhone 3.0 via Bluetooth or not? - iphone

Is it possible to transfer files of a bluetooth device, lets say a digital pen (e.g. Nokia or Logitech io2) to the iPhone? I am interested if I could do a native application that could somehow get that binary file sent by the digital pen and do something with it.
I am used to rfcomm and obex but I can only find inconclusive results when I search for that and the support in the iPhone SDK... Any ideas?

No, on a normal iPhone you are totally unable to do this.
However, it is totally capable and the functions most likely exist, but Apple doesn't want people using them so you aren't going to find anything in their documentation. An extremely large number of these functions exist. If you wrote an app containing one of these functions, Apple wouldn't let it into the app store.
They're extremely and reasonably concerned about safety. Bluetooth isn't exactly known for being secure in any form.

Look at the EAAccessory reference.
It seems like it should be possible to write a custom app that talks to any bluetooth device - you'd have to implement the file transfer protocol yourself, but now that apps are free to talk to bluetooth devices I don't think the API will prevent you from doing what you stated you want to do.

To my knowledge, no – the iPhone OS does currently not support filetransfers via Bluetooth. I think you will have to jailbreak the software to get enough access to the Bluetooth stack to pull it off.
It is very telling that even if you have Bluetooth turned on in your iPhone, it does not show up on other devices when searching for units to transfer files to. I suppose it's saying something in its Bluetooth signature that tells other devices that it doesn't receive files.

Related

iPhone Bluetooth Communication Examples

I've been trying to find examples on communicating with bluetooth devices on iOS and have been coming up short. As I understand it SPP is not yet supported. At the simplest level, I'd like to send a simple 1 or 0 signal to the bluetooth device I'm creating. (It's a bluetooth switch that would turn something on and off). Is there a way to cleverly do this through the HID or HFP profiles?
The short answer to your question is that you can't connect to an arbitrary Bluetooth device you may happen to have, you can only connect to a Bluetooth device that has come through Apple's licensing program (i.e. the "Made for iPod/iPhone" label). From Apple's documentation:
Q: [The External Accessory framework allows] my application to communicate with Bluetooth devices. So why doesn't my application see the Bluetooth accessory sitting next to my iPhone?
A: The External Accessory framework is designed to allow iOS applications to communicate only with hardware accessories that are developed under Apple's MFi licensee program.
So there is no public API for accessing an arbitrary Bluetooth device from within iOS: you have to go through the External Accessory Framework to communicate via Bluetooth, and the EAF's mission is "communicate with MFi devices," not "communicate with arbitrary external devices." A sufficiently ingenious developer could probably hack something in there, but -
it's a non-trivial undertaking
you are spectacularly unlikely to get past the App Store approval process
So there's just not much percentage in it - the effort of doing so is unlikely to reward you.
If there already exists an MFi device that can be coerced into doing something that you want, that's probably your best chance - short of going through the MFi approval/licensing process yourself, of course. If you want to do so, have at it and good luck.
I'm answering this question late because Zeroxide's answer is incorrect (you can use a random Bluetooth keyboard with your iOS device because Apple implemented that connection, which is different from giving you a public API path to doing likewise) and I find Rokridi's answer to be incomplete-though-headed-in-the-right-direction.
Edit: A caveat has since been added to the linked Apple page about Bluetooth Low-Energy devices. So there's a loophole, but it's not a big one because very, very few Bluetooth LE devices have actually been produced as yet.
As far as i know, if your external device is non iOs device then you should use External Accessory Framework to communicate your application with it. Threfore, you external device should be certified by Apple through the Made for Ipod program (MFI). Hope this helps.
If you want to use classic Bluetooth (not BLE), then you have to first PAIR the iOS device to the Bluetooth device (in Settings). If you can't do that then you can't communicate with it with your app.
NO. whether device is MFi certified or not, you can connect device to iphone if bluetooth profile is HFP, or HID's (ordinary profiles. not iAP profile). Think about bluetooth headset or keyboard. does it need MFi mark on it to use? NO. Never.

Sending data via bluetooth on Iphone (iOS 5.x)

I have been searching and searching, but found nothing yet. Is it really true that there isn't a straightforward way to establish a BT connection from my iPhone to another (3rd party) BT device, i.e. an audio receiver. I know this is possible through the OS (I own a Belkin BT music receiver that works this way - it appears in Settings and from there I can connect to it). Note that I am not interested in pairing to iOS-devices, but an iPhone and my custom made hardware.
I've managed to find Google's BTStack at code.google.com, iBlueNova, Celeste and more, which all must be run through Cydia or similar and also I stumbled upon Apple's MFI-program, which seems fairly complicated.
Does anyone have any experience with bluetooth and iOS, if so, how and where do I get started?
If one might be interested, the project I am developing involves a piece of hardware with a BT device attached on it. The app should be able to send simple commands via bluetooth (basically just ASCII characters) to the device, which will react depending on what it receives.
If you are developing accessories that need to connect to iOS devices and want to use your own communication mechanism then your only option is to join the Apple MFi program.

How do you get the charge status of a connected iPhone from the Mac?

In iTunes, you can see the charge status of the iPhone currently connected:
This updates as the phone charges, and even shows when the phone is done charging.
Is there a way I can discover the charge status programmatically from the Mac? Any programming language or API is fine.
I would recommend setting up a bonjour service in an App on the iOS device to communicate with the computer. The app will then communicate the changes in the batter status using the batteryMonitoringEnabled property of UIDevice. Take a look at the samples code here.
BatteryStatus Sample Code
And here is the class reference
UIDevice Class Reference
And finally Bonjour programming
Bonjour programming guide
As far as I know, the only official way to communicate with the iPhone over USB/Bluetooth is by signing up to the "Made for iPhone" program:
http://developer.apple.com/programs/mfi/
Unfortunately the documentation seems to be closed to registered members so I can't find out if the API for this is public or private. You could contact Apple to check before applying.
UPDATE : As mentioned, this might not work for Mac/PC <-> iPhone communication over USB. There are several apps that do things with the phone over USB (although usually for reading/writing files). I'd start by looking at the source code of those:
http://code.google.com/p/iphonedisk
This should put you at least in a position where you have a connection to the device and are able to send/receive commands. Everyone who's ever done this sort of thing has had to spend time reverse engineering the thing :) The jailbreak community might be able to provide some insight too, although having to actually jailbreak the device is probably unacceptable.

What's needed to use the Apple Accessory Protocol?

I'm in the process of planning out a personal project that will be a media player and one of the things I would like to do is be able to dock my iPod touch (or any iPod or iPhone) and control it and play music off it like the speaker docs do that you can buy.
I found some information while searching around online for this but my question is can I make up a cable and use the serial protocol from any device or does Apple have this locked down so only certified/approved devices can communicate this way?
If you are looking to do this for yourself, I would recommend jailbreaking and the following resources on the web. These describe some methods of the Apple Accessory Protocol, and include some parts (at sparkfun) to execute. To get approved for the Apple method you need a corporation (or similar structure) and even legal counsel before you can get approved to even see the agreement you have to agree to in order to join.
http://nuxx.net/wiki/Apple_Accessory_Protocol
http://www.sparkfun.com/categories/101
There are even some great articles out there such as:
http://courses.cit.cornell.edu/ee476/FinalProjects/s2007/awr8_asl45/awr8_asl45/index.html
Good luck!
EDIT:
Since this is a relatively popular post, keep in mind that you can now use Bluetooth 4.0 LE for serial communication without approval from Apple (other than AppStore approval).
https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html
Only devices in the Made for iPod program which use Apple's proprietary authentication chip can communicate with the External Accessory framework on the iPhone or iPod touch. Such devices must also expose a protocol that iPhone applications can use.
It is a reasonably involved process to be approved as a Made for iPod vendor of products (similar to the App Store approval process, but for hardware), but it has become a lot easier than it used to be. With iPhone OS 3.0, Apple has opened up the program to many more third parties than just the usual large accessory providers.
In your case, I'd actually wait and use another vendor's iPhone-controllable stereo. Manufacturers are just starting to come out with hardware controllable via iPhone applications, so it's only a matter of time before one of the larger accessory providers creates something like what you want. If they expose a protocol for controlling the device, all you'll have to do is write your application to control the device via that protocol.

iphone and bluetooth device

could i connect my nokia phone to iphone using the following Object..?
1)GKPeerPickerController
2)GKSession
i mean (GameKit)
note that here not two iPhone but it is one iPhone other one is only one Bluetooth device..
thanks and regards
jalju
Could you be a little bit more specific about what your purpose is?
Are you trying to create a cross-platform game or simply transferring data between the devices?
Though the documentation clearly states that:
The GKPeerPickerController class
provides a standard user interface to
allow an iPhone to discover and
connect to another iPhone.
So I don't think this is the right way to go.