Jump to content

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.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

USB Accessory mode. is ADK supported in cm 7 ?


This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1 rzorzorzo

rzorzorzo
  • Members
  • 1 posts

Posted 25 June 2011 - 07:36 PM

Hello,

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 joka90

joka90
  • Members
  • 4 posts

Posted 28 June 2011 - 10:12 PM

View Postrzorzorzo, on 25 June 2011 - 07:36 PM, said:

Hello,

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 wonder the same thing.

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 alcor

alcor
  • Members
  • 1 posts

Posted 28 June 2011 - 10:13 PM

acessory mode seems not supported with HTC Desire (Bravo GSM) using CM7 bravo full nighlty 116. I have no error when pluging in arduino uploaded with accessory test code and powered with 9v supply power : nothing happens. I also tried with Handbag app without any success.
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 joka90

joka90
  • Members
  • 4 posts

Posted 30 June 2011 - 09:36 AM

View Postalcor, on 28 June 2011 - 10:13 PM, said:

acessory mode seems not supported with HTC Desire (Bravo GSM) using CM7 bravo full nighlty 116. I have no error when pluging in arduino uploaded with accessory test code and powered with 9v supply power : nothing happens. I also tried with Handbag app without any success.
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.
Maybe there is some switch that have to be enabled when compiling the kernel. (Try to get the kernel config "adb pull /proc/config.gz", and look for the switch in the commit for incredible., CONFIG_USB_ANDROID_ACCESSORY=y)
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 :lol:

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. B)

Edited by joka90, 30 June 2011 - 01:03 PM.


#5 hpsaturn

hpsaturn
  • Members
  • 1 posts

Posted 14 July 2011 - 01:29 AM

Hello,

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 Malcolm MP

Malcolm MP
  • Members
  • 1 posts

Posted 15 July 2011 - 03:33 AM

Has anyone else been able to make this work?

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 shawnf

shawnf
  • Members
  • 1 posts

Posted 01 August 2011 - 09:56 AM

I tried CM7 Nightly (68 I think) and CM 7.1 RC1 on my Galaxy S (and the a leaked Galaxy S 2.3.4)
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 wisnu198

wisnu198
  • Members
  • 3 posts

Posted 06 August 2011 - 07:55 AM

on x10 mini with miniCM 2.0.5, i succeeded installing and running demokit.apk, but the apps still asking to connect the device (even when i already connected the device)

#9 szech713

szech713
  • Members
  • 1 posts

Posted 09 September 2011 - 05:05 AM

I am trying to use my EVO 4G with the ADK board, i am getting the same error as well

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 kirkdavenport

kirkdavenport
  • Members
  • 1 posts

Posted 20 September 2011 - 08:44 PM

Any news on this subject? I'm working on the 7.1-RC1 and have been able to get the demokit.apk installed on my incredible by pushing the xml and jar files but it still will not recognize the adk board when plugged in.

#11 tasasaki

tasasaki
  • Members
  • 1 posts

Posted 01 October 2011 - 03:33 PM

My phone has recognized an adk board finally.
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 roymo

roymo
  • Members
  • 1 posts

Posted 17 October 2011 - 10:42 AM

I am using G2 MAGIC, CM7 2.3.7 to install the ADK demoKit, also appears INSTALL_FAILED_MISSING_SHARED_LIBRARY error. I have tried to put the maps xml and accessory xml files to /etc/permissions. and also put maps jar and accessory jar to /system/framework, but seems they dont work. I also pulled the /proc/config.gz out and found that CONFIG_USB_ANDROID_ACCESSORY this line is “# CONFIG_USB_ANDROID_ACCESSORY is not set”, so I tried to change it as “CONFIG_USB_ANDROID_ACCESSORY=y”(seems this file is generated automaticly, can I do anything to change this setting?), but it display INSTALL_FAILED_MISSING_SHARED_LIBRARY error either. Do you have any idea of this situation? Need I recompile the android kernal or somthing?