Using external accessory framework to read all protocols - ios

I want to make an app that interfaces with a sony radio that has an app to control the unit. It uses external accessory framework from iPhone so how can i get all the protocols from the radio or is there anyway to read the protocols coming from the sony app that would communicate with the radio. In short can i get the protocols from the sony radio using external accessory framework?

How does the device connect to the radio? 30 pin/lightning? Bluetooth? or WiFi?
Only the manufacturer who has entered into the MFI license agreement with Apple will have the details on how to interface with their device via cable or Bluetooth, so it is unlikely that you will be able to discover the protocols without some fairly low-level electronic monitoring of the signals.
If it is a WiFi connection then you may be able decode the protocol using Wireshark or similar.

You can use this app to get the supported protocols: https://developer.apple.com/library/ios/samplecode/EADemo/Introduction/Intro.html
But you won't be able to do much without reverse engineering the protocol.

Related

How to transfer data from one app to another app from different iOS devices which have same WiFi network in swift?

I want to transfer data from one app to another app from different iOS devices which have same WiFi network
I used MultipeerConnectivity framework and it works great
You need to implement Client/Server model for this in which if you want to transfer file from 1 device you need to make it server and make it discoverable on the go thourgh LAN/WIFI scanner libraries and then implement FTP/SMB protocols to transfer files. On the other side make the second device Client which will then discover devices on the same network and allow them to connect through the implemented protocols.
What task do you want to solve? Maybe MultipeerConnectivity framework will be appropriate in your case. It doesn't need event same wifi network

MFI Accessory communicate with App via USB

How to communicate with MFI Accessory communicate via USB?
Here's what I've got.
My MFI accessory, other company's MFI accessory and protocol names
EADemo(An Apple official Accessory Demo)
Here's what I've done.
add protocol name toSupported external accessory protocols in EADemo-Info.plist of the EADemo.
Run EADemo with other accessory, send data, text of receivedBytesLabel keep changing.
When I run EADemo with my accessory, click send data, nothing changes in UI.
My colleague(a hardware developer) says I should set interface(like changing a communicate tunnel) after connecting to accessory, so that I can communicate with accessory. But I look up EASession and ExternalAccessory document, I can't find some method that would allow me to change interface. I don't know if it's my problem not setting interface, or it's a problem of the accessory?
How can my App communicate with a MFI accessory?
As nobody has experienced this situation. I'll explain how to communicate with MFI accessory in normal way and what leads to my situation
Usually If you wanna use MFI device, you just need to do the following steps:
Add protocols supported by MFI to Info.plist Supported external accessory protocols.
Connect your MFI accessory to iOS device.
That's it. You can see data change status on screen.
Note: Those procedure are base on Apple official project EADemo, you can download from the official site.
Here's what I've been experienced:
The MFI accessory support 2 protocols, one is for connection event, the other one is data exchange(like my colleague said before, there should be 2 interface). But the manufacture didn't give the specific document. So when I connect one protocol, of course there's no data exchanging. So I connect the first protocol, and step back, connect to the second one. It works, there's data exchange status on screen.

How to connect an iOS device to a custom USB device?

I'm developing a custom electronic device - think of it as a special kind of data logger, and I need to connect a computer to it to configure it and to extract the data.
I know I can do this without too much trouble on a PC, but I'd like to use an iOS device to do this.
Two questions:
Can I do this with a regular dock connector / USB cable? Will the EA framework let me do all the communicating?
Once I have extracted the data, what's the best way to get that out of the iPad? Make an email with it, save to a dropbox or something?
Thanks!
Afaik, you need to join the MFi program to make USB accessories for iPad/iPhone. That will give you all the technical resources needed.
As for data transfer there are only "opinions", I say the more options of sending, the better. Just don't force the user to choose more than once, then make it changeable in settings.
If you're doing very light communication, you might be able to get away with using the headphone jack.
Apps communicate to the headphone port through the various audio frameworks on iOS. AVFoundation is a high-level abstract framework to do various audio operations, but for fine-tuning the communication to a device over this interface, you will likely be using the C-language callback-based Audio Queue Services framework to do audio I/O.
This is nice because your device can be cross-platform (iOS, Android, Mac/PC) as long as you write the corresponding software, and because you don't need to go through Apple's MFi approval program. Think like the Square credit card scanner.
You will have to write the communication stack between the device and your iOS device but yes, you can.
there's very few docs about using the EA.framework. All the juicy parts are in the Mfi program but Apple is very strict about giving access to it.
So if you succeed, sharing a tuto will make you a EA hero ;)
About sharing your data, imho, email + CSV is a winning combo.
If you want to plug something into the dock connector, you want to have a look at https://developer.apple.com/programs/mfi/

Can I write an iPhone/iPad application that uses TCP/UDP communication?

Does Apple allow the use sockets (TCP or UDP) in iOS apps and allow them on the AppStore?
If yes, please provide the official confirmation from Apple or some apps examples.
Yes. Start with this landing page for iOS Networking topics. If you want to use UDP/TCP look at the CFNetwork Programming Guide; in particular streams.
Typically you would integrate bonjour in to your application so that you have the information needed to establish TCP/UDP communication via streams (BSD sockets):
Bonjour is the powerful zero configuration protocol from Apple that makes it easy to find systems and services on a local network automatically. Many services and applications on Mac OS X that have networking capabilities use Bonjour, from printer discovery, to chatting in iChat, to music sharing in iTunes. Bonjour includes a sophisticated, yet easy-to-use, programming interface that is accessible from Cocoa Touch or low-level C language.

iPad accessory communication through UART

We manufacture a new accessory for iPad/iPhone which should transfer commands to the iPad. We like to use UART (through a certain Apple-protocol called Lingo). My research shows that I can only use USB (30PIN Connector) and custom protocols.
Question:
Is there any way to use UART to connect to the iPad accessory from APP side?
If the protocol is implemented in UART, we should be able to move it to USB, if it's not available to my App via USB.
My main guess is that the UART commands & access are protocols reserved to the iPhone OS and not available to Apps. Certain UART commands also include settings for volumes and Audio re-routing etc, so I guess that's secured.
Without jailbreak, you will not be able to access UART on iPad/iPod/iPhone as a normal developer. If you need access to the serial port or USB, you need to join Apple's MFi ("Made for iPhone") program and you will get full access to all relevant information. Unfortunately, you'll have to convince Apple that you're doing serious business and have a high volume manufacturing facility at hand (see also this thread).

Resources