ASCII code on an external device through USB port - ios

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.

Related

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.

How does this iOS app communicate over the USB port?

This app promises to turn your iOS device into a second monitor and uses the standard USB cable to connect to the computer, as opposed to the network which all other similar apps use.
Back when I heard about it, it wasn't yet available so I thought it was a scam. To my surprise, they released the app and it actually works as described.
How does it work ? As far as I know there are no APIs to drive the USB port in iOS, and the computer connected via USB through the standard charging/syncing cable doesn't count as an MFI accessory.
Note that they provide the server software (the one that installs on the Mac and streams the desktop to the device) on their download page for free, reverse-engineering it could shed some light on this but I unfortunately don't have the skills for that.
Dean told about it on his blog.
Duet uses Peertalk, an open source library allowing to pass TCP connections through the USB connection without being part of the MFI program.
The information, code and tools to accomplish generic USB port communication is available to those who join the Apple MFi program. You have to do the paperwork and get licensed by Apple.
http://developer.apple.com/programs/mfi/
The libraries necessary are included in the app and then the usual streaming libraries and code do the rest.

Ios filesharing without iTunes or an internet connection

I am working on developing an enterprise application for ios 7 that needs to work offline and then sync with a desktop client (that I also need to write) for data transfer.
My company does not allow wireless or cell data in this area, and would strongly prefer to not use iTunes either.
The question is, how do you transfer data from an iPad over the usb cable to a custom windows program, without iTunes.
The simplest answer would be: iExplorer (http://www.macroplant.com/iexplorer/) plus some kind of a script to automate the data sync.
Otherwise, you can use the ExternalAccessory framework to communicate with the desktop via a USB tether. This would necessitate a desktop client running simultaneously to communicate with the device.
peertalk (https://github.com/rsms/peertalk) does what you want, however the computer side library is only for mac os. Maybe you can port the protocol to windows by looking at that (the license is BSD)
Edit: this guy managed to have it run under linux. It sits on usbmuxd, which also has a windows port, so it shouldn't be impossible.

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.

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