NW   NE
 

Sharp Zaurus Developer Information

Corrections and Comments: Spencer Huang
 
SW   SE
NW   NE
 
Howtos

Upgrading The ROM

Connectivity
Wireless 802.11b

Linux Connectivity
Generic (USB)
Debian (USB)
Red Hat (USB)
Suse (USB)
Mandrake (USB)
Generic (PPP USB)
Generic (PPP Serial)

Windows Connectivity
Win2K (Serial)
Win98se (Serial)
WinMe Over (Serial)
WinNTSP6 (Serial)
WinXP Over (Serial)

Developing
Compiler Setup
Compiling the Kernel
Special Considerations
Checklist
System Layout
Application Help Files
IPKG Howto
Buzzer Howto
Led Howto
IrDa Howto
Audio Howto
Fullscreen Howto
Resume Event
Keys
Turning off the screen

Syncing
Linux
Win2K
Wireless

Other
Wireless Comparison
The Z Boot Process
Ipv6 Setup
Servers Setup
SD And CF FAQ
Setting Up A Feed
Converting TTF fonts
Building a ROM
MPEG Encoding

Downloads
ZaurusZone Feed
Links
 
SW   SE
NW   NE
  Howto setup network conectivity with the Zaurus under Debian.

1) Kernel setup

Here are simple steps to make a Debian package of the usb modules for your kernel. If they are confusing or does not work follow the generic Linux (USB) howto for setting up the kernel which does the same thing.

1) determine running kernel version. (i.e. 2.4.19-k7)
2) use apt or dpkg to install kernel-source-[version] (i.e. 2.4.19)
3) apt-get install kernel-package fakeroot
4) cd /usr/src; tar jxvf kernel-source-[version].tar.bz2 (i.e. 2.4.19)
5) cd /usr/src/kernel-source-[version]
6) cp /boot/config-[version] .config
7) make menuconfig, disable CDCEther, enable USBDnet and configure per the steps in the the general linux howto.
note: one caviat. In addition to the configuration you enter for the vendor and product ids per the howto, in order to ensure hotplugging works properly, you need to set "usbd network class" to 2.
8) dpkg -s kernel-image-[version] - check Version line (i.e. 2.4.19-1)
9) fakeroot make-kpkg --bzimage --arch-in-name --revision [Version from step 5] kernel_image;
7) sudo dpkg -i ../kernel-image-[version]*.deb

2) Network Configuration

In the file: /etc/network/interfaces
To use the dhcp server on the Zaurus add:

iface usb0 inet dhcp

For a static IP address add:
iface usb0 inet static
    address 192.168.129.1
    pointopoint 192.168.129.201
    netmask 255.255.255.255

3) Hot Plug

You only have to install "hotplug", which will automaticly configure USB devices assuming that the modules are working. Hotplug will set up the usb0 device everytime you insert the Zaurus in the cradle according to how it is setup in section 2.

This goes in /etc/network/if-up.d/50zaurus. It must be executable. It allows your Z to get out on the internet using IP masquerading through your debian box. Note that you need to have masquerading already in your kernel. See the general howto for more information about that. The script:

#!/bin/sh

case $IFACE in
  usb0)
    echo 1 > /proc/sys/net/ipv4/ip_forward

    iptables -t filter -F FORWARD
    iptables -t filter -P FORWARD DROP
    iptables -t filter -A FORWARD -s $IF_POINTOPOINT/$IF_NETMASK -j
    ACCEPT
    iptables -t filter -A FORWARD -d $IF_POINTOPOINT/$IF_NETMASK -j
    ACCEPT

    iptables -t nat -F PREROUTING
    iptables -t nat -P PREROUTING ACCEPT

    iptables -t nat -F POSTROUTING
    iptables -t nat -P POSTROUTING ACCEPT

    iptables -t nat -F OUTPUT
    iptables -t nat -P OUTPUT ACCEPT
    iptables -t nat -A POSTROUTING -s $IF_POINTOPOINT/$IF_NETMASK -o
    eth0 -j MASQUERADE
    ;;
esac
 
SW   SE

    This page was last updated: Wednesday, 09-Apr-2003 04:57:24 PDT