Writing device drivers for iOS - ios

I have a high level question I seek information on:
Is it possible to write a device driver in iOS ? Is it possible to write a driver & deploy it to my iPhone or iPad ?
If yes, then are the drivers advised to be written in language Swift ? Or is c ?

Short answer, no.
I'm not really sure what you're trying to do, so more details may be helpful, but by the sound of it, no you can't write and deploy device drivers on iOS.
iOS is tightly locked down by Apple. Each app lives in its own sandbox in an effort to keep the system secure. You have access to the public APIs. Accessing private APIs may result in your app being rejected from the review process.

In order to write and install device drivers for iOS devices you would need to get support from Apple. There are various types of drivers depending on what it is you want to do. They have a program for vendors who make accessories that plug into the lightning port (or the older 30-pin port) and another program for manufacturers of Bluetooth devices. Both require licenses from Apple.
I'm not sure what other types of device drivers are possible. You need to be more specific.

Related

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

MFi , CoreBluetooth or External Accesory framework?

I am trying to build an iOS app which would communicate with another non-apple device via bluetooth. It would be a  Bluetooth Stereo Transmitter which uses the bluetooth A2DP-profile which is supported by apple :
http://support.apple.com/kb/HT3647?viewlocale=en_US&locale=en_US
I have read tons of articles and pages. I have many unanswered questions and hope to recieve some answers and write something that will help me and others in future work with iOS and bluetooth.
Evaluating the available bluetooth connection options
Here's a list with possible approaches and informations I found. Please feel free to answer/edit anything that is not correct.
Edited from http://www.pocketmagic.net/2012/07/bluetooth-and-ios-use-bluetooth-in-your-iphone-apps/ :
A) Enroll in the made for iPhone/iPod/iPad (MFi) program. Details on costs are not available, but this is not for the small development companies, barely selling a few licenses.indicate costs depending on project, and starting numbers somewhere at 10K USD. Not really an option IMO, as the costs involved and trouble getting certified are ridiculously high, for something so basic and simple such as building a Bluetooth application. I have found a Bluetooth stereo transmitter with bluetooth version 2.1 (Class II). I can not find if the device is MFi compliant.
Based on this article :
Existing bluetooth device and Apple MFI
Q1: How can I be sure or find out if the device is Mfi compliant?
Q2: If the device is Mfi compliant will I be able to pair it with the device in the settings option?
B) CoreBluetooth framework, currently usable only with Low Energy Bluetooth 4 devices. Since these are not largely spread this is not really an option. You won't be able to connect to standard headsets, keyboards, or other non-Bluetooth 4 devices.
Q3: Will I need to pair the non-apple bluetooth device with my iPad (in settings) to use the CoreBluetooth framework?
I am asking beacuse I have no experience with iOS and bluetooth and beacuse my budget is low, so I dont want to waste money buying stuff I will not be able to use for development.
C) GameKit framework, this allows some basic Bluetooth functionality, such as finding nearby devices and establishing a serial communication link, but it only intended for use between iOS devices. So Android plus iPhone via GameKit is a no go.
D) Private APIs. There is a BluetoothManager framework, in the private APIs, inside the SDK. This can be used to achieve the proposed task, but you won't get your App approved on Appstore, as private API's is not allowed by Apple. Since this is so convenient, and working so nice, almost like the real thing Apple didn't want to include.
Q4: Can I use private APIs within the iOS Eneteprise program and distribute my apps since there is no App store approval process?
Q5: Does anyone know some more private APIs I could use beside bluetoothManager framework?
E)Jailbreaking and using Ringwald's BTStack. Jailbreaking = rooting = freedom, probably the best way to go . But this places you so far away from Apple's guidelines, and the Appstore itself. So better decide what your project is all about, and who your users will be.
Q6: For bluetooth I need CoreBluetooth Framework. What framework do I need to import if I want to use wifi communication?
Thanks for any help :).

Serial or HID (usb) Communication in iOS (iPhone/iPad)

I want to get data from glucose meter devices by connecting into iPhone or iPad devices. I have different vendors glucose meters some uses simple HID interface for communicate and other uses serial communication.
These are the two possible ways of communication:
USB to 30-Pin connector.
3.5 jack to 30-Pin Connector.
USB or 3.5 jack will be connected to glucose meter and 30 pin connector will be attached with iDevice.
After having hours of research I did not find much help on internet for iOS specific.
I do find ORSSerialPort but I think it is for OS X apps only.
There is RedPark serial Cable but that is for RS232 to 30-Pin communication and secondly that can be only used in internal projects. I want to sell my application on Apple Store.
Someone also was discussing about using IOKit framework. We can communicate with iDevie but that is private framework.
Someone help me with this issue or let me know if that is even possible in iOS application.
Do Apple have any consideration on this type of working?
An iOS device can talk to external devices by following means of communications only:
Wifi
Bluetooth
GPRS &
GSM
USB (Don't exactly know what it is called)
There is no possible way to have RS232 serial port communication with iOS device.
Now What are the options left then?
Get a communication convertor in between your external device & iOS device. It can be
Serial to ethernet adapter
serial to USB adapter etc.
Embedd a wifi/bluetooth module in the external device (If it is being manufactured by you/your firm)
Have something with USB cable & mfi .(Never worked on this, but have seen stuff working with this). By something I meant, register your external device under MFI license & implement USB between devices (Again lack of clarity about USB stuff). Menwhile, I would appreciate edits on my answer by people who might improve it with USB stuff.
Update:
I visited the site of your vendor "glooko". I could not find any clue about them having any libraries for developers. So according to my opinion, they have kept their library private. They don't want you to develop apps based on their communication protocol. If you still need to develop apps for them, contact them here & let them know about your zeal.. M sure they will give you their private code. Anyhow, you don't need to register for any MFI or anything now. What you need is just the code they are using for communication & about that, nobody other than them can help you. So, all the best .. :)
Update 2:
What I understood from your updated question is, you want to create an iOS application that works with various Glucose meters, from different vendors. In a way you can call it as "universal Glucose meter app"
The short and straight answer for this is .."You Can't" . But wait, apple is not responsible for this. Neither it is impossible.
Let me tell you why. When you want your application to talk with a hardware device, there must be a communication channel between you too. You are well aware of those two options available. now, if your app must run on iDevices, the communication channel cables must be registered for mfi. Here that is also not the issue.
What is the issue then?
Different vendons don't generally follow the same communication protocols between their hardware & softwares. What happens if a german commander commands to indian soldier. Obviously, nobody will understand.
So, to achieve your objective, the only way is, you have to include SDK provided by each supported vendors in your app. Let me know if you are not yet clear..:)
There is a device called Lightning Serial Cable, the link is following.Take a look at their SDK.
http://redpark.com/lightning-serial-cable-l2-db9v/
It seems work with your application. I'm also looking for the solution that iOS device can talk to another device via serial port. In PC world, all PC has USB ports, so there is large amount of USB to serial port devices and vendors, such as FTDI and Prolific. I don't know if similar situation happens in iOS world.
Unless you join the Made For iPhone program you can not directly connect anything to an iOS device unless you use Bluetooth or TCP/IP.

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.

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

Resources