LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-17-2006, 02:26 PM   #1
stefan_578
LQ Newbie
 
Registered: Jun 2006
Posts: 25

Rep: Reputation: 15
host-to-host USB cable: how to make it work under debian??


I have a usb host-to-host
cable, which is supposed to connect two computers.

Although my machine recognizes the device
(I am at debian etch) and the corresponding modules are loaded,

I just do not know wht to say to launch the thing.

Any help?

There is an opinion that one should configure the interface but I do not know how to do this either.

By the way the cable is not broken, since
it connects two XP machines without problem.

Thanks

Stefan
 
Old 08-20-2006, 11:22 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,119

Rep: Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336
If the device is recognized correctly you should have a usb0 interface device. You can configure it just like any other ethernet device. To configure it manually:

ifconfig usb0 192.168.1.1 netmask 255.255.255.0 up

Use any private IP address but it should be not be on the same subnet if you have additional network.

http://www.linux-usb.org/usbnet/
 
Old 08-28-2006, 09:07 AM   #3
stefan_578
LQ Newbie
 
Registered: Jun 2006
Posts: 25

Original Poster
Rep: Reputation: 15
usb host-to-host cable

Hi Michaelk

Thanks for the advice. Unfrtunately nothing changed after I performed the operation you suggested:


ifconfig usb0 192.168.1.1 netmask 255.255.255.0 up



At present the situation is as follows:
I have the usb cable plugged in by both ends
at the same computer.

The command
#ifconfig -a
gives the following (in what usb is concerned):


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
usb0 Link encap:Ethernet HWaddr FEE:84:B2:93:97
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::fcde:84ff:feb2:9397/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:168 (168.0 b)

usb1 Link encap:Ethernet HWaddr FEE:84:B2:93:97
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
%%%%%%%%%%%%%%%%%%%%%%5

however

#ifup usb0

answers
Ignoring unknown interface usb0=usb0.

Any advice?

many thanks

Stef
 
Old 08-28-2006, 09:49 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,119

Rep: Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336
Quote:
usb0 Link encap:Ethernet HWaddr FEE:84:B2:93:97
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::fcde:84ff:feb2:9397/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:168 (168.0 b)
It appears that usb0 is configured. Can you ping the other computer?
 
Old 08-30-2006, 04:17 AM   #5
stefan_578
LQ Newbie
 
Registered: Jun 2006
Posts: 25

Original Poster
Rep: Reputation: 15
Hi, michaelk

great this worked!

i configured one machine with

ifconfig usb0 192.168.1.1 netmask 255.255.255.0 up

another with
ifconfig usb1 192.168.1.3 netmask 255.255.255.0 up


and now

ping 192.168.1.3 from the first machinme gives
something nice:


$ ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.351 ms


etc

Basically this should show that the device works, right?

however I have no idea what to do now.
assume I want to move a file from 1.1 to 1.3

what do i do??

(another inquiries, minor for the moment:
after a reboot the interface loses cofiguration,

also the small green lamp oon the cable does
not switch on, although it does so with the windows connection)

Any advice??

Thanks!

Stef
 
Old 08-30-2006, 04:22 AM   #6
stefan_578
LQ Newbie
 
Registered: Jun 2006
Posts: 25

Original Poster
Rep: Reputation: 15
Yes!!!

Oh yes,

I understand now

the usual ftp transfer works

I used gftp and it transfers nicely the files from one to another.

now the only problem is that
I must configure it every time
after the reboot.

any remedy for this?

Many thanks!!!!!

Stefan
 
Old 08-30-2006, 06:34 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,119

Rep: Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336
What linux distribution / version are you running?

You can add a network configuration script for usb0.
A real simple method would be to add the lines to the /etc/rc.local file but not all distribution use it.
 
Old 09-02-2006, 11:39 AM   #8
stefan_578
LQ Newbie
 
Registered: Jun 2006
Posts: 25

Original Poster
Rep: Reputation: 15
Hi michaelk

I have debian etch and there is no
/etc/rc.local
file.

