Software for linux pretend to be a harddrive over usb
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Software for linux pretend to be a harddrive over usb
I tried searching, but I found it quite hard to phrase what I was looking for, and got unrelated results.
I was just wondering if you could use a usb to usb cable from a linux machine to another machine/device, and for some software on the linux side pretend to be a harddrive (like a usb removable storage device) to the other machine/device.
It seems like the kind of thing that would have already been done, as it'd be quite cool, and little handheld linux devices can do this.
You can not directly connect two computers via a regular USB cable. First it will short out the 5VDC power and two USB controllers do not know how to talk to each other. Handhelds behave just like mice, keyboards or any USB device. There are special USB data transfer cables that can act like a ethernet crossover cable.
What machines or other devices are you trying to connect? If they are both computers, the easiest way to connect them is to connect both to a router then use ssh or sftp. If one is not a computer, what is it...I am not aware of anything that has a usb connector that is not a computer.
There is also cable connectors to connect an ide or sata device (like a bare hard drive of disk drive) to usb.
@michaelk:
Good point, just disconnect the 5v and ground lead from the usb cable. I still would have thought that it was possible though, as the devices that behave like mice or keyboards (or usb harddrives) that run linux can be these devices, why cant a computer pretend to be such a device? You can plug your linux computer to a windows computer and pretend its an ipod over firewire.
@CrashedAgain:
No machines in particular, but there are plenty of devices that use usb that are not computers. Oscilloscopes are the easiest example i can think of. Thanks for your other suggestions, but they're not both computer and so do not apply.
In a nutshell USB requires a bus controller which directs traffic flow to devices. AFAIK the bus controller which is part of the PC can not act as a device. For one thing a USB device contains pull-up resisters that flag the controller to indicate that something was just plugged in. Its all in the hardware and independent of any OS.
Firewire works differently then USB. firewire uses peer to peer communication vs USB which is host based i.e. two cameras can talk each other over firewire but if using USB require a computer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.