Connecting Zaurus SL5500 to SuSE Linux

Support knowledgebase (jreuter_zaurus_usb)
Applies to

SuSE Linux: Version 8.0

Situation:

You want to connect the SHARP Zaurus SL5500G pocket PC to a SuSE Linux 8.0 system by using Ethernet over USB.

Procedure:

WARNING:
The actions described in this article may render some or all of your USB devices unusable, especially USB network devices. Do not try this on a production machine.

A number of steps is necessary to successfully connect the Zaurus to the Linux system:

Getting the usbdnet kernel driver

An additional kernel module named usbdnet is necessary to connect the Zaurus SL550G via USB. There are currently two ways to obtain it:

Experimental kernel for SuSE Linux 8.0
For the brave at heart: The latest experimental Linux kernel for SuSE Linux 8.0, available from ftp://ftp.suse.com/pub/people/mantel/next/RPM/, has the usbdnet module already included.

WARNING:
Linux kernels from that directory are marked experimental for a reason. Do not use it on production machines, back up all important data before you give it a try.

Building the kernel module yourself

In case you do not want to take the risks of an experimental Linux kernel, you need to compile the usbdnet kernel module by yourself. First, install the kernel sources on your SuSE Linux 8.0 system with

yast2 -i kernel-source

Next, get the patch containing the usbdnet source from http://www.ruault.com/Zaurus/patches/usbdnet-SuSE-8.0-2.4.18.patch.gz and apply it to the kernel source:

cd /usr/src/linux
zcat usbdnet-SuSE-8.0-2.4.18.patch.gz | patch -p1

Reconfigure the kernel with:

zcat /proc/config.gz >.config
make menuconfig

From the USB Driver selection, select "USBD Network (Encapsulated) Host-to-Host Link" as a module. You do not need to fill in the values for Vendor, Product, Class and SubClass. Save the configuration and run

make dep modules

When done, copy the newly created module to the appropriate module directory and run depmod:

cp drivers/usb/usbdnet.o /lib/modules/2.4.18-4GB/kernel/drivers/usb/
depmod -a

Note: you just need to copy this single module, you do not have to install other modules or even a new kernel.

Hotplug subsystem configuration

The module does not work correctly with the uhci driver, but it does with the usb-uhci. Furthermore, the CDCEther driver grabs the device although usbdnet is supposed to handle it.

To achieve this, modify /etc/sysconfig/hotplug first. Change

HOTPLUG_USB_HOSTCONTROLLER_LIST="uhci usb-uhci usb-ohci ehci-hcd"

to

HOTPLUG_USB_HOSTCONTROLLER_LIST="usb-uhci uhci usb-ohci ehci-hcd"
Then add usbdnet to HOTPLUG_USB_NET_MODULES:
HOTPLUG_USB_NET_MODULES="pegasus usbnet catc kaweth CDCEther usbdnet"

Next, disable CDCEther in /etc/hotplug/blacklist by adding the following lines to it:

# Sharp Zaurus doesn't like CDCEther
CDCEther

Finally, restart the hotplug subsystem with:

rchotplug stop;sleep 90;rchotplug start

Depending on your hardware configuration, this may not work as expected. If lsmod still shows up the uhci module instead of usb-uhci, run rchotplug stop and remove all USB related modules manually before you run rchotplug start. In case it still fails (i.e., you were doing this while running X11 and using a USB mouse and you therefor cannot unload the modules), reboot the system. This may be faster than trying endlessly to get rid of all related modules.

To test whether everything works as expected, put the Zaurus into the cradle. You'll hear a beep after at most two seconds. When you do an "lsmod", you should see the usbdnet module listed and you must not see the CDCEther module. ifconfig -a should show the device usb0.

In case you do not even get the beep when you plug in the Zaurus and /var/log/messages doesn't show any USB related activity you may need to reset the pocket PC. A "shutdown -r now" from a console program should be sufficient, the Off-Switch from the tool box does not work reliably. In rare cases you need to perform a full reset, please note that this will destroy all data stored on the Zaurus.

Setting up the network

Use yast2 lan to configure the network. Choose "manual configuration", select "USB" and set a static IP number.

Due to a problem with the interaction between the hotplug subsystem and the network configuration system, you'll need to create the following link in /etc/sysconfig/network:

cd /etc/sysconfig/network
ln -s ifcfg-eth-usb-0 ifcfg-usb0

Finally, change the HOTPLUG_START_NET to yes in /etc/sysconfig/hotplug.

Next time you'll plug in the Zaurus, the network should come up automagically.

Please refer to Zaurus configuration on how to set up the network on the Zaurus. Note that the network setup scripts on the Zaurus fail to set up the default route and the name server (you could use dhcp instead, but dhcpd and hotplugged network devices don't mix very well. You need to restart the dhcpd on the SuSE Linux side after the USB connect.)

Further information

This article would not have been possible without the information from " How to set up an Ethernet over USB connection between the Sharp Zaurus SL-5000D/SL-5500 and a Linux machine" by Charles-Edouard Ruault.


Keywords: ZAURUS, SL550G, SHARP, PDA, USB

Categories: Hardware

Feedback welcome: Send Mail to jreuter+zaurus@suse.de (Please give the following subject: SDB-jreuter_zaurus_usb)
SDB-jreuter_zaurus_usb, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 06. Jun 2002
SuSE Linux AG - Last generated: 10. Jul 2002 by jreuter (sdb_gen 1.40.0)