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.
Related
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
Apple have added new features in Homekit framework in iOS 9.
I have seen What's New in HomeKit.
In that they have added support of Homekit Accessory Protocol (HAP) over cloud. But they didn't tell how it will work, what developers need to do to support accessories to accessible from apple's cloud services.
I have reviewed their HAP for IP Accessories R3 document, but that document also didn't have any information on this.
What I am looking for is, there should be something at Accessory (Light, Thermostate or bridge) which is added to home in Homekit enabled application and which is accessible for user logged in with icloud account.
Now, to support HAP over cloud at accessory side developer needs to do something so that it can identify for user for which its configured.
So what are the changes require at bridge(gateway or hub) or accessory to implement HAP protocol over cloud?
I have been working on HAP Over iCloud concept since last 2 to 3 hours. The beauty in this concept is according to the documentation we should need the following things.
Apple tv 3rd generation
Have to use same iCloud account in both apple tv and iOS device.
This is most important that Apple tv and Accessory should be on same network.
Eventhough you are on different network it is able to pass the switch on/off,brightness increase/decrease ... actions. For this you can use siri commands or programmatically call the accessory write value functionality
Note : As I know I think when you are passing the commands to the Accessory it checks for the iCloud account in the apple tv and from there it is passing the commands to the Accessory. The apple tv and the accessory both are in same network so apple tv will reach that accessory. Thus apple tv acts as a mediator between the iOS device and Accessory
I am building an app which will communicate with an external accessory capable of establishing a wi-fi bridge.
I am not able to defer the situation that how do I establish connection with this external accessory and then the device should be shown connected in my app.
After connection, there are certain actions I need to perform on the device. So a two way communication is also a requirement. How do I initiate a connection and then communicate over it.
Is any Apple framework available for it. As I am not able to find anything.
If possible, please provide a sample code on how to achieve this feat.
Thanks in advance.
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.
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).