USB for Zaurus

From YobiWiki
Jump to: navigation, search

Converted with HTML::WikiConverter::MediaWiki from my old phpwiki site


Comment activer le lien USB entre le Zaurus sur son cradle et un PC sous Debian

cf http://www.ruault.com/Zaurus/ethernet-over-usb-howto.html
et http://docs.zaurus.com/lc_debian.shtml

1) Patch the linux kernel The patch has been tested against kernel 2.4.17 and up. I've received patches for some specific kernel version shipped with common distributions, see in the download area listed below if there is one for yours !
Download the patch corresponding to your kernel version from here

Assuming your Linux sources are in /usr/src/linux do the following :


  cp usbdnet-2.4.x.patch.gz /usr/src
  cd /usr/src
  zcat usbdnet-2.4.x.patch.gz | patch -p0

Now reconfigure the kernel to support :


  cd /usr/src/linux
  make menuconfig

in "Code maturity level options", select "Prompt for development and/or incomplete code/drivers"
in "USB support", section "USB Network adaptors", select (as a module) "USBD Network (Encapsulated) Host-to-Host Link (EXPERIMENTAL)"
Then enter 04dd in USBD Network idVendor and 8004 in USBD Network idProduct

Now rebuild and install the modules ( note : this supposes that a kernel had already been build in this source tree, if it's not the case, do a make bzImage before the make modules ) cd /usr/src/linux && make clean dep modules modules_install.
Make sure that the core usb support is already active in your kernel : modules usbcore and usb-uhci or usb-ohci should be loaded, if not run modprobe usb-uhci/usb-ohci), otherwise rebuild the kernel and reboot.

If you don't know which usb module to use for your machine ( usb-uhci or usb-ohci ) then check this page, it contains instructions on how to find out.

NOTES:

  • If you had previously compiled in the patched CDCEther driver, remove it from the kernel, having both drivers compiled will prevent the new driver from working.
  • As mentioned by many people, make sure you've compiled in the correct driver into the kernel in the USB Controllers subsection of the USB configuration.
  • Some people report that they're getting the following message when loading the usbdnet module echo_tx not found it looks like you can safely ignore it since it does not prevent the driver from working.
  • Some people have reported file transfer problem on file larger than 65kB, it appears that is was due to the fact that they where using the uhci module instead of the usb-uhci.
    If you're having this kind of problem and you are using the uhci module, try using usb-uhci instead.
  • I've also received reports of kernel crashes when transferring large files with some motherboards ( at least Gigabyte X71 ) and kernel versions ( 2.4.10 and 2.4.18 ). The solution seems to update to a kernel 2.4.19pre8 or higher.

2) Put the Zaurus on the cradle. You should see a message like this in /var/log/messages :


  hub.c: USB new device connect on bus1/1, assigned device number 38
  usb.c: USB device 38 (vend/prod 0x4dd/0x8004) is not claimed by any active driver.
  v0.4b sl@lineo.com, tbr@lineo.com
  usbdnet.c: v0.4b sl@lineo.com, tbr@lineo.com
  usbdnet.c: USB Host to Device Network - for Linux USB Devices using MDLM/CDC
  usb.c: registered new driver usbdnet

If you don't see this, try to push the sync button on the craddle, it should help !

now do ifconfig -a
you should see a new ethernet interface ( probably usb0 ), you can now configure it :


  ifconfig usb0 192.168.129.1 netmask 255.255.255.255 up
  route add -host 192.168.129.201 usb0

then try : ping 192.168.129.201 , if you've got a reply, you've won !

If you're using Debian

For Debian systems you only have to install hotplug (and the appropriate patched kernel, of course).
Then add the following lines to /etc/network/interfaces


  iface usb0 inet static
    address 192.168.129.1
    pointopoint 192.168.129.201
    netmask 255.255.255.255

Hotplug should set up your usb0 device everytime you insert the Z in the cradle.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools