我正在开发一个使用外部附件的应用程序(并且正在使用 EAAccessory 框架)。除了配件插入扩展坞时 iDevice 开机的情况外,一切都运行良好。它会在短时间内识别配件 - 通常为 10-15 秒,然后为我的配件发送“EAAccessoryDidDisconnectNotification”,并在使用“未知”设备发送“EAAccessoryDidConnectNotification”之后立即发送。当我询问连接了哪些配件时,我得到以下输出:
" {\n
已连接:是\n
连接 ID:0x825600\n 名称:\n
制造商:\n 型号:\n
序列号:\n 固件版本:\n
硬件版本:\n 协议:
(\n)\n 委托:(null)\n}"
因此,它可以告诉某些东西已连接,而不是连接的设备。如果您有配件,则可以使用 EADemo
有什么想法吗?
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)
当您的配件从未验证状态转换到已验证状态时,您会收到 EAAccessoryDidDisconnectNotification,然后立即收到 EAAccessoryDidConnectNotification。如果此后您的 EAAccessory 对象为空,那么您还没有进行该转换。这适用于我的配件,因此您必须检查配件和 iOS 设备之间的流量以查看出现的错误。
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.
事实证明这是一根有故障的电缆,但它可以使用另一根电缆。
It turned out to be a faulty cable and it worked with a different cable.