Embedded Linux as Attached USB Storage Device? 20
dont_drink_the_water asks: "I am currently working on a few projects which will (hopefully) use Embedded Linux to deliver content (mp3 players, web servers, other possibilities). The question is, can Linux act as a USB attached hard drive, so that other machines can simply read/write data on the hard drive by using the USB port? Is anyone currently working on projects like this, and has any software been developed for this purpose?"
Linux act as a USB Hard Drive (Score:2, Funny)
Oh yeah. In fact, you won't believe it, but I've actually got Linux acting as a power supply right now. I couldn't get Linux to act as a SoundBlaster Audigy, however, but I'm still working on it.
-Bodero
The mine terrapin pruports to do this.... (Score:3, Informative)
Note: While they say they are based on linux, they do not appear to of have released the sources anywhere that I can find. They do claim to be making a developers kit, but that is alos hard to find at the moment....
Re:What?! (Score:1)
Not really, but what I think he's trying to say is can a device use Linux as it's host operating system (think portable devices), but when you plug it into another machine via USB it becomes just another USB hard drive.
And my reply is: Of course you can. As I understand it, Apple's iPod does something like this already. It can operate as a stand-alone unit to play MP3s. But when you plug it in via firewire it becomes a regular hard drive. I've also heard of USB connected MP3 players doing the same thing.
I don't think however that you'd want to use Linux for this. I would think it'd be best to detect when the USB cable is connected and switch into USB hard drive mode. When it is disconnected then Linux can access the drive again. I see no reason for the operating system to intervene.
Then again, maybe I'm not understanding the question either?
Re:What?! (Score:1)
Hmm (Score:3, Interesting)
Unless you're talking a RAID chassis or something (which be insanely stupid to hang off USB), it isn't much more than serial/parallel conversion/buffering with some voltage matching and a little driver code.
Using embedded Linux for this would be like converting a laptop into a trip-computer for your bicycle. Major overkill.
Re:Hmm (Score:2)
But if my understanding of the question is correct, the poster wants to create an MP3 player or something that might actually have a use for an OS anyway. Once we already have an OS, can we make it behave as a USB non-host device? That seems to be the question.
Re:Hmm (Score:1)
I have worked on a few embedded systems projects myself and have found that, in general, the KISS principle is quite applicable. Especially when somebody else has already done the development legwork for you.
Everything mentioned in the question is faster and cheaper in ASIC format with perhaps a PIC or two for display and key enterfacing.
Not until one gets into a system whose future use is uncertain, or the quantity of inputs and outputs exceeds a given number (depending on the ASIC's used) does the flexibility of a true embedded system become worthwhile.
E.g. a PDA, definitely! A microwave oven, on the other hand, only qualifies because a manufacturer will have many models and it is cheaper to have a single core which can be reprogrammed with different features.
Just my $.02.
Hey man you're right on track (Score:1, Funny)
Re:Hey man you're right on track (Score:2)
USB slave mode support. (Score:4, Interesting)
Basically my understanding of this question is:
"Can Linux act as a USB slave, and provide a slave or 'target' implementation of the USB Mass Storage Class?"
In other words, can I build a fancy MP3 box with lots of storage that appears to be a USB hard drive to the host PC, but is really a Linux machine pretending to be "just" a USB hard disk?
USB slave drivers and an Open Source implementation of the slave side of the USB Mass Storage Class would be cool.
Re:USB slave mode support. (Score:1)
PC Master1 ---- dual-sided endpoint ----- PC master2
The chip in the middle presents itself as a attached mass storage device to PC Master1 after configuration from PC2... Then it could buffer requests and data, and provide a solution... shouldn't be too hard to do with a little firmware.
100BTX or Gigabit ethernet would be kinda nice, and a lot faster, too... (and allow a little more platform independance).
device (Score:2, Informative)
Portable Linux device with simple connectivity (Score:1)
Whether you're talking about a portable mp3 player, a wearable computer, or whatever the embedded application, can't you see the usefullness of being able to plug it into any computer usb port and have instant access to the file system? Here's one scenario: You have this linux-based mp3 player. You take it to work in the morning and plug it into your office pc where winamp accesses your mp3's to play through your pc sound system while you work. At the end of the day you copy the project you have been working on to the mp3 player hard disk. On the way home you stop at a friend's house and let him hear one of the new mp3's you've got. He want's a copy so you plug the player into his pc and copy the file over to his hard drive. He doesn't have broadband so you also leave him the latest 'what's cool' ISO so he can burn a copy (Hey you've got a 5gig drive on this thing, why not cary some cool stuff around) Then you go home and plug the player into your own pc and download the project you brought home from work.
If you are talking about some other embedded application it could still be very usefull. The nice thing about it would be that you can plug the thing into any pc and have instant access to the files.
Re:Portable Linux device with simple connectivity (Score:1)
t.
not an open project but... (Score:1)
While this is a far cry from the 5GB disk proposed somewhere above, the idea however is solid. A handheld device that runs a linux based embedded OS and can plug in as a drive under windows, macOS and probably linux (if I get USB support working).
If you replaced the Iomega zip drive with a small hard drive, then it would be the device you are talking about.
As is, the Hipzip allows me to store any file that fits into the 40MB limit.
CerfCube - Runs Linux and acts as a USB device (Score:1)
Firewire instead of USB easier? (Score:1)
Some time ago, when I saw an ad about the SanCube [micronet.com] I thought "That would be nice to have." and then "That should be possible to make!" especially since Firewire supports multiple masters and it's fast enough to make sense for a (albeit cheap) SAN.
Having one SAN storage which can me expanded and then you can assign partitions to a certain host just is much more flexible than anything else a standard computer uses. LVM and netblock devices help though.
Anyway, the point is, while USB has masters and slaves, Firewire does not distinguish between those, so every Firewire card can be host and slave, which makes it much easier from a hardware point of view to do, what the original poster wants to do.
Now the software is a different thing. While USB is cheap and simple (the master controls and polls the slaves, the slaves just respond), Firewire is much more like SCSI: everyone can start to talk suddenly. Since I am not a device driver programmer, this is too much for me. But then, I am not the one who has to program the device drivers...