Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Gadget mode hid support.

Featured Replies

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

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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.