LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-23-2007, 07:26 AM   #1
ramesh6056
Member
 
Registered: May 2007
Posts: 89

Rep: Reputation: 15
Cool Usb-ethernet


Hi all,

I am running open suse 10.2 on my pc. I want to use
the usbnetwork for communicating with my target.

Now, when i give the command ifconfig usb0 192.168.1.10 i get the following error message

linux-m5wh:/ # ifconfig usb0 192.168.1.10
SIOCSIFADDR: No such device
usb0: unknown interface: No such device



if have given the command ifconfig -a. I got the following list of interfaces but not usb0

eth0 Link encap:Ethernet HWaddr 00:0B:6A:5B0:86
inet addr:192.168.1.70 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:61413 errors:0 dropped:0 overruns:0 frame:0
TX packets:134303 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8722387 (8.3 Mb) TX bytes:190051269 (181.2 Mb)
Interrupt:169 Base address:0xdc00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:355 errors:0 dropped:0 overruns:0 frame:0
TX packets:355 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:24899 (24.3 Kb) TX bytes:24899 (24.3 Kb)





I have tried inserting usbnet.ko module also. It is inserting. But if i use modprobe usbnet.ko it is giving
FATAL: Module usbnet.ko not found.

if i give lsmod | grep usb i get
usbnet 20616 0
usbhid 52192 0
usbcore 114896 4 usbnet,usbhid,uhci_hcd,ehci_hcd


I think my usbnet module is inserted..but still now i could not recognize my usb interface... Please help me up in solving this issue.
 
Old 07-23-2007, 02:40 PM   #2
judecn
LQ Newbie
 
Registered: Jul 2007
Distribution: Debian, Angstrom, Familiar, OpenZaurus
Posts: 24

Rep: Reputation: 15
Your usbnet module is indeed inserted...however, when probing modules with modprobe, don't include the .ko extension (i.e. "modprobe usbnet" will work). After the module is inserted, you will need physically insert the USB cable into your machine AFTER it has been inserted into the target. That should cause usb0 to appear.

What exactly are you trying to connect to? The only time I've ever used usb-over-ethernet was to SSH into a Linux PDA through it's USB docking cradle.
 
Old 07-24-2007, 01:01 AM   #3
ramesh6056
Member
 
Registered: May 2007
Posts: 89

Original Poster
Rep: Reputation: 15
Usb-ethernet problem...

Hi,

thanks for your reply...

I am using Open SUSE 10.2 linux. I am trying to connect my PXA255 board. It also has got the usb networking capability. When i use ifconfig -a in my target board (PXA255), i am getting lo,eth0 and usbf. So, on my board, usb networking is possible.

My open suse also tells that it is having sufficient drivers (usbnet.c), which i inserted using insmod, It is inserting properly, but when i do ifconfig -a on my
pc, it is not showing usb0 or usbfs interface. So, i have tried the following things.

1. Through YAST i created one more device, which
created a file called usb-eth-bus-usb. I set
the ip setting and all those stuffs. Then
also i could not see an interface called
usb0.

2. i tried creating a file under /etc/
sysconfig/network/ifcfg-usb0 using the
ifcfg-template present over there. There
also i set, ip, broadcast, startup mode as
auto(tried hotplug also- but it is telling
that hotplug was not installed),subnet etc.
This step was also not working.



Overall i could never bring out an interface called usb0 on my ifconfig command. Many of you might be
connecting usb-webcam, usb-ethernet etc...

You may be using the usb-ethernet interface. Please
help in telling how to setup an usb0 interface on my
pc (OPEN SUSE 10.2)...
 
Old 07-24-2007, 01:20 AM   #4
judecn
LQ Newbie
 
Registered: Jul 2007
Distribution: Debian, Angstrom, Familiar, OpenZaurus
Posts: 24

Rep: Reputation: 15
Like I said, your device (PXA255 board) needs to be physically plugged into your computer via a USB cable BEFORE ifconfig will work
 
Old 07-24-2007, 11:26 PM   #5
ramesh6056
Member
 
Registered: May 2007
Posts: 89

Original Poster
Rep: Reputation: 15
Usb ethernet support...

Hi,

Thanks for your interest.

I tried plugging up my board to my system through usb. It is not even detecting it. After doing that i tried to ifconfig. But, the problem persist till now.

In web i found that "hotplug" option should be enabled in the kernel, to get the usbinterface when plugging the device into the usb.

But hotplug is just to load the necessary modules into the kernel when ever usb device is inserted. After inserting the module. How could i manually set the interface.?without using hotplug?
 
Old 07-25-2007, 01:34 AM   #6
judecn
LQ Newbie
 
Registered: Jul 2007
Distribution: Debian, Angstrom, Familiar, OpenZaurus
Posts: 24

Rep: Reputation: 15
Hmmm....

What does lsusb give you on the host machine? Also, do you see anything relevant in lshw under the usb section?

Unfortunately, setting the usb networking interface has little to do with hotplug; as you correctly pointed out, hotplug merely loads the necessary modules based on the device that was plugged in, and leaves everything else (including interface configuration) to the modules it loads.

Are you sure your board's USB networking subsystem is working properly? You can't just use usb networking on ANY device; the device at the other end (the board) must behave, in part, like a NIC.
 
Old 07-26-2007, 05:17 AM   #7
ramesh6056
Member
 
Registered: May 2007
Posts: 89

Original Poster
Rep: Reputation: 15
Usb-ethernet problem...

