Welcome to CyanogenMod
![]() |
Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
|
USB Accessory mode. is ADK supported in cm 7 ?
#1
Posted 25 June 2011 - 07:36 PM
is accessory mode add-on implemented in cm 7 ?
I tried to run it on a htc wildfire using the nightly build, but i am getting an error.
I therefore assume that it is currently not supported.
If not yet, when ?
I think that many would love this feature, so they can attach their "old cheap phones" to an arduino controller.
-- Ron
#2
Posted 28 June 2011 - 10:12 PM
rzorzorzo, on 25 June 2011 - 07:36 PM, said:
is accessory mode add-on implemented in cm 7 ?
I tried to run it on a htc wildfire using the nightly build, but i am getting an error.
I therefore assume that it is currently not supported.
If not yet, when ?
I think that many would love this feature, so they can attach their "old cheap phones" to an arduino controller.
-- Ron
I've got the demoapp runing on the my Legend by copying gApps from a Nexus 2.3.4 firmware.
Be sure to remember com.android.future.usb.accessory.jar in /system/framework
Here is the files I pushed to the phone over adb:
http://data.fuskbugg...gapps-2.3.4.zip
I think these files are everything that's needed that isn’t included in the ASOP source.
The only problem now is that my mBed board doesn’t recognize the phone. Will update with log on pastebin.
I've checked the source tree that I've built from and the USB accessory stuff is included.
Run find -iname 'UsbAccessory.java'
I've also seen that there have been some commits merging "USB gadget support" to the cyanogen kernel for my device. So the kernel have support, or am I wrong?
Edited by joka90, 28 June 2011 - 10:13 PM.
#3
Posted 28 June 2011 - 10:13 PM
I also noticed that the recommended gApps archive (4e0a4b2e5c82a_gapps-2.3.4.zip) already contains com.android.future.usb.accessory.jar
But I didn't noticed any Accessory Mode in logcat after trying to plug in arduino + USB Shield + compiled accessory program.
Edited by alcor, 29 June 2011 - 05:34 PM.
#4
Posted 30 June 2011 - 09:36 AM
alcor, on 28 June 2011 - 10:13 PM, said:
I also noticed that the recommended gApps archive (4e0a4b2e5c82a_gapps-2.3.4.zip) already contains com.android.future.usb.accessory.jar
But I didn't noticed any Accessory Mode in logcat after trying to plug in arduino + USB Shield + compiled accessory program.
If you take a look in the kernel code for bravo it seems that accessory support have been added to the board files.
But for my Legend these changes haven't been done and the legend and bravo boards files looks quite much a part.
Update:
It seams that in my kernel 2.6.32 accessory support have been partly implemented. But in the newer 2.6.35 kernel the board-files or actually arch/arm/mach-msm/include/mach/htc_usb.h have been changed to support USB accessorys. Check out this commit.
I who just figured out were to add the the code to the 2.6.32 kernel when I discovered the 2.6.35 commit
Anyways, hope this helps others to enable accessory support one their devices.
Now I'm going to get that new kernel and test it out.
Edited by joka90, 30 June 2011 - 01:03 PM.
#5
Posted 14 July 2011 - 01:29 AM
I have it running on an HTC G1, the changes listed in this thread:
http://bit.ly/qwysxW (GitHub)
You must register the library at:
/etc/permissions
through XML:
android.hardware.usb.accessory.xml
http://pastebin.com/6Wr4eHds
A video demonstration:
http://bit.ly/qi32Tj
#6
Posted 15 July 2011 - 03:33 AM
I've got a Vibrant running nightlies and I've copied the jar file and the permissions xml to the right places, cleared Dalvik cache and cache partition, and I still can't connect to my ADK board. That at least enabled me to load the DemoKit app onto my phone. Also tried flashing the gapps mentioned above... no joy.
However when I connect my phone to the board, serial loops on the following error:
Device addressed... Requesting device descriptor.
found possible device. swithcing to serial mode
Data packet error: 5could not read device protocol version
From everything I've been able to gather that means my phone isn't responding the way it needs to, which would indicate it doesn't support accessory mode.
I should also mention that I've got an old G1 running Ginger Yoshi 1.2, and it came with those files onboard and I get the same results when connecting it to the ADK board.
So, anyone else have any luck or know some places to start looking?
#7
Posted 01 August 2011 - 09:56 AM
I added the permissions .XML and JAR.
This got the DemoKit app running.
However all end up with the same error:
Data packet error: 5could not read device protocol version
Which basically means USB accessory mode not supported
#8
Posted 06 August 2011 - 07:55 AM
#9
Posted 09 September 2011 - 05:05 AM
Device addressed... Requesting device descriptor.
found possible device. swithcing to serial mode
Data packet error: 5could not read device protocol version
has anyone come up with a solution yet?
#10
Posted 20 September 2011 - 08:44 PM
#11
Posted 01 October 2011 - 03:33 PM
Because I'm using the board without any external devices, I had to modify the demokit.pde not to use three devices(Joystick, relay, servo).
The modification is very simple; I commented out the lines concerning the above three devices.
Though the phone successfully find the board, the demokit program doesn't react to three buttons(A6, A7, A8 inputs)...
#12
Posted 17 October 2011 - 10:42 AM














