I am developing an app the uses an external accessory (and am using the EAAccessory framework). Everything works great, except for the instance when the iDevice powers on while the accessory is plugged into the dock. It recognizes the accessory for a short time -- usually 10-15 seconds, then a "EAAccessoryDidDisconnectNotification" is sent for my accessory, and right after a "EAAccessoryDidConnectNotification" is sent with an "unknown" device. When I ask what accessories are connected, I get the following output:

" {\n connected:YES\n connectionID:0x825600\n name: \n manufacturer: \n modelNumber: \n serialNumber: \n firmwareRevision: \n hardwareRevision: \n protocols: (\n)\n delegate: (null)\n}"

So, it can tell that something is connected, just not the device that is connected. If you have an accessory, you can test this easily using the EADemo

Any ideas?

有帮助吗?

解决方案 2

It turned out to be a faulty cable and it worked with a different cable.

其他提示

You get the EAAccessoryDidDisconnectNotification then immediate EAAccessoryDidConnectNotification when your accessory transfers from the un-authenticated to the authenticated state. If your EAAccessory object is empty after that, then you haven't made that transition. This works for my accessory so you will have to inspect the traffic between the accessory and the iOS device to see what error you get.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top