1 Reply Latest reply on Sep 10, 2015 8:06 AM by Intel_Peter

    How to transfer a file from host to target using g_mass_storage

    farazata

      I have created some random file using dd tool on the host(linux pc) and i am succesfull in loading g_mass_storage on the target.

      Can anyone tell me how can i push created file on the host to the target(galelio board) in detail.

        • 1. Re: How to transfer a file from host to target using g_mass_storage
          Intel_Peter

          Hello farazata,

           

          What happens with the g_mass_storage driver is that it is designed to support mass storage gadgets. What I mean by this is that once you have added this module to your kernel you will be able to read/write flash drives.

          Please correct me if I'm wrong. What you want to do is send data to your Galileo from your Linux PC using the USB interface. Is that correct?

          If so, then that, to my knowledge, is not possible since, as I mentioned before, the g_mass_storage driver is not designed for that purpose. You can check https://www.kernel.org/doc/Documentation/usb/mass-storage.txt to learn more about this driver. If you wanted to do that, then you'd have to use the Galileo as host and set your PC as a client. However that could prove a bit challenging. An easier approach to send files is to use a file transfer protocol such as sftp, where as long as both the board and the PC are connected to the same network then you can share files securely just by knowing their IP addresses. I suggest you to take a look at it.

           

          Peter.