This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can't use Linux usb otg

Other Parts Discussed in Thread: OMAPL138

Hi :

   When Linux Omapl138 connect to Windows PC use usb, PC can't found usb device.

Internet said kernel config :

USB SUPPORT<*>USB Gadget Support --->

USB Peripheral Controller (S3C2410 USB Device Controller) --->

S3C2410 USB Device Controller

[] S3C2410 udc debug messages

<M> USB Gadget Drivers

<M> File-backed Storage Gadget

 

Create g_file_storage.ko file.

 

Then :

# dd if=/dev/zero of=vfat.img bs=1M count=20

# mknod /dev/loop0 b 7 0

# losetup /dev/loop0 vfat.img

# mkfs.vfat /dev/loop0

# mkdir vfat_mount_point

# mount /dev/loop0 vfat_mount_point

# insmod g_file_storage.ko file=/dev/loop0 stall=0 removable=1

 

But last setp is error :  "insmod: error inserting 'g_file_storage.ko': -1 No such device"

 

Can you help me ?  please! Thank you!

  • Hi Zhen,

    insmod require the complete path of g_file_storage.ko . Try giving the full path for g_file_storage.ko or else you can try the below command instead of insmod.

    # modprobe g_file_storage file=/dev/loop0 stall=0 removable=1

    Regards,

    Naveen

  • You want to select the Inventra HDRC USB Peripheral controller, not the S3C2410 controller.

    Steve K.

  • Thank you! Select HDRC CONFIG_USB_GADGET_DUMMY_HCD USB  Peripheral controller, Execute command is ok! But Win 7 still can't identified USB device(omapl138). Please help me again. Thank you!

    Command execute result :

    # insmod g_file_storage.ko file=/dev/loop0 stall=0 removable=1

    g_file_storage gadget: No serial-number string provided!

    g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010

    g_file_storage gadget: Number of LUNs=1

    g_file_storage gadget-lun0: ro=0, nofua=0, file: /dev/loop0

    root@arago:/mnt/device# usb 2-1: new high speed USB device using dummy_hcd and address 3

    g_file_storage gadget: high speed config #1

    usb 2-1: selecting invalid altsetting 1

    usb-storage 2-1:1.0: Quirks match for vid 0525 pid a4a5: 10000

    scsi2 : usb-storage 2-1:1.0

    scsi 2:0:0:0: Direct-Access     Linux    File-Stor Gadget 0302 PQ: 0 ANSI: 2

    sd 2:0:0:0: Attached scsi generic sg0 type 0

    sd 2:0:0:0: [sda] 40960 512-byte logical blocks: (20.9 MB/20.0 MiB)

    sd 2:0:0:0: [sda] Write Protect is off

    sd 2:0:0:0: [sda] Assuming drive cache: write through

    sd 2:0:0:0: [sda] Assuming drive cache: write through

     sda:

    sd 2:0:0:0: [sda] Assuming drive cache: write through

    sd 2:0:0:0: [sda] Attached SCSI removable disk

     

    After, connect Win 7 PC and OMAPl138 use USB.

    Win 7 Device Manager GUI :