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.

5

2 Answers 2

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?

8
  • Is there any chance my controller does support it? how can I check it?
    – Daniel
    Aug 15, 2011 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, 2011 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, 2011 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, 2011 at 15:17
  • @psusi: I have a hard disk reader which uses type A connector and is device mode.
    – Daniel
    Aug 15, 2011 at 16:05
1

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

Not the answer you're looking for? Browse other questions tagged .