NSLU2-Linux
view · edit · print · history

Wireless Chipset ZD1211?

This guide is written for the SlugOS 5.3 release, if a newer release is out please update this to match changes.

#!/bin/sh

### Install modules and stuff to make zd1211 dongle work on SlugOS.

# The ugly stuff with /tmp/r in the /etc/network/interfaces file
# can be uncommented to prevent the dhcp of the wireless iface
# from overwriting the DNS resolver - useful if the wired and wireless
# networks are on different subnets or on different sides of a firewall,
# as they are in my case.

echo "adding wlan0 wifi network interfaces..."
grep eth1 /etc/network/interfaces
if [ $? -ne 0 ] ; then
echo '#' >>/etc/network/interfaces
echo '#auto wlan0' >>/etc/network/interfaces
echo 'iface wlan0 inet dhcp' >>/etc/network/interfaces
echo ' pre-up /sbin/ifconfig $IFACE up' >>/etc/network/interfaces
echo '# pre-up cp /etc/resolv.conf /tmp/r' >>/etc/network/interfaces
echo ' wpa-conf /etc/wpa_supplicant.conf' >>/etc/network/interfaces
echo ' wpa-driver wext' >>/etc/network/interfaces
echo '# wireless-key 1234567890' >>/etc/network/interfaces
echo '# wireless-essid limbo-link' >>/etc/network/interfaces
echo '# up cp /tmp/r /etc/resolv.conf' >>/etc/network/interfaces
echo '' >>/etc/network/interfaces
fi

echo "updating opkg feeds..."
opkg update

echo "installing required drivers and software..."
echo "(some drivers may not install if they are already built into the kernel;"
echo "this is not a problem.)"
# Wireless packages
opkg install wireless-tools
opkg install kernel-module-zd1211rw

# WEP
opkg install kernel-module-ieee80211-crypt-wep kernel-module-crypto-blkcipher
opkg install kernel-module-arc4 kernel-module-ecb # kernel-module-aes

# WPA
opkg install wpa-supplicant
opkg install kernel-module-ieee80211-crypt-tkip kernel-module-michael-mic

#Final touch
depmod -a

echo "Please reboot, then you can type \"ifup wlan0\" to bring up the new network..."

Copy that script over to your slug and run the script, this will take care of setting up the device.

WEP

This needs to be completed by someone who has used WEP :)

WPA

These next steps will allow you to connect to a WPA encrypted network.

nano /etc/wpa_supplicant.conf

Note: I use nano as my text editor just replace yours with your favorite.

Fill the above config file with:

network={

    ssid="(YOUR_NETWORK_NAME)"

    scan_ssid=1

    key_mgmt=WPA-PSK

    psk="(YOUR_PASSCODE)"
}

Replacing the ssid and psk with the right infomation.

Final Steps

Reboot the slug and as the script earlier run:

ifup wlan0

Your slug should now connect to the network, if you want the wireless to auto connect at boot just uncomment the line in /etc/network/interfaces which has auto wlan0 dhcp in.

view · edit · print · history · Last edited by Immolo.
Originally by Immolo.
Page last modified on October 21, 2009, at 09:13 AM