LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-19-2012, 09:00 AM   #1
pdiffley
LQ Newbie
 
Registered: Dec 2011
Posts: 3

Rep: Reputation: Disabled
How to transfer files across two linux systems with a bare usb cord?


I am working on a programming project where I am supposed to transfer some data(text or a file probably) across two computers via a plain A-A USB cable. How difficult is it to transfer data via usb? Are there any commands in linux that might would abstract the usb hardware (such as "Readbyte()" or "Sendbyte") or will I need to go more in depth and make a driver?
 
Old 01-19-2012, 10:04 AM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
I would guess you'd be able to accomplish this using the libusb userspace library.

http://www.libusb.org/
 
1 members found this post helpful.
Old 01-19-2012, 10:20 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator response

Moved: This thread is more suitable in <Linux-General> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 01-19-2012, 12:03 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
Welcome to LinuxQuestions.

FYI Since you didn't specify hardware one of the computers must be capable of being a USB device or OTG. If not then you can not use a plain USB cable and there is the possibility of damaging hardware if you did.

Last edited by michaelk; 01-19-2012 at 12:07 PM.
 
1 members found this post helpful.
Old 01-19-2012, 04:09 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Some usb devices can be switched. I think one of the small linux sort of pda/tablets did that so it could be done.
 
Old 01-19-2012, 04:30 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
True, and just like the other thread I do not want to get into a debate over terms. Just wanted to caution the OP. Hopefully will get a better idea on the type of hardware being used in the project.
 
Old 01-19-2012, 08:09 PM   #7
pdiffley
LQ Newbie
 
Registered: Dec 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
FYI Since you didn't specify hardware one of the computers must be capable of being a USB device or OTG. If not then you can not use a plain USB cable and there is the possibility of damaging hardware if you did.
The computers would just be two Dell PCs with linux installed. Would I need to use a bridged usb cable? The main point of the project is programming the file interfacing, so a cord that came with software for file management already installed would not be preferable. Would using one PC and having it communicate and write files to a jump drive or vice versa when the drive is plugged in work better?
 
Old 01-19-2012, 10:08 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
Yes, a bridged cable is required in this situation. Not sure I understand your question about the flash drive.

Last edited by michaelk; 01-19-2012 at 10:14 PM.
 
1 members found this post helpful.
Old 01-20-2012, 08:29 AM   #9
pdiffley
LQ Newbie
 
Registered: Dec 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
OK I'll use a bridged connector. Thanks for the help!
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] USB harddrive won't mount after cord was pulled out jaschon Linux - Hardware 4 07-16-2010 06:28 PM
Cannot Transfer Files with USB and Wifi Card Issues keljaden Linux - Hardware 3 10-08-2008 05:33 AM
Printer with long USB cord not working shaji00 Linux - Hardware 3 11-27-2006 12:33 AM
data transfer between UML and linux file systems husham Linux - Server 1 11-03-2006 11:47 AM
Transfer of large files from USB Camera fails John Dory Linux - Hardware 3 06-26-2006 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:02 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