0

Possible Duplicate:
Is there a way to make a pc look like a USB drive to a device that reads content from a USB drive?
Is it possible to use a PC as a external drive via USB?

How can I put my computer's USB into device mode and serve as a disk-on-key for fast file transfer between computers without a special cable? I tried Ethernet but the maximum I get is 8 MB/s.

I know this is possible because I have an embedded Linux device that can switch from device to host mode and back easily, but it's ARM and I believe its switching program won't work on x86 architecture.

I have Mac OS X 10.7 / Ubuntu Natty / Windows 7 available on the PC, I don't care which platform this will be on.

Daniel
  • 559
  • 2
  • 9
  • 17
  • Use gigabit ethernet. If you insist on using the slower USB3, then you will need one of those special cables ( that's why they make them ). – psusi Aug 15 '11 at 15:15
  • @psusi: I use 100 MBps ethernet, at least thats what both ends say, but all I get is 8 MBps. – Daniel Aug 15 '11 at 16:07
  • umm... yea.. that's why I said you should switch to gigabit ethernet. Also note the difference between Mbps ( megabits per second ) and MB/s ( megabytes per second ). – psusi Aug 15 '11 at 17:22
  • possible duplicate of [Is there a way to make a pc look like a USB drive to a device that reads content from a USB drive?](http://superuser.com/questions/172870/is-there-a-way-to-make-a-pc-look-like-a-usb-drive-to-a-device-that-reads-content) and/or [Is it possible to use a PC as a external drive via USB?](http://superuser.com/questions/228433/is-it-possible-to-use-a-pc-as-a-external-drive-via-usb) – Ƭᴇcʜιᴇ007 Aug 15 '11 at 18:48
  • @psusi, Gigabit Ethernet: 1 Gbit/s, USB 3.0: 5 Gbit/s. USB 3 is definitely not slower than GB Ethernet. USB 2 or 1 is, though. – Ethan Reesor Sep 24 '13 at 03:17

2 Answers2

1

It's possible when your actual hardware supports it. PC host controllers don't. The USB chips used in typical embedded ARM/Linux devices do. Now, that immediately explains why the switching program can't work: it sends a specific command to specific hardware. Even if you could hack the software to send the command to your PC USB controller, it still wouldn't understand it. (Oh, and there's the part about it being compiled for ARM not x86)

I've actually written bootloader code for an embedded ARM device with such a USB chip. Those USB chips are fairly independent; how did you think they do 480 Mbps on a 200 Mhz CPU?

MSalters
  • 8,185
  • 1
  • 23
  • 29
  • Is there any chance my controller does support it? how can I check it? – Daniel Aug 15 '11 at 14:20
  • about the cpu/usb thing, its not a problem. a CPU is usually 32 bit even on embedded so 32 bit * 200 Mhz = 6.4 Gbps which leaves a lot of idle time if you output at 480 Mbps. – Daniel Aug 15 '11 at 14:42
  • @Dani: That's part of the USB smarts. The CPU may be 32 bits, but USB is serial (the S in USB). That means it sends one bit at a time, 480 million times per second. You can't have the CPU toggle the USB data line 480 million times per second. Instead, the CPU sends several thousand bits at a time to the USB controller, which then sends them bit-by-bit. – MSalters Aug 15 '11 at 14:45
  • @Dani there is zero chance that a desktop PC usb controller supports it. It also requires a different socket since the host and device use different sockets. – psusi Aug 15 '11 at 15:17
  • @psusi: I have a hard disk reader which uses type A connector and is device mode. – Daniel Aug 15 '11 at 16:05
  • @Dani, what is a "hard disk reader"? If the device had an A type connector then you couldn't plug it in because the cables have one end that is A and one end that is B and the PC is always type A. – psusi Aug 15 '11 at 17:26
  • @psusi its a device with SATA and SATA power on one end and USB on the other end. mine also came with type A - type A cable. – Daniel Aug 15 '11 at 17:29
  • @Dani, got a link to this goofy device? Just out of curiosity... the USB standard requires devices to use type B, so it's breaking the standard if it is using type A, though this doesn't really matter for the purpose of your question; the PC controller is designed to only be the host. It is curious that a manufacturer would make the device wrong so users can't plug it in with a standard usb cable though. – psusi Aug 17 '11 at 13:42
1

You could get one of these. Need to write your own drivers, though.

LawrenceC
  • 73,030
  • 15
  • 129
  • 214