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

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.

Related

ASCII code on an external device through USB port

Is it possible to send an ASCII code on an external device through USB port using IOS API? I assume that it is possible through bluetooth connection, but I'm not sure through USB connector. Any thoughts?
I would appreciate if someone could put me in the right direction.
Thanking you in advance
That largely depends on the level of sophistication of this "external device". If this external device is just a bare metal embedded device without some sort of operating system you definitely need MFI.
Otherwise, you can run a usbmuxd server (e.g. on Raspberry PI with Linux) to establish a connection via USB. Usbmuxd is basically the technology that Apple uses to communicate between iOS devices and Desktop apps such as iTunes or Xcode. And yes, it is App Store compliant, e.g., Duet Display uses this approach to make an iPad a secondary display for your Desktop via USB.
There are several open source libraries that provide a high level API, e.g., PeerTalk or DarkLightning.

Communicate iOS with ODB 2

I need to create an app read info from the ODB2 device installed in a car and show the data to the user but in a "funny" way. So I need to read the data and connect the phone to internet simultaneously.
I found this questions:How to communicate with OBD II using bluetooth or wifi using iphone , but is from 2014, maybe now there is something.
I've been looking for an ODB2 device that can communicates with iOS via Bluetooth.
I found a couple of devices that can do the trick (like viecar or bluedriver), but using their own apps. Also, I found some devices that can talk with iOS via WiFi, but it would be annoying to be connecting your device to WiFi, then turning off WiFi and using mobile data again...
So my questions is:
Is it there any way to communicates via bluetooth with an ODB2 devices? Or better said, is it there any ODB2 device that can be used via Bluetooth with iOS?

Is it possible to connect external wired camera to ios device?

Is it possible to connect external wired USB Webcam to ios device lighting connector? I want to connect USB Webcam to IOS Device.
It maybe possible because there is an example.
But, I don't know It is truely possible.
It must be only wired connection, not wifi beacuse battery problem.
Thank you.
Yes, it's possible. There are a few ways to do it:
1) Using a jailbreak iPhone with IOKIT to support control and receiving streaming video from the webcam.
2) Develop a MFI complied lightning cable to connect
david

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".

iOS app communicate with an app running in OSX via usb cable connection

Does iOS SDK provide a way to let iOS app talk to app running in OSX/Windows via usb cable connection?
Or, socket is the only option?
If you want to interact with an OS X program from iOS via USB, the PeerTalk lib seems to provide a convenient way to do so (without having to join the MFi program).
According to the github page, PeerTalk
Provides you with USB device attach/detach events and attached device's info
Can connect to TCP services on supported attached devices (e.g. an iPhone), bridging the communication over USB transport
Offers a higher-level API (PTChannel and PTProtocol) for convenient implementations.
[is] Tested and designed for libdispatch (aka Grand Central Dispatch).
It also
has successfully been released on both the iOS and OS X app store.
A great example is Duet Display which is a fantastic piece of software allowing you to use your iDevice as an extra display for your Mac using the Lightning or 30-pin cable. [...]
Communication via USB cable is possible but everything is under strict MFi NDA.
One link that might interest you:
Microchip: 3-step Approach to Develop iPod®, iPhone® and iPad® Accessories
Some more information on Apple MFi program
There are no fees to enter the program but you will have to fill out some 'paperwork'.

Resources