Networking > Enable Networking
Configuring the Wireless CF adaptor:
Enabling the wireless network was amazingly easy and straightforward. Just plug in the Wireless CF card and the Zaurus automatically detects it. Then run the Network config applet and enter the network info and press connect. Voila! That's it. Way too easy.
Enabling the USB LAN adaptor:
Now this one was a bit trickier. My USB LAN adaptor came with a Linux driver, a file called rtl8150.c and all that was required was to compile it on the Zaurus (provided you got gcc to work). Anyway, I cheated and googled for rtl8150-1.o and found it :)
Next I had to install this driver which was quite easy. All that was required was to drop it into the following location: /lib/modules/2.4.20/kernel/drivers/usb/net and the hotplug mechanism in Linux would detect whenever the device was connected and enable eth0.
Now came the slightly harder part, ie the automatic configuration of the device. The network applet seems to only work for the CF based cards so it completely ignored eth0. After looking at how the usbdnet and wlan is configured by the hotplug mechanism, I extended the net.agent to check for eth0 as well and added net.func and net.conf to automatically configure the network once the cable was plugged in.
In addition I also wrote a script called net to change the stored network settings so I can easily switch between networks. The configuration for net are stored under /etc/sysconfig/netconf and net is invoked with the name of one of the config files as the parameter. Proxy settings for the Zaurus are stored under /home/zaurus/Applications/Network/modules/Proxies.conf which net will automatically update depending on the config being loaded.
# su # cp /home/zaurus/Documents/custom/rtl8150-1.o /lib/modules/2.4.20/kernel/drivers/usb/net # cp /home/zaurus/Documents/custom/net /usr/bin # cp /home/zaurus/Documents/custom/net.* /etc/hotplug # mkdir /etc/sysconfig/netconf # cp /home/zaurus/Documents/custom/*.conf /etc/sysconfig/netconf
# net dhcp (loads the config file dhcp.conf) # net -gui (starts with opie shell in QTopia desktop) # net -refresh (tells NetFront that its connected already) # net -resume (manually force network to resume)
Here is a sample config file for a private network:
DHCPC=no IP=192.168.1.2 NETMASK=255.255.255.0 DOMAIN= GATEWAY=192.168.1.1 PROXY=0 PROXYHOST= PROXYPORT= DNS1=192.168.1.1 DNS2=
net also has a GUI front-end using opie-sh, but in order to use the GUI, sudo needs to be configured to allow zaurus user to change the network settings, ie. ifconfig and dhcpcd. I also created a netswitch package [netswitch_0.4_arm.ipk] which will do the above steps when installed.
Some application such as NetFront insist on doing their own connection and disconnection to the network and ignore the fact that your USB network is already connected. As a workaround net has a refresh option to reset the network status whenever those programs mess with it. Simply run the following after you have launched NetFront:
# net refresh
A lot of the USB network cards use either the rtl8150 chipset or are compatible with the pegasus driver. Drivers for both are included with netswitch, so installing the netswitch package should enable your USB LAN device in most cases. However, some network cards use other chipsets.