Hi,

the lsusb option results in the following message..
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 001 Device 003: ID 062a:0000 Creative Labs
Bus 001 Device 001: ID 0000:0000

The one device that you can see on device 003 is nothing but my usb mouse...

My board has an usb networking support. I am sure of it...becuase when i give ifconfig it is showming me the following...


eth0 Link encap:Ethernet HWaddr 00:12:34:56:78:9A
inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING 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:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Base address:0x300

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

usbf Link encap:Ethernet HWaddr 58:5F:3F:C0:C8:32
inet addr:192.168.1.5 Mask:255.255.255.0
UP RUNNING 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:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


The last one indicates the usbf that is usb interface. Is there anyway, without setting up hotplug, to set up an usb interface..?
 
Old 07-26-2007, 07:44 PM   #8
judecn
LQ Newbie
 
Registered: Jul 2007
Distribution: Debian, Angstrom, Familiar, OpenZaurus
Posts: 24

Rep: Reputation: 15
One last question: is your PXA255 board acting as a USB device (or slave, or client) to the host PC, or are you attempting to do host-to-host networking? If it's the latter, then standard USB cables will not work--you'll need a host-to-host USB cable (details at http://www.linux-usb.org/usbnet).

If you are indeed doing host-to-device networking, then the only thing I can think of is that it's a hardware problem (maybe a bad cable or a bad hub). You've done everything right from the software point-of-view, as far as I see. The usb0 interface will come online as soon as the usbnet module, with the help of Linux's USB stack, detects the presence of a host or device that supports CDC Ethernet or RNDIS (the latter of which is a kernel option you'll have to enable). Unfortunately, there's no way to simply create the interface; that's the job of the usbnet module, and cannot be controlled from user-space in any way that I'm aware of (short of simulating hardware events).
 
Old 07-27-2007, 01:19 AM   #9
ramesh6056
Member
 
Registered: May 2007
Posts: 89

Original Poster
Rep: Reputation: 15
Hi,

Great thanks for your reply... In my board specification... It has been mentioned that my board supports USB slave and it supports USB ethernet only...
It has got the capability to simulate from Usb to Ethernet data..

The board has both USB host and USB slave. THe USB slave has an out plug similar to that of memory sticks.. This i use to connect to the USB host of my pc. In the doucments it has been mentioned that if the pc is a 2.4 kernel, we need to patch the kernel with their usbnet.c file which is meant for target. But since my kernel is 2.6, i don't think patching is required. Since my usbnet.o module is already available.

Whether i need to replace the file usbnet.c present in my system with their ones and recompile the kernel, whether the problem is with that?
I also tried that, i tried to insert the usbnet.o after creating a module with the targets usbnet.c...It is not inserting... It is showing the error "-1 Invalid Module format" ... So, i left that idea there itself.

My board document clearly mentions that as soon as the board is connected with the pc after patching the kernel in pc i.e, making the pc configured with usbnet i should see the message on the /var/log.. file...but nothing seems to happen like that..

Now, you might have got an idea whether i am using an usb-slave or usb-ethernet or host-host networking..

Last edited by ramesh6056; 07-27-2007 at 01:26 AM.
 
Old 07-28-2007, 02:38 PM   #10
judecn
LQ Newbie
 
Registered: Jul 2007
Distribution: Debian, Angstrom, Familiar, OpenZaurus
Posts: 24

Rep: Reputation: 15
First off, do NOT attempt to use the usbnet.c patch against a 2.6 series kernel. The 2.6 series kernel has that feature in mainline, so there is no need. Also, that file is designed specifically for 2.4, which has a different module format than 2.6 (which is why insmod failed). In short, there's no need for you to patch your kernel.

Software-wise, nothing more is needed than making sure usbnet is inserted to make the usb0 interface appear on the host PC (which you have already done), and since your board acts as a slave to your PC, no host-to-host cabling is needed. This makes me think you might have a hardware malfunction (i.e. a bad USB port, a bad cable, etc), which is known to happen, since the usbnet module automatically creates the usb0 interface once it detects the presence of a slave device. The fact that the interface ISN'T appearing is almost always a sign that the USB device isn't registering with the usbcore driver. Since the USB code in the kernel is fairly mature (unless you have an exotic motherboard that is only recently supported), it is most likely you have a hardware malfunction.
 
Old 07-29-2007, 10:40 PM   #11
ramesh6056
Member
 
Registered: May 2007
Posts: 89

Original Poster
Rep: Reputation: 15
Hi...

Great thanks for your reply...

From your brief explanation, i came to know that it is an hardware issue...Let me contact the board manufacturer...
 
Old 07-30-2007, 01:49 AM   #12
judecn
LQ Newbie
 
Registered: Jul 2007
Distribution: Debian, Angstrom, Familiar, OpenZaurus
Posts: 24

Rep: Reputation: 15
It may not be the board however...it could be the cable or the host PC's port
 
  


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
USB Ethernet Adapter shababc Linux - Newbie 1 03-05-2006 03:45 AM
USB Ethernet Adapter shababc Red Hat 1 02-18-2006 01:39 PM
usb to ethernet dongle jocool5 Linux - Hardware 1 08-23-2005 01:46 PM
ethernet to usb xp crossover ulysses Linux - Networking 1 09-23-2004 11:45 AM
USB Ethernet Card Pubmaster Linux - Networking 9 07-04-2002 08:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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