Jump to content

Recommended Posts

Posted

It says 4.13.x in nightly kernel builds but i cant still enable g_hid. In this link it says 4.12 would bring usb otg support for h3 boards. Am i wrong? If its still not supported and wont get implemented soon what should i do to implement it?

I also read that g_hid should work in legacy kernel but it didnt work with lastest legacy kernel either.  I am trying to get it working for a few weeks now my whole project is stopped because of this.  Its would bring me joy if i could get it working. Thank you

Posted

In the sunxi-next kernel both legacy g_hid and libcomposite hid gadgets are enabled, so we have done everything that is under our control to make things work.

 

I compiled a fresh 4.13.7 kernel, compiled this library and tried to test it

root@orangepiplus2e:~# modprobe libcomposite
root@orangepiplus2e:~# cd libusbgx/examples/
root@orangepiplus2e:~/libusbgx/examples# ./show-gadgets
root@orangepiplus2e:~/libusbgx/examples# ./gadget-hid
root@orangepiplus2e:~/libusbgx/examples# ./show-gadgets
ID 1d6b:0104 'g1'
  UDC                   musb-hdrc.1.auto
  bcdUSB                2.00
  bDeviceClass          0x00
  bDeviceSubClass       0x00
  bDeviceProtocol       0x00
  bMaxPacketSize0       64
  idVendor              0x1d6b
  idProduct             0x0104
  bcdDevice             0.01
  Language:     0x409
    Manufacturer        Foo Inc.
    Product             Bar Gadget
    Serial Number       0123456789
  Function, type: hid instance: usb0
    dev                 242:0
    protocol            1
    report_desc 5196a115719e029e7150251751958812951758813955751581912959129517539139567581502565571902965810c0
    report_length       8
    subclass            0
  Configuration: 'The only one' ID: 1
    MaxPower            2
    bmAttributes        0x80
    Language:   0x409
      configuration     1xHID
    some_name -> hid usb0
root@orangepiplus2e:~/libusbgx/examples# ls /dev/hid*
/dev/hidg0
root@orangepiplus2e:~/libusbgx/examples#

On the other side of the USB connection

➜  armbian git:(master) ✗ % lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/10p, 480M
    |__ Port 10: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
➜  armbian git:(master) ✗ %

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines