Giter Club home page Giter Club logo

Comments (3)

pelya avatar pelya commented on July 2, 2024

What device is this? Who built the kernel?

On Fri, Aug 5, 2016 at 6:10 PM, ajit1433 [email protected] wrote:

I am trying to add HID functionality to my device but i keep getting the
hid_function_bind_config failed error.

Below is output while booting device...

[ 3.782222] adb_android_function_enable ...1
[ 3.786518] ==kcj enable_store dev->enabled:1
[ 3.791609] ==kcj enable_store
[ 3.794741] ==kcj enable_store dev->enabled:0
[ 3.799429] ==kcj enable_store
[ 3.802525] ==kcj enable_store..2
[ 3.805896] adb_android_function_enable ...1
[ 3.810220] ==kcj enable_store dev->enabled:1
[ 3.817129] adb_open
[ 3.819438] hid keyboard
[ 3.822014] hidg_bind: creating device d6f3e700
[ 3.827827] android_usb gadget: hidg_bind FAILED
[ 3.832534] hid_function_bind_config: hid_function_bind_config keyboard
failed: -19

[ 3.841698] android_bind_enabled_functions: hid failed

Please help.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#54, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAJewKdRhUpm9IzL-bSkUAvqRe-lExxbks5qc1JOgaJpZM4JdxlR
.

from android-keyboard-gadget.

ajit1433 avatar ajit1433 commented on July 2, 2024

Hi,

Following are the details:

Android OS Version:
ro.build.version.sdk=17
ro.build.version.codename=REL
ro.build.version.release=4.2
......
ro.product.name=rk2928sdk
ro.product.device=rk2928sdk
ro.product.board=rk2928sdk
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
....
ro.board.platform=rk2928
ro.build.product=rk2928sdk

Kernel Version:
Linux version 3.0.36+ (gcc version 4.6.x-google 20120106 (prerelease) (GCC) )

from android-keyboard-gadget.

ajit1433 avatar ajit1433 commented on July 2, 2024

Figured it out...

Initially .wMaxPacketSize was set dynamically in kernel/drivers/usb/gadget/f_hid.c

After modification i set it to 64:
/* High-Speed Support /
static struct usb_endpoint_descriptor hidg_hs_in_ep_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_INT,
.wMaxPacketSize = 64,
.bInterval = 4,
};
...
/
Full-Speed Support */
static struct usb_endpoint_descriptor hidg_fs_in_ep_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_INT,
.wMaxPacketSize = 64,
.bInterval = 10,
};

from android-keyboard-gadget.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.