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.

USB gadget built for H3 processor on top of GadgetFS

Featured Replies

Hi, in case somebody is looking for working example of USB gadget built for H3 processor (Orange Pi PC) on top of GadgetFS, please look at the link:

 

https://github.com/prife/ptp-gadget

 

The only adaptation required for Orange Pi PC is in autoconfig() function:

 

    else if (stat(DEVNAME = "sunxi_usb_udc", &statb) == 0) {
        HIGHSPEED = 1;

        fs_source_desc.bEndpointAddress
            = hs_source_desc.bEndpointAddress
            = USB_DIR_IN | 1;
        EP_IN_NAME = "ep1in-bulk";
        fs_sink_desc.bEndpointAddress = hs_sink_desc.bEndpointAddress
            = USB_DIR_OUT | 1;
        EP_OUT_NAME = "ep1out-bulk";

        source_sink_intf.bNumEndpoints = 3;
        fs_status_desc.bEndpointAddress
            = hs_status_desc.bEndpointAddress
            = USB_DIR_IN | 2;
        EP_STATUS_NAME = "ep2in-bulk";
    /* Orange Pi PC H3 processor */
 

The Armbian kernel (v.3.4) configuration should be changed to include USB gadget and GadgetFS items.

 

I would suggest to add this to the default kernel configuration.

@perfstr Good to know you had this working. By any chance do you still have the .config? My Windows host gets as far as installing the driver then fails trying to get a device descriptor. Device side (H3 powered NanoPi Air) reports below

 

TAIA

 

```

@nanopiair:/test/gadget_usb$ sudo gadget_usb -v
/dev/gadget/sunxi_usb_udc ep0 configured
serial="mjqebex15vip4cq2dptcpzak8f508n36z1ulgiqmwe5lgfborb0a5sj4x4xb40a"

** Mon Sep 18 14:01:55 2017
CONNECT high speed
SETUP 80.06 v03ee i0000 18
... protocol stall 80.06
SETUP 80.06 v0303 i0409 255
SETUP 80.06 v0300 i0000 255
SETUP 80.06 v0300 i0000 257
read 2 ep0 events
DISCONNECT
SUSPEND
CONNECT high speed
read 2 ep0 events
DISCONNECT
SUSPEND
```

  • Author

Hello, we have a working Armbian system that runs the user mode USB device and Windows application that uses LIBUSB to connect to device. Once we used another hardware platform for the device firmware. Now, when we switched to Orange Pi PC, I had to change the Windows part in order to adapt it for the USB OTG driver limitation. We used USB sniffer program in order to get USB traces of old and new devices. This way we were able to solve some startup problems.

Please explain what .config file you mean - kernel configuration?

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.