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.

Linux: USB - OTG as device on Beaglebone black



Tool/software: Linux

Hi,

I want to know if i can read files that belongs to the USB device(mass storage)  from my beaglebone?

example:

1.I connected the USB otg to my linux host, the host recognized it as USB gadget and i copied "someTextFile.txt" file into the USB gadget, until now everything is O.K.

2.I disconnect the USB  from my host .

3.I opened ssh connection to the beaglebone, and now i want to read  the "someTextFile.txt" file.

 How can i do it?

I searched for the file in the file system and didn't find it.

also i read in linux documentation that its possible to read the file(only read).

Thanks,

Oren

  • Hi Oren,

    You need to check in the Beagleone black, what is the argument passed to the mass storage module in module params "file=". Hope your module is dynamically inserted. You can check by lsmod to find the mass storage kernel module.
  • I dont know which module is responsible for that issue.

    I found all the modules that are loaded and the  parameters:

    Module: g_multi
    Parameter: bcdDevice --> 0
    Parameter: cdrom --> N
    Parameter: dev_addr --> (null)
    Parameter: file --> /dev/mmcblk0p1
    Parameter: host_addr --> C8:A0:30:AD:F3:B2
    Parameter: iManufacturer --> Circuitco
    Parameter: iProduct --> BeagleBoneBlack
    Parameter: iSerialNumber --> A6-4713BBBK2803
    Parameter: idProduct --> 0
    Parameter: idVendor --> 0
    Parameter: luns --> 0
    Parameter: nofua --> Y
    Parameter: num_buffers --> 2
    Parameter: qmult --> 5
    Parameter: removable --> Y
    Parameter: ro --> Parameter: stall --> N

    Module: libcomposite

    Module: mt7601Usta

    Do you  know which module is it from the list above?

  • Hi,

    Can you check if /dev/mmcblk0p1 is mounted ? Looks like it is putting the file into SDCard partition. When you are checking for the files, please make sure /dev/mmcblk0p1 is mounted. Where is the filesystems mounted from ? NAND or SDCard ?
  • The filesystem is mounted from SD card card right now.

    How can I check if /dev/mmcblk0p1 is mounted?

    Oren