Bluetooth programming in iPhone - ios

I am planning to develop an iPhone application to transfer files/data to/from my Windows Desktop using Bluetooth.
Please let me know whether the programming interface(SDK)is available in iPhone SDK for this purpose.
In Windows Mobile, I can transfer the file either using a FTP profile or writing application on top of Serial Port Profile(RFComm).
Can anybody tell me, whether this can be possible with an iPhone by writing appropriate application. If not, please let me know alternative way to transfer files/data over bluetooth from iPhone to a Windows Desktop PC.

No, FTP or SPP bluetooth profile are not open in iPhone...

If you get into the made for ipod program, you might develop a bluetooth dongle for a computer (it can't use the normal one built into the computer as it needs a custom apple chip for encoding). This is the only method that could do something like what you want over bluetooth and get your app into the app store. You can implement a similar functionality more readily over wifi.

Yes you can. Use the Human Interface Device profile, and have your USB device pretend to be a keyboard. You can then have your app receive text input from the "keyboard". simply encode your data as ASCII encoded hex or base 64 and transmit. Whether or not your app would be allowed in the app store is a different matter.

There are 2 requirements to use iOS BT Classic for data transmission over RFCOMM.
1) You need to be enrolled in Apple MFi program.
2) The BT accessory which will be connected to iPhone needs to have a special HW chip called "MFi Coprocessor".
Both requirements need to be satisfied if you are developing FW for the BT accessory.
The latter one is required when you are coding iOS app.
BTW, you will not be able to communicate with Windows machine unless you have a BT dongle with MFi chip inside - see the second requirement.

Related

iOS app to transfer data from external hardware to iphone

I am developing an application in swift in which i want to transfer some data from my hardware device(A kind of chip) to iPhone.Some data will be displayed on the screen.But i want to use the standard lightning cable.Is it possible?
This kind of communication isnĀ“t possible using a lightning cable but with a lightning connector. You need to include a chip in your hardware for the authentication.
You must apply to become a Mfi (Made for iPhone) certified developer. Also you have to submit your hardware to Apple so they can review your app together with the hardware device.
Some useful links are:
Apples SDK for this kind of communication
Made for iPhone Program
Hope it helps.

Sending text from iPhone to Windows PC via bluetooth

How to send data from an iPhone app to Windows app (or service) in real-time? Ideally over Bluetooth.
Basically as I type on my iPhone app, I want that text to appear on my Windows App (with-in a second or less).
How can I go about achieving this? I'd imagine there is some center-peripheral setup I need to establish. What are the libraries to use on both sides? Have never worked with Bluetooth in the past, so kinda lost. I looked into Apple's Multi peer Connectivity but that looks like iOS-Mac specific.
I have no idea on the Windows side, on iOS you would use Core Bluetooth to configure the app as either a peripheral or a central.

iPad Camera Connection Kit to Talk to Non-Storage USB Devices?

