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.

How to enable mass storage usb gadget for orangepi lite?

Featured Replies

I use "./compile.sh BRANCH=default BOARD=orangepilite KERNEL_ONLY=no PROGRESS_DISPLAY=plain RELEASE=xenial"

to build the whole booting image for my orangepi lite, it works very good as the official prebuilt armbian image.

Here, the usb otg port seems configured as peripheral mode already( g_searial module works as gadget in fact), I can

use it as usb seraial well.

 

However, I want to make it works as a usb storage, so, I though the g_mass_storage was the right module. I loaded it

using following command:

insmode g_mass_storage.ko file=/dev/mmcblk0p1 removable=1

 

then, I got kernel message like:

[  194.842091] usb open backing file: /dev/mmcblk0p1, 0xd442c400
[  194.842441] g_mass_storage gadget: Mass Storage Function, version: 2009/09/11
[  194.842470] g_mass_storage gadget: Number of LUNs=1
[  194.842505]  lun0: LUN: removable file: /dev/mmcblk0p1
[  194.842566] ep_matches, wrn: endpoint already claimed, ep(0xc097b2ec, 0xbf2c28f4, ep1in-bulk)
[  194.842603] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[  194.842634] g_mass_storage gadget: userspace failed to provide iSerialNumber
[  194.842673] g_mass_storage gadget: g_mass_storage ready

 

But, I got nothing at the remote host linux, no device, no usb attaching message as g_serial.

So, what should I do to make the storage gadget work?

Any hints will be very very appreciated.

 

  • Author

I think i got the first step, I should turn the otg role to gadget mode.

Just write 2 into otg_role after insert the gadget driver:

 

echo "2" >/sys/bus/platform/devices/sunxi_usb_udc/otg_role

 

after that, the host linux can detect new storage inserted. But, I still can't access it, I do not know why, as so far.

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.