3

我尝试在 Arduino Mega ADK 2560(有两种类型,我使用带有两个 USB 端口的那种)和版本为 2.3.5(自定义构建)的三星 Galaxy S2 之间提供 USB 通信。但是,当我尝试 Arduino 网站中给出的 demokit 代码时,我总是收到一个错误,即error 5 : Device descriptor cannot be retrieved. Trying again.

Demokit 代码包括;

AndroidAccessory acc("Google, Inc.",
             "DemoKit",
             "DemoKit Arduino Board",
             "1.0",
             "http://www.android.com",
             "0000000012345678");

acc.powerOn();
acc.isConnected();  ---error occurs here!
4

2 回答 2

2

该行不应该有错误,但acc.powerOn()绝对应该抛出错误;这个函数是私有的。使用begin(),不使用powerOn()。无论如何,一个参考另一个。

于 2012-08-09T02:57:16.933 回答
0

尽管 ADK 已向后移植到 Android 2.3.4,但许多供应商并未在固件中包含必要的内核修改。我自己也为同样的问题苦苦挣扎了很长时间。我尝试了不同的 2.3.5 自定义和官方 ROM,但我找不到可用的工作内核。

ICS 不再是问题了。官方 ICS 版本包括具有适当 ADK 支持的内核。

于 2012-05-20T11:19:51.320 回答