# usbnet etc

## Alaric

All-

  Need your help with this problem. I just got my new SL-C300 (woohoo!!). Anyway, I was just trying to get it to sync up with my work machine and having all kinds of issues. Basically I cant get the usb network to work. I have added pretty much everything to my kernel config when it comes to usb networking (was trying to get this set up in about 10 min before I got buried in work). I am going to go back to it in a few hours and make everything module. Right now I built it in by default. Anyway, using kernel 2.6.11 here is some output for you guys, if you need something else let me know. Thanks in advance for any help!

/var/log/message

Apr  8 09:16:24 ayria hub 1-0:1.0: state 5 ports 6 chg 0000 evt 0002

Apr  8 09:16:24 ayria ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001803 POWER sig=j  CSC CONNECT

Apr  8 09:16:24 ayria hub 1-0:1.0: port 1, status 0501, change 0001, 480 Mb/s

Apr  8 09:16:24 ayria hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x501

Apr  8 09:16:24 ayria ehci_hcd 0000:00:1d.7: port 1 full speed --> companion

Apr  8 09:16:24 ayria ehci_hcd 0000:00:1d.7: GetStatus port 1 status 003801 POWER OWNER sig=j  CONNECT

Apr  8 09:16:24 ayria uhci_hcd 0000:00:1d.0: wakeup_hc

Apr  8 09:16:24 ayria hub 2-0:1.0: state 5 ports 2 chg 0000 evt 0002

Apr  8 09:16:24 ayria uhci_hcd 0000:00:1d.0: port 1 portsc 0083,00

Apr  8 09:16:24 ayria hub 2-0:1.0: port 1, status 0101, change 0001, 12 Mb/s

Apr  8 09:16:24 ayria hub 2-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101

Apr  8 09:16:24 ayria usb 2-1: new full speed USB device using uhci_hcd and address 6

Apr  8 09:16:24 ayria usb 2-1: ep0 maxpacket = 16

Apr  8 09:16:29 ayria usb 2-1: khubd timed out on ep0in

Apr  8 09:16:29 ayria usb 2-1: skipped 4 descriptors after interface

Apr  8 09:16:29 ayria usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0

Apr  8 09:16:29 ayria usb 2-1: default language 0x0409

Apr  8 09:16:29 ayria usb 2-1: Product: SL-C3000

Apr  8 09:16:29 ayria usb 2-1: Manufacturer: Sharp

Apr  8 09:16:29 ayria usb 2-1: hotplug

