Author Topic: Usb Networking  (Read 7368 times)

jeana

  • Newbie
  • *
  • Posts: 34
    • View Profile
Usb Networking
« on: January 14, 2009, 03:53:15 am »
Did somebody know how to activate the USB networking ?
Zaurus SL-C3000 with Zubuntu

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Usb Networking
« Reply #1 on: January 14, 2009, 02:23:41 pm »
Code: [Select]
modprobe usbnet
ifconfig usb0 up xxx.xxx.xxx.xxx

That's how it works normally, at any rate (under Angstrom/Debian, as well as other distros not on the Z).
« Last Edit: January 14, 2009, 02:30:33 pm by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

jeana

  • Newbie
  • *
  • Posts: 34
    • View Profile
Usb Networking
« Reply #2 on: January 15, 2009, 04:14:27 am »
Quote from: Capn_Fish
Code: [Select]
modprobe usbnet
ifconfig usb0 up xxx.xxx.xxx.xxx

That's how it works normally, at any rate (under Angstrom/Debian, as well as other distros not on the Z).

Thank you for your reply Capn_Fish.

Unfortunately nothing happens when doing the modprobe and ifconfig :
  • In dmesg nothing is logged
  • ifconfig gives the error : usb0: ERROR while getting interface flags: No such device
    SIOCSIFADDR: No such device
    usb0: ERROR while getting interface flags: No such device
  • lsusb list only the following : Bus 001 Device 001: ID 1d6b:0001
  • When I connect or disconnect the USB cable nothing is logged in dmesg (if I put a mouse or an USB flash dmesg give me logs and the different device are recognized)
If I do a modprobe g_ether, I have the following with dmesg :
Quote
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using pxa27x_udc, OUT ep1out-bulk IN ep2in-bulk STATUS ep5in-int
usb0: MAC 46:8e:dc:59:4a:bf
usb0: HOST MAC 0e:1a:45:af:21:75
usb0: RNDIS ready
pxa2xx-udc pxa2xx-udc: UDC connecting
and lsusb gives the same result.

If I disconnect the USB cable, dmesg logs nothing.
If I reconnect the USB cable, dmesg logs :
Quote
pxa2xx-udc pxa2xx-udc: USB reset

Any idea ?
Zaurus SL-C3000 with Zubuntu

danr

  • Full Member
  • ***
  • Posts: 138
    • View Profile
    • http://
Usb Networking
« Reply #3 on: January 15, 2009, 04:54:20 am »
I have the following in /etc/network/interfaces

[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']iface usb0 inet static
pre-up modprobe g_ether
address 192.168.129.201
netmask 255.255.255.0
broadcast 192.168.129.255
gateway 192.168.129.1
post-down rmmod g_ether
[/div]

Try it out and see if it works for you.
SL-C860 running Debian EABI on top of Angstrom 2.6 kernel

jeana

  • Newbie
  • *
  • Posts: 34
    • View Profile
Usb Networking
« Reply #4 on: January 15, 2009, 05:07:36 am »
Thank you for your help danr, but it doesn't work too.

In dmesg I get the following log after an ifup usb0 with the configuration given :
Quote
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using pxa27x_udc, OUT ep1out-bulk IN ep2in-bulk STATUS ep5in-int
usb0: MAC a2:14:42:31:43:b8
usb0: HOST MAC 8e:ca:e5:54:f2:eb
usb0: RNDIS ready
pxa2xx-udc pxa2xx-udc: UDC connecting
NET: Registered protocol family 10
ADDRCONF(NETDEV_UP): usb0: link is not ready

The USB cable is connected to a Windows XP Workstation.
When we plug or unplug the USB cable nothing is detected on the workstation USB devices !
Zaurus SL-C3000 with Zubuntu

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Usb Networking
« Reply #5 on: January 15, 2009, 11:04:18 pm »
Augh! I encountered that back when I was using gadget networking, but it's been 6 months and I've completely forgotten how I fixed it!

Actually - did you ifup usb0 before or after plugging the cable in? I seem to recall it never worked properly unless I started it with the cable disconnected on the zaurus end.
« Last Edit: January 15, 2009, 11:05:50 pm by pelrun »
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

jeana

  • Newbie
  • *
  • Posts: 34
    • View Profile
Usb Networking
« Reply #6 on: January 16, 2009, 02:36:01 am »
Thank you pelrun for you experience.

I tried with and without the USB cable plugged to launch ifup usb0 without success (I launched a reboot after each operation to be sure that the system is in the same state)  
Zaurus SL-C3000 with Zubuntu

Yao

  • Newbie
  • *
  • Posts: 2
    • View Profile
Usb Networking
« Reply #7 on: May 13, 2009, 02:44:32 am »
g_ether also not work for me.
I am using sl-c1000

apink

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Usb Networking
« Reply #8 on: May 13, 2009, 01:33:28 pm »
Quote from: jeana
Did somebody know how to activate the USB networking ?

FWIW:  Whenever I plug in my usb ethernet adapter I have to run this code:

[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']echo -n 1 >/sys/bus/usb/devices/1-2/bConfigurationValue[/div]

Some recent advance in the system development sets a lower power  cutoff threshold that my adapter doesn't meet.  Thus the workaround.  I've never crashed using this workaround.  It has been covered in the forums.
--current use--
linux chroot on top of lineage  on cell phone

--past handhelds--
pandora
ben nanonote
zaurus sl-c1000