Well I guess I will leave it at this stage
in any case I can
save the line as a file and then
make it work as "sh [file]"

the essential is won.

Many thanks again!

Stef
 
Old 09-13-2006, 08:47 AM   #9
stefan_578
LQ Newbie
 
Registered: Jun 2006
Posts: 25

Original Poster
Rep: Reputation: 15
another host to host link: a problem

Hi michaelk

I have now a new host to host adapter bought at another place and trying to link 2 computers
(debian etch on both).

I did the same thing as last time
that is i configured both
interfaces by

ifconfig usb0 192.168.1.1 netmask 255.255.255.0 up

and

ifconfig usb0 192.168.1.3 netmask 255.255.255.0 up

afterwards ifconfig -a

recognizes both interfaces with

usb0 Link encap:Ethernet HWaddr 06:38:5A:7F:90:4A
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::438:5aff:fe7f:904a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:1 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:140 (140.0 b) TX bytes:464 (464.0 b

i can ping 192.168.1.3 from one machine it gives
the usual answer
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=1.02 ms

however I can not ftp one machine from the another as I did before!
ftp> open 192.168.1.3
ftp: connect: Connection refused

I am puzzled now.
what happens here?

does it mean that this usb link does not support the ftp protocol?

could I use it at all then?

many thanks

Stef
 
Old 09-13-2006, 08:57 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,119

Rep: Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336
Same or different computers?
Is the ftp server running?
Any firewalls running on either machine?
 
Old 09-14-2006, 02:42 AM   #11
stefan_578
LQ Newbie
 
Registered: Jun 2006
Posts: 25

Original Poster
Rep: Reputation: 15
One of the computers is the same as in the previous setting - it is my laptop.

the other one is different (I moved to another city)
and has debian etch instead sarge in the previous setting.

the usb host-to-host cable is different (I bought another one, helas, shoud have bought two same things)

I do not know how to run ftp servers so i do not install or use them

I just used usual ftp (with "gftp" and also from command line).

I also tried telnet and rlogin with the same result: connection refused.

However I do not think there is a firewall by the reason that this is the same laptop

and I changed nothing during these days

Thanks

stef
 
Old 09-14-2006, 06:55 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,119

Rep: Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336
Since you can ping the computers then the interface is ok. I assume you are trying to ftp from the laptop to the other computer. ftp is a client/server setup where gftp is a client application. Just like firefox or IE is the client and apache the webserver. The connection refused error means that the server isn't running. Same goes for telnet. Since this is a different computer you will need to make sure the daemons are running and the firewall allows traffic or is off.
 
Old 09-14-2006, 11:28 AM   #13
stefan_578
LQ Newbie
 
Registered: Jun 2006
Posts: 25

Original Poster
Rep: Reputation: 15
Well i tried it both ways

from laptop to the desktop and other way round.

nothing works.

however the ftp itself works on both computers
(I use it every day many times to connect to remote servers).

I am slightly puzzled.

How could I make the checks you mentioned?
 
Old 09-14-2006, 08:33 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,119

Rep: Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336Reputation: 5336
Quote:
ftp itself works on both computers
What do you mean by ftp itself works?
can you access the ftp servers on PC itself i.e.
ftp localhost
or
ftp> open localhost
Can you login etc?
 
Old 09-14-2006, 08:55 PM   #15
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I suggest using either SAMBA or ssh. Both are easy to setup, but I think ssh has a quicker setup to transfer files. FTP servers takes time to configure.
 
  


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
Iptables / Host* files / New Cable Modem (dhcp) rhb327 Slackware 3 12-31-2005 06:11 PM
connecting a host to internet thru another host (both running suse9.3) rcbell Linux - Networking 1 12-17-2005 05:35 PM
USB host to host communication mic Programming 1 07-15-2005 09:44 AM
Resolving <www.some remote host>.... failed: Host not found. koodoo Linux - Newbie 2 06-27-2005 08:48 AM
Unknown Host <Linuxmachinename> / Unable to ping by host name nishi_k_79 Linux - Networking 4 11-01-2003 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:27 PM.

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