LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-20-2009, 07:10 AM   #1
gothicbob
Member
 
Registered: Sep 2005
Location: Birmingham / Bath Uk
Distribution: Kubuntu 8.10, Debain 4.0
Posts: 86

Rep: Reputation: 16
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.

Thanks for any help in advance.
 
Old 05-20-2009, 07:43 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,397

Rep: Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472
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.
 
Old 05-20-2009, 10:34 AM   #3
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
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.
 
Old 05-20-2009, 12:07 PM   #4
gothicbob
Member
 
Registered: Sep 2005
Location: Birmingham / Bath Uk
Distribution: Kubuntu 8.10, Debain 4.0
Posts: 86

Original Poster
Rep: Reputation: 16
@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.
 
Old 05-20-2009, 02:50 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,397

Rep: Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472Reputation: 5472
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.

Last edited by michaelk; 05-20-2009 at 03:13 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Let us pretend today is my first day with linux Redbug Linux - General 7 09-01-2008 08:44 AM
Fedora Core 6 won't recognize second internal harddrive or usb harddrive Rockgod1969 Linux - Hardware 14 01-26-2007 01:03 AM
Backup software from harddrive to USB drive james91911 Linux - Software 2 09-10-2005 09:49 AM
USB Harddrive causes Linux to freeze up Payphone Ed Linux - Hardware 1 08-27-2004 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration