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.

Mini USB support in AM1808 with PC

Other Parts Discussed in Thread: AM1808

Hi All,

I am using AM1808 which is running the file system over SD-Card. I have configured the Mini USB driver as mass storage as device. 

When i am connecting this AM1808 device to computer in Linux it shows "Linux File-CD Gadget". But is not accesing the drive.

If it is connecting in Windows it shows as mass storage, but it is not shoing any files and no drive. 

My main intention is to connect to AM1808 device with WINDOS PC using USB mini cable and dump required files without  open SD-Card.

How the files are copying in Mobile. the same way i am looking. Could please solve my issue.

Regards,

Franci

  • How did you load the mass storage gadget driver? Did you give 'file=' parameter?

  • Hi,

    I have't done any thing. Just i configured USB Gadget in kernel. Command line i have't configured file format.

    Please tell me how to solve my issue, Is there any command need to issue which in command line(UBOOT commands).

    Regards,

    Francis

  • You have to pass 'file=...' param when insmod or in uboot bootargs to specify the location to be the back storage for MSC, otherwise how does the driver know where to read/write the data from/to. The param value depends on what media you pick.

    You can either read the MSC driver source code or search on Internet to get more details.

  • Francis,

    If you are trying to expose MMC as mass storage.

    First you need to look for dev entry of MMC partitions.

    the dev entries like mmcblk0p1, mmcblk0p2 so on.. depends on number of partitions.

    To expose the 1st partition, apply the below command.

    modprobe g_mass_storage file=/dev/mmcblk0p1 stall=0 removable=1

    insmod can also be used instead of modprobe by giving the complete path of g_mass_storage.ko module.

    Regards,

    Naveen

  • Hi Naveen,

    Thanks, now i am able to access AM1808 'mini USB' feature in Windows and Linux using with this command: # 'insmod g_file_ storage file=/dev/mmcblk0p1,/dev/mmcblk0p2 stall=0 removable=1'.

    When i am connecting to PC with mini USB cable, I can able to see both the drives 'boot' & 'rootfs'. with 'insmod' each time need to configure above the command. If the

    restarting the processor again need to insert it This module is dynamically done this process. I would like to know how to access permanently that means is there any way to

    configure this command "insmod g_file_ storage file=/dev/mmcblk0p1,/dev/mmcblk0p2 stall=0 removable=1" in 'bootargs'.

    Please help me. 

    Thanks

    Francis

  • You cannot put a kernel 'command' into bootargs, but you can make a init script to do the job. Please take a look at the scripts in /etc/init.d/, they are called in, for example, /etc/rc5.d/.

  • Hi Bin Liu,

    Thanks, I called this in Script it is working now. I can able to see in PC with MIN-USB

    Thanks,

    Francis