iOS, Simulating HID Keyboard over USB - ios

Environment
Windows Desktop
iOS8.* USB Connected to the Desktop machine
libmibiledevice
C++
Use-case
Desktop to programatically Simulate an iOS HID keyboard.
With Android this can be achieved using the AOA2 protocol, Does an equivalent exist for iOS? ( one that doesn't req HW implementation or re-packaging/hacking )

Your best bet is to not go down the USB path but rather use Bluetooth as iOS devices have support for pairing Bluetooth keyboards with them. Any "real" Bluetooth keyboard can be paired with an iOS device, so assuming you can get another system to simulate a Bluetooth keyboard, you should be able to get it to pair with your iOS device.
A quick search turned up this question which might be of interest to you:
Is it possible to make a computer behave as a bluetooth HID device?

Related

USB programming, transfer file from iOS device to Embedded os device?

I really need to know whether a iOS device can transfer a huge file to a embedded OS device through USB via my app. It is like the embedded os device has only a usb port. So is it achievable like the file transfer happens through the iOS device's data cable, through iOS USB programming?
In order to use the 30 pin or Lightning connectors on an iOS device you will need to join the Mfi program and use MFi chips in your embedded device, so the short answer is probably "no".

Sending data from ios device to windows pc over an Bluetooth HID dongle

Aim
I want to pass data from iOS device to a PC using Bluetooth. The data should look as a keyboard input to the desktop. I have been doing some background research about the same and thought of using any HID keyboard emulator dongle. One can pass the data over using the Bluetooth and the dongle will show it as keyboard input to the PC.
Outcome of some related research:
Initially I tried to pair an ios device with a windows PC directly. I was unsuccessful. After some research and reading many questions, it turns out that an ios device can only be paired with a MFI( Made for ipad/ipod/iphone) compliant device/accessory, i.e those which have signed NDA with Apple and have joined the MFI program. It can also ofcourse be paired with a Mac.
Question:
With the release of Bluetooth 4.0, it seems that this restriction
can be overcome and it can be paired with any device compliant with
BLE 4.0. Is it so?
If one can use a Bluetooth to HID keyboard emulator dongle using BLE 4.0, is it possible to pair an iOS device which support BLE 4.0 with it and how?
Has anyone tried any particular HID keyboard emulator dongle supporting
BLE 4.0? If yes then any preferences. I came across Bluegiga USB Dongle but not sure if it will solve the purpose.
I would be thankful for your input.
Even with a Bluetooth 4.0-compliant device, communication via standard ("high energy") Bluetooth with an iOS device is still only allowed with MFi-compliant devices. Bluetooth Low Energy communication with iOS devices is the part that's now completely open and unrestricted by Apple. If you wish to send data to another computing device (Windows, Mac, Android, etc.), Bluetooth LE is what you're going to need (short of someone reverse-engineering the Bonjour over Bluetooth PAN connections).
As of iOS 6.0, iOS devices can make themselves look like Bluetooth LE peripherals, so desktop computers set up as Bluetooth LE central devices can connect to them. You could put together your own profile for communication, since you'd control the iOS and Windows sides of things, or you could make your iOS device mimic a standard keyboard, heart rate sensor, etc.
As far as compatible dongles, the answers to this question list several Bluetooth LE dongles that are known to work with Core Bluetooth on the Mac. The CSR ones seem to be the most frequently cited there and among other people I've talked to. I can't speak for Windows support, but I'd assume there would be driver support there, and I hear Windows 8.1 expands support for Bluetooth LE.
I do have the BLED112 (the Bluegiga USB dongle), and that shows up as a comm port when its drivers are installed. You might talk to that in a slightly different way than you would one of these other Bluetooth LE dongles. I know Bluegiga uses it on the Windows side to capture a little more data than I think you'd normally get from one of these other dongles. The other dongles might present a more universal interface for interacting with Bluetooth LE on the Windows side.

ExternalAcessory Framework for iOS: using the iphone as a usb device

I'm looking into the iOS sdk for examples of the ExternalAccessory framework to use the iphone/ipad as an USB device that can be plugged into a PC or Mac and present as external device (like a midi controller or something else)
The App i want to create requires connecting to a host (PC or Mac) the iphone via USB or bluetooth and present to the host a functionality. How can i implement this?
You'll probably have an easier time connecting via WiFi. You need to be part of the Apple Made for iPhone program, which is not easy to get into, to use Bluetooth or the dock connector to talk to peripherals. There's no such restriction on the use of WiFi. Also, you'll find a lot more helpful examples of connecting via WiFi on the web.
CoreMIDI is the appropriate API for emulating a MIDI device, which may be possible over USB using Apples Camera Connection kit.

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.

Bluetooth programming in iPhone

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.

Resources