Bananian

OTG g_mass_storage: no such device

19 3974
Edited by woutervddn at Nov 27, 2015 07:50

Hey All
I'm new to the Banana Pi. I bought it to start experimenting with OTG.

I followed the partial tutorials I found on this forum and others on the internet. And ended up with basically the following changes:

- pulled last version of the kernel
- changed to bananian-otg in bananian-hardware
- added several usb gadget module drivers including the g_mass_storage.
- make modules
- makes modules_install
- made a dos formatted filesystem using the script from here: http://wh1t3s.com/2009/05/11/bea ... device-via-usb-otg/

then i used modprobe with the following paramaters:

  1. modprobe g_mass_storage file=./fsbackfile
Copy the Code



In each case I got the following error:

  1. modprobe: ERROR: could not insert 'g_mass_storage': No such device
Copy the Code


I used lsmod to look for conflicting mods. Started by rmmod-ding garp.
Still no success, removed every mod until I was left with only these:

  1. <blockquote>Module                  Size  Used by
Copy the Code


Tried to modprobe again, same result.

I'm scratching my head here, what am I missing?

Kind regards


Wouter


Have you checked the kernel logs for any pointers?

What am I looking for? Kern.log does not add anything when modprobe g_mass_storage is run.

I started from scratch, this is the current status: http://woutervddn.ghost.io/hello/

Have you looked at the [usbc0] section of the fex file?

Could you post it here?

Edited by woutervddn at Dec 02, 2015 02:19

I used bananian-config to set harware to BANANAPI-OTG. This should use the fex/BananaPi-OTG/script.bin, the correspondig fex file is fex/BananaPi-OTG/script.fex.

I've pasted it here: http://pastebin.com/65tA4D3t

Edited by sashijoseph at Dec 02, 2015 14:28

Try decompiling your script.bin and changing the fol. under [usbc0]

usb_port_type = 1   to  usb_port_type = 2
and
usb_detect_type = 0   to  usb_detect_type = 1

see if it helps.

Thanks for the fast reply and helpful pointers! It's much appreciated.

No success, but at least I get a different (more descriptive) message. The modprobe command now shows:

  1. g_mass_storage gadget: Mass Storage Function, version: 2009/09/11
  2. g_mass_storage gadget: Number of LUNs=1
  3. lun0: LUN: removable file: /root/backFile
  4. g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
  5. g_mass_storage gadget: userspace failed to provide iSerialNumber
  6. g_mass_storage gadget: g_mass_storage_ready
Copy the Code


However, when I plug the OTG port in my development machine it does not mount nor does it show up in /dev/

Dmesg lists the same output as the modprobe command, but adds following line:

  1. WRN:L2762(drivers/usb/sunxi_usb/sw_udc.c):ERR: usb ddevice not active
Copy the Code


hi...

could you try out two things...?

1.Connect the otg cable before modprobing the storage module.
or
2.If plugging the otg cable after modprobe is already done,try rmmoding and then modprobing again.

Tried both, no success.

I found this script on the forums here: http://pastebin.com/mzZE36MM
(Found here: http://forum.lemaker.org/thread-3077-1-1.html)

This works in part. I put's out the mass_storage_device when i modprobe but I get following messages (on top of the ones I also get using the other fex file):
  1. g_mass_storage gadget: full-speed config #1: Linux File-Backend Storage
Copy the Code


After some time this gets appended with:
  1. INFO: rcu_preempt detected stalls on CPUs/tasks:
  2. 0: (1 GPsf behind) idle=17d/1/0 drain=0 . timer =-1
  3. (detected by 1, t=6006) jiffies)
  4. INFO: Stall ended before state dump start
Copy the Code

The banana pi then becomes unresponsive.

At te same time my development laptop shows the following dmesg:

http://pastebin.com/9yTRyvy2

You have to log in before you can reply Login | Sign Up

Points Rules