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.

AM5718: USB mass storage device

Part Number: AM5718

Hi,

I am using AM5718 IDK EVM,and ti-processor-sdk-linux-am57xx-evm-05.03.00.07.

I could successfully attach USB2 to a host PC with the command 'modbprobe g_mass_storage file=/dev/mmcblk0p3' where /dev/mmcblk0p3 is a partition of flash.

When we develop our custom board, we wish to do the same but due to security reasons, we would like to not display /dev/mmcblk0p3 on any host PC. We need to access it using our custom application.

Can you suggest a method so that USB2 is accessible (as Mass Storage Device) only via a program and not displayed on host PC?

regards,
Anupama

  • Hi,

    My understanding your question is similar to "I plugged in a USB thumb drive into a Linux PC, but how to configure the PC to not create the device node under /dev folder for the thumb drive?" I don't know the direct answer to your question though. If the device node is not created on the host PC, how your program can access it?

  • Hi Bin Liu,

    What I need is like "I plugged in a USB thumb drive into a Linux PC, but its contents should not be displayed in file explorer and without authentication, nobody should be allowed to read/write to the USB thumb drive".

    Device node should be created on the host PC and I want to read/write the device using a custom application only.

    I opt for USB because of its speed in data transfer.

    I don't know whether it is possible, I'm doing this for the first time.

    regards,
    Anupama

  • Hi Anupama,

    By default writing to a mounted thumb drive requires root privilege, but any user can read it, and it is not possible to customize *every* PC which the thumb drive is connected to to not allow reading from it.

    So the solution I would think is to not use usb mass storage gadget on AM5718, but define your own communication protocol then use one of the following implementations.

    - write your own usb gadget driver, similar to g_mass_storage, in kernel to implement your own protocol; then write the application for the Linux host using libusb library to communicate to the usb gadget.

    - write your own usb gadget driver in user space accessing the raw usb device on AM5718. libusbg library/framework can be used. On the Linux host you write the application using libusb to communicate to the usb gadget.

    Any details of the implementation is out of our support scope, but I hope this information is helpful.

  • Hi Bin Liu,

                      Thank you for your quick reply. The information that you have provided is quite useful for me.

    regards,

    Anupama