Apr  8 09:16:29 ayria usb 2-1: adding 2-1:1.0 (config #1, interface 0)

Apr  8 09:16:29 ayria usb 2-1:1.0: hotplug

Apr  8 09:16:29 ayria usbserial_generic 2-1:1.0: usb_probe_interface

Apr  8 09:16:29 ayria usbserial_generic 2-1:1.0: usb_probe_interface - got id

lsusb

Bus 002 Device 006: ID 04dd:9031 Sharp Corp. Zaurus C-750/C-760 PDA

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            2 Communications

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        16

  idVendor           0x04dd Sharp Corp.

  idProduct          0x9031 Zaurus C-750/C-760 PDA

  bcdDevice            0.00

  iManufacturer           1 Sharp

  iProduct                2 SL-C3000

  iSerial                 0 

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           84

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          3

    bmAttributes         0xc0

      Self Powered

    MaxPower                2mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           3

      bInterfaceClass         2 Communications

      bInterfaceSubClass     10 Mobile Direct Line

      bInterfaceProtocol      0 

      iInterface              4 MDLM Network Communication Interface

  unknown descriptor type: 05 24 00 10 01

  unknown descriptor type: 15 24 12 00 01 5d 34 cf 66 11 18 11 d6 a2 1a 00 01 02 ca 9a 7f

  unknown descriptor type: 06 24 13 00 00 03

  unknown descriptor type: 0d 24 0f 05 00 00 00 00 ea 05 00 00 00

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x02  EP 2 OUT

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               none

        wMaxPacketSize         64

        bInterval               0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               none

        wMaxPacketSize         64

        bInterval               0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x85  EP 5 IN

        bmAttributes            3

          Transfer Type            Interrupt

          Synch Type               none

        wMaxPacketSize          8

        bInterval              10

  Language IDs: (length=4)

     0409 English(US)

----------

## Alaric

Just to add, I set up a net.usb0 and added the interface in my /etc/conf.d/net. When I try and pring up the interface using /etc/init.d/net.usb0 I get the following:

bash-2.05b# /etc/init.d/net.usb0 start

 * Bringing usb0 up (192.168.0.200)...

SIOCSIFADDR: No such device

usb0: unknown interface: No such device

SIOCSIFBRDADDR: No such device

usb0: unknown interface: No such device

netmast: Unknown host

ifconfig: `--help' gives usage information.                                                    [ !! ]

Kinda stumped, I cant see it listed when I run an ifconfig -a. I am pretty sure everything is right, but I just dont know. Thanks again for taking hte time to read/help!

----------

## Replicant

Well, I've got a SL-C1000 but apart from the hdd it should be more or less identical. I am already fooling around with trying to get "Matrix" to run on it...

Well anyway, back to the problem at hand:

I am an even worse noob, so I wouldn't even have known, where to look, but I get

Apr  9 19:22:13 box ohci_hcd 0000:00:02.1: wakeup

Apr  9 19:22:13 box usb 3-3: new full speed USB device using ohci_hcd and addres

s 21

Apr  9 19:22:18 box usb 3-3: khubd timed out on ep0in

Apr  9 19:22:26 box usbcore: registered new driver usbnet

in /var/log/messages

and the same (apart from the line where it says C1000) from lsusb -v

I have to admit thought, that I don't know how to setup the net.usb0. Any help appreciated!

UPDATE:

So, apparently (from googling) one sets up the /etc/init.d/net.usb0 by just copying net.eth0 over. I edited the /etc/conf.d/net file by adding

iface_usb0="192.168.129.1 broadcast 192.168.129.255 netmask 255.255.255.0"

and , voila, it doesn't work. Instead I get:

 * Starting usb0

 *    Bringing up usb0

 *       192.168.129.1

 *       usb0 does not exist                                              [ !! ]

so it looks like I got the same problem here.

----------

## Replicant

Hm, which kernel is your desktop-box running, btw? I have 2.6.11-r4. I stumbled about some pages stating that the usbnet-driver may be broken in the 2.6.11 series. Not sure, thought.

I should probably boot to an older kernel and see if it works. 

I'll see if I can find the time...

----------

## NeddySeagoon

Replicant,

That means the usbnet module is not loaded.

----------

## Alaric

Well, here is some info.

I decided to use my laptop as a test bed. Its running kernel 2.6.10. I was able to get it all working fine. Basically what I did was make the link to net.usb0 then plugged in the zaurus and as soon as it came up, I could start net.usb0 with no problems. One strange problem I am still working with is that once the connection is up, if I try and bring up the wireless network the laptop freezes and I can only get out of it with a hard reboot. I think it has to do with the 802.11b bridging in the kernel, but im still verifying this.

As for my work machine, I still have no luck. Syslog shows it hooking up, but I just cannot get the usbnet module to load no matter what I do. I do realize that I dont have usbcore, but I dont think that should matter. I cant remember if its on the laptop or not, I would have to check in a bit.

So anyway, im at an impass, I just cannot get this sucker connected. I started using kernel 2.6.11-r5 but rolled back to the 2.6.11 vanilla sources. Might decide to roll back further to the 2.6.10 source if I get bored of hacking away at this. If anyone has any suggestions of what I can try, I would love to hear them. Thanks in advance!

Oh and Replicant here are some links that might help you out setting it all up:

http://www.openzaurus.org (has a great doc on usbnetworking)

http://www.oesf.org (probably the best source of info)

Those should get you started, and ill keep you posted if I make any headway.

----------

## Replicant

Thanks for the hints.

I"ve looked around a bit and tried some things (without success, I should say). 

Regarding usbnet and the usb0-device:

AFAIK (which is not much), what happens when I plug in the Zaurs is this:

- the hotplug-deamon sees the new device 

- the hotplug-deamon should somehow know that the new device should be connected to the usbnet driver (but apparently doesn't know)

Anyway, I stumbled over the usbmodules command (I think, I am not at home, at the moment), which apparently tells the hotplug deamon which

drivers belong to which device. Doing "usbmodules <devicenumber>" (or something) doesn't return usbnet, however.

From the manpages of usbmodules, I found some file (can't remember which one), where some properties of usb-devices where listed. 

Apparently the Zaurus C1000 does not match with anything in that list (comparing with the output of lsusb). Just for fun I changed the values and, halleluja,

usbmodules then returned usbnet as the responsible driver.

That didn"t help, though.

Anyway, I wasn"t really confortable anymore with screwing around with my system without the slightest idea of what I was doing so I stopped there. 

Additionally I might have been completely of the right track and this has nothing to do with the problem at hand.

Could somebody shed some light on this whole business?

----------

## Alaric

Well I rolled back to the 2.6.10 kernel, (just copied my .config over from 2.6.11) and everything works fine. Im thinking the usbnet.o is bad. I might poke around with it if work slows down. Damn monday's. Anyway, thats about all I can tell you for now. If I find something ill let you know. Ill have to dig back into usbmodules. I wasnt aware that there was a way to specify certian device bindings and such with it, but its been forever since I have used it. Good luck, when you get home, if you roll up a 2.6.10 kernel everything should work just fine. Let me know if you need any info on what options in the kernel you need, but its pretty self explanitory. Now to get the bridging working.

Alaric

----------

## Replicant

OK, I can confirm that the connecting works with 2.6.10 (I still had an image so I just enabled usbnet and did make modules && make modules_install). But now I am basically stuck (wouldn't know, what to do to get it to work in 2.6.11) and unfortunately my entrance (E17 display manager) doesn't work with the 2.6.10 kernel (don"t have time to look into that).

Well, at least I can then use the desktop box as a rather expensive network-accessoire for the zaurus ...

Replicant

----------

## Alaric

Yea I was just using this until the CM Wireless card got here. Anyway, sorry to hear about E. Maybe the will fix the modules in the next release. I have mounted my zaurus as a samba file share and am happily moving stuff on and off of it. Still cant get it to sync right with multisync or qtopia desktop. Ahh well, not major as I can just move the files by hand, just wanted it for the calandar app really. Right now im busy putting mplayer and other such utilities on. Good luck with yours and if I get anything new I will let you know.

Alaric

----------

## Replicant

So, as a conclusion: Should I file a bug somewhere (and, if so, where?)

----------

## imrambi

I have been having the same issue. I filled a bug report yesterday. Meanwhile I am now using 2.6.9.

----------

## jancici

well, when I plug SL-6000L it is apearing in lsusb. BUT hotplug is NOT loading usbnet module.

I don't understand exactly how it is working, but if there is a problem in usbnet, how HotPlug knows it and it is not loading that module?

----------

## imrambi

lsusb uses uhci-hcd module. usbnet is for TCP/IP over usb. You can always check your script to make sure it executes correctly.

----------

## jancici

how can I checke that?

----------

## imrambi

Your script should be /etc/hotplug/usb/usbnet (IIRC). This should bring up the interface set samba and other things. You might get an error in dmesg if it does work right.

----------

## jancici

I have NOT anything in /etc/hotplug/usb, should I have some script there?

when I did using Zaurus with original SharpROM it was working veery nicely, when plug Z the net.usb0 did start and bring network UP

and now hotplug is not doing anything  :Sad: 

----------

## imrambi

what kernel are you running?

----------

## jancici

2.6.11-gentoo-r5 but I did write that in your thred : https://forums.gentoo.org/viewtopic-p-2323779.html#2323779

----------

## Replicant

I found this by googling:

http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg33299.html

stating that this issue is less of a bug and more of a Sharp-problem (with the Zauri lying about their abilities). From what I can see, the

suggested patch has already been incorporated in the gentoo mm-sources 2.6.12 kernel package (maybe for those of you who absolutely have to use > 2.6.10 NOW). So I would assume that this patch will also be incorporated in 2.6.12 gentoo-sources?

Anyway I will compile aformentioned 2.6.12 mm-patched kernel (just to see if it works) and get back to you with the results.

EDIT: OK, tested it, usb0 interface shows up, so it seems to work. We will just have to wait, I assume...

----------

