Using gPhoto on iOS to communicate with digital cameras over USB - ios

I want bidirectional USB communication between an iOS device and a digital camera using gPhoto2. gPhoto2 "abstracts communication ports and camera protocol, to allow a complete modularity."
Issues I've found:
Apple's strict requirements for apps interfacing with the iOS hardware layer will enviably lead to rejection in the App Store approval process. MFi may mediate this issue.
Getting full access to the lightning/30-pin doc connector to send/receive USB packets may require a private iOS library such as IOKit, and that will get my binary rejected from the App Store.
Connecting a camera via lightning/30-pin launches a PTPCamera-like task to allow the photo app to take over to import photos. That task must be killed get full USB access on OSX, so I'm guessing it's similar on iOS, and killing a task from an app's sandbox seems impossible.
Compiling gPhoto2 for iOS is inherently difficult since I can't dynamically link the gphoto2 library, and thus I must compile it as a static library.
Those are some of the issues I've run into. Is this project worth pursuing? Do you think it's even possible?
Yes, I know there are other solutions, such as using a wifi router or a custom built bluetooth module plugged into the camera to shuttle USB packets to and from the iOS device.

Related

ios: Communicating between host and USB-Connected device

Android provides "adb" as a mechanism for communicating between host and apps on a USB-connected device. This is useful for automation (e.g. execute some code on the device and collect the results). We need this capability for iOS. Does a similar mechanism exist for iOS?
Yes, there is a similar mechanism. The underlying technology/service is called usbmuxd. It is basically a multiplexing service that allows you to connect to your iOS device via USB using the TCP protocol. Apple uses this service for any communication between your iOS device and iTunes or Xcode, e.g., to install apps via iTunes.
If you want to leverage this mechanism, there is a library that provides a high level API for iOS. They have reverse engineered the whole protocol including things like remote debugging via lldb and app installation.
http://www.libimobiledevice.org
If you just want to sideload compiled binary bundles into your own app you might get away with using my library. It allows you transmit arbitrary data via USB to your app and supports both iOS and tvOS.
http://www.github.com/jensmeder/DarkLightning

Does iOS 8.3 now support Wifi debugging?

I updated iOS on my phone to 8.3 and I saw this message popup on first boot, but I have not seen it since:
I have been searching all day for information and I can't find a single reference to this message or to Xcode supporting wifi debug.
I am using a macbook pro 2009 model, and I have read that this is not compatible with the new continuity features (as well as airdrop etc). I am wondering if this is part of the wifi debug (and also if BTLE is involved at all). Of course it is all speculation since I cannot find any documentation about this.
Has anybody used wifi debug, or can point me to any documentation?
No, the feature was disabled as it causes serious security flows, for example when debugging you can fake location for any app, access confidential data like your number, udid etc. WiFi can be used now only to sync using iTunes.
It's restricted to USB only. You would need to write a bridge between USB and WiFi. You could in theory connect iPhone to Raspberry Pi, use open source crossplatform libMobileDevice. And mirror all USB requests from your XCode to this device USB.

Scanner device control in ios

I want to control scanner device through my iPhone app. Probably, the scanner machine writes output in particular path(image folder), but i want change the path using my iPhone app. I went through TWAIN api and MFI (made for iPhone) program, but i want to use already developed one. Is there any company that provides library to access its scanner device?
https://developer.apple.com/programs/mfi/
http://www.twain.org/
I have worked with cctv camera(ip-camera), we can handle it by its ip-address. I am looking for something similar.
From what I can understand from your question, I do not believe there is a way to connect to a Scanner via the USB/Lightning port.
Some scanners nowadays either have the ability already or the option to allow for Wifi connection with the device and the scanner. But these require development kits from the manufacturers and may involve a license fee or NDA.
From memory Canon, Fujitsu and Epson have scanners with this sort of capability, but there is no unified way of connecting them and would have to be done through individual SDK's

Transfer pictures from external camera circuit within my iOS app programmatically

I'm working on my senior engineering design project and I need your help! For this I have my iPhone app receiving images from a external camera circuit, which I built.
To interface my iPhone app to the camera circuit, I have looked into the following approaches:
Build a bluetooth module on the camera circuit, to transfer images to the iPhone
Use Eye-Fi SD card to transfer images to my app somehow! link:http://www.eye.fi/products/iphone
Build a circuit, to make a wired connection to the iPhone with the 30-Pin dock connector
Here are the problems I'm facing with each of these. My actual questions for you guys are highlighted in BOLD:
The iOS BlueTooth framework (4S only), only supports Low Energy Devices. Looking at the the modules out there like this one, I'm doubting it will work for image transfer, which seems to be a bulky task for low energy bluetooth. I know there are jailbreak apps on the cydia store, which do regular bluetooth transfers, but I was unable to find those private APIs for such a task. (NOTE: I'm making this app for my purposes, so feel free to suggest any private/unofficial APIs). Question#1: How can I interface to a regular bluetooth device (not another iPhone) and transfer data?
EYE-FI card sounded amazing as a consumer because the company has their proprietary iPhone app to transfer the images from the EYE-FI SD card. Problem is I can't figure out how to easily interface with the EYE-Fi card in my code. I researched the iOS CFNetwork framework, but haven't had any luck. Question#2:How can I interface with the EYE-FI card in my app?
Building a circuit seems simple enough with this development board, but I read somewhere that the iPhone may not recognize an "un-registered" accessory. I have a developer license but not a MFi licence. Question#3: Do I need to be registered as a MFi developer to create and use this external accessory in my App for my own purposes???
You might try setting something up through a serial port since joining the MPi program is prohibited for individuals. You could possible use a connector like this one http://www.amazon.com/neXplug-Ultra-Small-Micro-Adapter/dp/B0055PCVDO/ref=sr_1_1?ie=UTF8&qid=1339309918&sr=8-1
The Apple website recommends individuals/hobbyists to use " recommend that you use a third-party solution which will allow you to connect iOS devices to serial devices and to write iOS apps that communicate with these serial devices" (from mfi.apple.com/faq).
I am also working on an external camera that can hook to the iphone/ipad. I will be using a serial port in order to get around the MFi requirement for external iphone/pad devices. Trying to use bluetooth is too complicated and the data stream isn't big enough for pictures. the wired version will work much better.
I hope this helps and that your college term and project are not already finished. Best of luck.
As T Reddy has already mentioned, if you want to create hardware the interfaces with external hardware framework, you have to sign up with the Apple MFi program which you, as an individual, can not do.
I'm not sure of how the Eye-Fi system works but it sounds to me that it basically syncs the images to their server and once you download their Apple App, the app can sync the photos for you.
Whether you are using Bluetooth or the 30-pin connector, there is no way to interface to an external device unless that device is MFi compliant and a part of the MFi program. I suggest you try the following options to solve this delimma--
If this is a "Senior Project" at some University, see if your University is part of MFi. Apple will not let individuals join the program, so if you are going to gain access, you have to access it through another organization or, possibly, an educational institution. I don't know if Apple has worked with schools in this regard, but you never know. It might be possible.
If your school isn't in the MFi program then you may want to consider re-writing your application for an Android device. Android devices are not locked down like iOS devices, so that may be a more reasonable approach.
I hate to bring bad news but circumventing these hardware restrictions on an iOS device is excessively prohibited. Your options are quite limited and none of them are probably what you either want or need to hear.

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