Jump to content

USB accessory mode kernel support?


Guest CoCoLUS

Recommended Posts

Guest CoCoLUS

Hello there,

I'm currently trying to get the ADK/accessory protocol stuff to work. First of all, because I've seen this misconception swirling around in some threads here, the accessory protocol has nothing to do with USB host mode (see here). The point of the accessory mode is for the phone to talk to peripherals which are in host mode (e.g. an Arduino with a host shield, as in the official development kit).

It seems like there are two things required for this to work. First, software support (a jar library and a xml permission file). This part is trivial and information about it can be easily found via google. This was once in the cyanogenmod tree, but was reverted because of the missing second part: kernel support.

The more difficult part ist the necessary kernel module - official support in the kernel for the accessory protocol was added to the Android kernel (drivers / usb / gadget / f_accessory.c, android.c, composite.c) somewhere shortly -after- 2.6.35.7, which is the version pretty much all of the current custom roms seem to be based on. In other words, and that'd be also my first question, it's not at all currently possible to use the accessory functionality with the blade because there's no kernel in existence supporting it. Would that assumption be correct?

I tried to backport the necessary changes myself, using KonstaT's source tree from the Swedish Snow ROM, however, I didn't have much luck. Seems like the new files depend on some other new functionality from the gadget subsystem, adding these changes as well lead to a kernel which did compile but wasn't able to recognize any kind of usb device. I'm kind of lacking the required kernel-fu skills for this sort of thing, sadly.

So, any inputs on this? Am I missing something? Would love using my Arduino via the ADK :)

Edited by CoCoLUS
Link to comment
Share on other sites

Guest skywave

Hello there,

I'm currently trying to get the ADK/accessory protocol stuff to work. First of all, because I've seen this misconception swirling around in some threads here, the accessory protocol has nothing to do with USB host mode (see here). The point of the accessory mode is for the phone to talk to peripherals which are in host mode (e.g. an Arduino with a host shield, as in the official development kit).

It seems like there are two things required for this to work. First, software support (a jar library and a xml permission file). This part is trivial and information about it can be easily found via google. This was once in the cyanogenmod tree, but was reverted because of the missing second part: kernel support.

The more difficult part ist the necessary kernel module - official support in the kernel for the accessory protocol was added to the Android kernel (drivers / usb / gadget / f_accessory.c, android.c, composite.c) somewhere shortly -after- 2.6.35.7, which is the version pretty much all of the current custom roms seem to be based on. In other words, and that'd be also my first question, it's not at all currently possible to use the accessory functionality with the blade because there's no kernel in existence supporting it. Would that assumption be correct?

I tried to backport the necessary changes myself, using KonstaT's source tree from the Swedish Snow ROM, however, I didn't have much luck. Seems like the new files depend on some other new functionality from the gadget subsystem, adding these changes as well lead to a kernel which did compile but wasn't able to recognize any kind of usb device. I'm kind of lacking the required kernel-fu skills for this sort of thing, sadly.

So, any inputs on this? Am I missing something? Would love using my Arduino via the ADK :)

Jerpelea backported new android usb gadget drivers to msm7x27 sony's.

https://github.com/freexperia/semc-kernel-msm7x27-ics/commit/6b2e4bf5da9a8b62fee05dc55115ff5ad7799585

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.