I am doing some experimenting with robotics and have a USB servo controller that I would like to connect to my iPad. Does anyone know if it's possible to access USB devices such as this on the iPad? And if so, what mechanisms can I use to talk to it? The servo controller's manufacturer has made the controller's protocol open so if I can talk to it, I should be able to use it.
It is most likley you will not be able to control the servo DIRECTLY form the iphone.
A servo is controller by some sort of "servo-controller"
And this server is controlled using an RS232 interface that accepts commands in some sort of characters or bits.
So I found this rs-232 app that looks interesting on app-store but not sure how to use it?
But you can buy cables like this for iphones and ipads Keep in mind that RS232 and TTL use different voltages.
Instead of getting more hardware for the iPhone / iPad, use the built in Bluetooth and the SPP (Serial Port Interface) with some code and this excellent piece of kit (i use it often it great) This just needs some power (it runs on TTL#9600bps not RS232 so check for voltage compatibility) you pair it and get a proper virtual COM port to communicate over Bluetooth without any special programming! You need to check if you iOS allows you to use SPP Bluetooth Profile. A lot of older iOS devices do not allow much over Bluetooth- so you might need a cable.
There is nice project here on how to use serial on iOS
And here is way to use Bluetooth HID included in most iPhones / iPad with a clever device that re transmits it using Bluetooth SPP .. hehehe - Suck on that Steve
And here on spark fun is a ready product. whatever you type on the iPhone (or using a programme that pushes characters to Bluetooth HID) which get converted to TTL...
You can use the ExternalAccessory.framework and its APIs.
There's also a brief guide on External Accessories.

RS232 for iOS device

Is it possible to pair an iDevice to an rs232-bluetooth adapter for the purpose of sending serial commands like it would through an iDevice dock connector to rs232 (just like the Redpark Serial Cable does)? I ask because the company I work for is thinking of having an iDevice control one of our systems for demo. I know it doesn't relate to anything specific but any information would be greatly appreciated.
(See also iPhone to RS-232 via Bluetooth)
Bluetooth modules exists that support MFi (Made For iPhone) such as this one from connectBlue http://www.connectblue.com/products/bluetooth-products/bluetooth-modules/bluetooth-iphone-ios-accessory-module-obs414/ So the standard iPhone Bluetooth stack can make a SPP/RFCOMM connection to that device. That device could be added to a board along with RS232 level-conversion etc... And thus success.
I don't know whether someone sells such a device. The RS232 device that connectBlue sells seems not to support MFi, http://www.connectblue.com/products/bluetooth-products/bluetooth-devices/bluetooth-rugged-serial-port-adapter-rbs433/
Not really. The GameKit is one way to access bluetooth in iOS, but it is very limited in what that API allows you to do.
Depending on what you are building, you might be able to use the Apple Made for iPod program, but it's probably a long shot.
http://developer.apple.com/programs/mfi/
The best way to go is probably to design a device that connects via WiFi. I've gone this route, and it worked out well. If you must interface with something with an RS-232 interface, you might design an intermediary "adapter" that connects via WiFi to the iOS device, and via RS-232 to the other device.
If you don't have a need to distribute your app via the App Store, you can use Redpark's iOS serial cable: http://redpark.com/c2db9.html. (Disclaimer, I've never tried one, but according to someone at Redpark, jailbreaking is not required, you just can't distribute your app on the app store.)
You could design a small dongle that attaches via the dock connector, and broadcasts over bluetooth to your other device.
Or you could use WiFi instead of bluetooth... perhaps communicating over WiFi to something that's physically plugged into whatever you want to control.
I worked on a jailbroken app which used BTStack to communicate with a serial device. You might be able to use this for your demo.
If you're still looking to use bluetooth, this helped me out alot to facilitate the standard serial connection for prototyping without jailbreaking:
http://www.seeedstudio.com/depot/bleshield-based-on-bluegigas-ble112-module-p-1367.html
It works on the Bluetooth 4.0 enabled iOS devices and all of the schematic, boardfiles, firmware sources and the iOS App sources are available here:
https://github.com/michaelkroll/BLE-Shield

IPhone Bluetooth Connectivity to Non IOS Devices

I was wondering, if there is a way to use IPhone as an HID device, with some other device like PS3. I checked out the Bluetooth specification and IOS Devices do support HID Profile. So I thought it would be easy to pair my iPhone using passkey mechanism and should be able to start using my iPhone as keyboard or mouse without much hassle. But I found very soon that this assumption is naive and I need to develop custom solution.
I was initially thinking about using GameKit framework, but I think it only works between two compatible IOS Devices. If I want to extend this capability, then I have to use iPhone External Accessory API .In my analysis, I also found that iPhone will only communicate and pair with devices that are licensed by Apple. (Made for iPhone\iPod program). Does it mean that, if I want to use iPhone with another device, I need to get that device approved by Apple. ( Which will not surprise me one bit). Also if someone could point me to more detailed documentation on this, that will also be helpful.( What is an MFI developer board ??)
I do not want a solution that needs me to jailbreak an iPhone. (or any solution that will disqualify my app by Apple).
So to summarize:
1- Please validate my findings, correct them if they are wrong?
2a- How does External Accessory API Work?
b- Can I use this to connect to third party accessories ? (or is this only for accessory developers).
3- Or is there a better solution without using External Accessory API?
Please provide supportive documentation or link if you can. Thank You.
You are unlikely to get on the External accessory program from apple unless you are a big company ( you can try, but I have read this a number of places) . iPhones use a proprietary Bluetooth interface that and hardware must also implement this interface, so not much chance of getting it to connect to any other hardware directly.
Most apps like this (Remote Mouse) for example, connect to your wifi network, and have another application installed on your computer. The iphone can then talk to this application over the wi-fi network, but not bluetooth. I would suggest that the only way I can see this would be possible to to create the server app that you install on a computer on the wi-fi network that then in turn controls the 3rd party device if there is an API that you can use from the desktop app to control the 3rd party device.
This is just what I have found when I researched about this for making an app for iPhone to control a bluetooth watch. I had to jailbreak in the end to replace the bluetooth stack on the iPhone with one that could connect to any hardware device. Not limited by apple.

Resources