LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   MSC (UMS) instead MTP on linux embedded device. Linux-USB Gadget / GadgetFS (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/msc-ums-instead-mtp-on-linux-embedded-device-linux-usb-gadget-gadgetfs-749482/)

rclemente 08-22-2009 04:23 AM

MSC (UMS) instead MTP on linux embedded device. Linux-USB Gadget / GadgetFS
 
Hi All:

First of all, thanks to all for your work. I'm a newbie on Linux embedded and a basic user on linux. I have deep knowledge on windows because of my work, but i really love open source concept (when it's well applied, not only to reuse code and reduce project costs to create private code)

My case is the following, i got a set-top-box based on a linux kernel which almost use open source for several parts of the code (published) and other parts are propietary (not published). The full source code is not available, so i think that this can be a problem, but we have now telnet access to device (not provided by default).

My question is the following, this device when plugged to the laptop/pc through USB it present's itself as a MTP device... but i donīt like it at all, maybe because implementation, when listing a directory, for example, it drops other operations. For example, when i copy a file, i just canīt list a folder because current copy operation aborts... It's very annoying thing.

The case is that i was wondering if there's some way to change the behaviour of the device when plugged into the USB. I want to use it as a Mass Storage Class (UMS) device, just like a external disk not using MTP !

The concept is very simple, but i donīt know where to start doing my job. I've seen on logs that it's using (i'm just guessing, not pretty sure) gadgetfs-mtp. I've been doing some google search but i'm completely lost, maybe because i'm not a experienced linux user or maybe because is not day-to-day task for everybody.

I reached to http://www.linux-usb.org/gadget/ but i canīt find how to change the behaviour from MTP to MSC/UMS.

The line found at log isnīt pretty much descriptive (for me):

gadgetfs-mtp: USB Gadget filesystem, MTP version, version 2007 July 23
[...]
gadgetfs-mtp: bound to net2272 driver

Can anybody help me? Have anybody experience publishing MTP or MSC/UMS Devices?

Thanks in advance to everybody for reply and help!!!

schneidz 08-27-2009 03:12 PM

yay, my 1000th post.

i think the mtpfs program is what you want. it emulates the mtp functionality of an mtp device to make it seem more like a usb harddrive.

it works like:
Code:

mkdir temp; mtpfs temp
it basically mounts the unit under temp so that the filesystem is browsable like a ums device.

it depends on libusb/ libmtp.
http://www.linuxquestions.org/questi...ighlight=mtpfs

rclemente 08-28-2009 03:34 AM

Hi:

First of all, thanks for the reply!

I will take a deeper view to it, and let you know. The objective is plug a laptop (windows or linux) to the set-top-box (linux) and the set-top-box should present itself like a HDD (not like a mtp device) but i don't know if this will help me, as maybe this is to set a computer to act as mtp device, which is not the objective.... By the way, i will take a look.

Thanks again!


All times are GMT -5. The time now is 06:46 AM.