Difference between revisions of "Wireless Dongle"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m
(Remove stub status)
 
(6 intermediate revisions by one user not shown)
Line 1: Line 1:
 
<font color=red><small><center>Based on work from Sylver's article on Kuruboxwiki</center></small></font>
 
<font color=red><small><center>Based on work from Sylver's article on Kuruboxwiki</center></small></font>
 +
 +
[[Image:Swlmuz-5400.gif|thumb|Safecom SWMULZ-5400|200px|right]]
 +
 +
----
  
 
This is based on my wireless dongle ([http://safecom.cn/code/sub/category.asp?prdid=321&subcatid=41 Safecom SWMULZ-5400]) that I have running and that uses the zd1211 chip, support for this chip is enabled in the 2.6 kernel - andre kindly maintains the upkeep of this kernel and the bootloader to install it on your system. I'm using an LS1(ppc) here, by the way. There is support for other chipsets in the kernel I believe - airo, bcm43xx, hermes, hostap, ipw2100, orinocco, prism54
 
This is based on my wireless dongle ([http://safecom.cn/code/sub/category.asp?prdid=321&subcatid=41 Safecom SWMULZ-5400]) that I have running and that uses the zd1211 chip, support for this chip is enabled in the 2.6 kernel - andre kindly maintains the upkeep of this kernel and the bootloader to install it on your system. I'm using an LS1(ppc) here, by the way. There is support for other chipsets in the kernel I believe - airo, bcm43xx, hermes, hostap, ipw2100, orinocco, prism54
Line 5: Line 9:
 
There is a list of devices that use the zd1211 chipset [http://zd1211.ath.cx/ here]
 
There is a list of devices that use the zd1211 chipset [http://zd1211.ath.cx/ here]
  
==Requirements==
+
[[Image:Wifi.gif|center]]
 +
----
 +
==Requirements==    
  
 
# Kernel that supports your dongle
 
# Kernel that supports your dongle
 +
# More Linux knowledge than me - ([[User:Bauldrick|Bauldrick]])
  
 
==Installation==
 
==Installation==
Line 108: Line 115:
 
  exit 0
 
  exit 0
  
 +
chmod a+x /etc/init.d/wireless
  
 
===WPA Interfaces===
 
===WPA Interfaces===
Line 227: Line 235:
 
  ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
 
  ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
  
Needs to be finished
+
OK - Now you should be able to connect to your wireless dongle on the address you specified in /etc/network/interfaces under eth1
 +
If that works restart
 +
 
 +
reboot
 +
 
 +
Once it boots try connecting to your wireless dongle on the address you specified in /etc/network/interfaces under eth1.
 +
Hopefully you get a connection
 +
 
 +
==Things To Do==
 +
 
 +
Currently I can't connect to the internet (apt-get etc...) whilst I have both wired ethernet port (eth0) and wireless (eth1) "up"
 +
You will need to do
 +
 
 +
ifdown eth0
 +
 
 +
and then everything should be good to go. Obviously this means that the ethernet port can't be used for anything else (must be able to fix this?)
 +
 
 +
Put that into the start script, but becareful that eth1 has a connection, else you'll be locked out? (My box just reverted to 2.4, and so couldn't connect)
 +
 
 +
Needs to be finished [[User:Bauldrick|Bauldrick]] 20:50, 24 January 2007 (EST)
  
  
 
{{Articles|USB}}
 
{{Articles|USB}}
{{Stubs}}
 

Latest revision as of 23:34, 25 December 2007

Based on work from Sylver's article on Kuruboxwiki
Safecom SWMULZ-5400

This is based on my wireless dongle (Safecom SWMULZ-5400) that I have running and that uses the zd1211 chip, support for this chip is enabled in the 2.6 kernel - andre kindly maintains the upkeep of this kernel and the bootloader to install it on your system. I'm using an LS1(ppc) here, by the way. There is support for other chipsets in the kernel I believe - airo, bcm43xx, hermes, hostap, ipw2100, orinocco, prism54

There is a list of devices that use the zd1211 chipset here

Wifi.gif

Contents

Requirements

  1. Kernel that supports your dongle
  2. More Linux knowledge than me - (Bauldrick)

Installation

apt-get install wireless-tools

If you want WPA/2 support

apt-get install wpasupplicant

You'll be needing the firmware for your device (check for latest version - currently 1.3)

mkdir /lib/firmware
cd /lib/firmware
wget http://downloads.sourceforge.net/zd1211/zd1211-firmware1.3.tar.bz2?modtime=1167489439&big_mirror=0
tar -jxvf zd1211-firmware1.3.tar.bz2
mv zd1211-firmware zd1211

Now if you plug your device in you should see it (something similar to below)

dmesg
ieee80211_crypt: registered algorithm 'NULL'
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketrenol>
zd1211rw 1-2:1.0: firmware version 4725
zd1211rw 1-2:1.0: zd1211b chip 0ace:1215 v4810 high 00-02-72 AL2230_RF pa0 g---
zd1211rw 1-2:1.0: eth1
usbcore: registered new interface driver zd1211rw


WEP Interfaces

Things won't work at the moment, we need to add a few things

pico /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
       address 192.168.0.103
       netmask 255.255.255.0
       network 192.168.0.0
       broadcast 192.168.0.255
       gateway 192.168.0.1

       wireless_essid <YourNetworkName>
       wireless_key <YourSecurityKey>

auto eth0
iface eth0 inet static
       address 192.168.0.101
       network 192.168.0.0
       netmask 255.255.255.0
       broadcast 192.168.0.255
       gateway 192.168.0.1

WEP Start

This starts the dongle at boot (don't know why I did it like this - I think you need just create a file with ifup & iwconfig)

pico /etc/init.d/wireless
#! /bin/sh

# /etc/init.d/wireless: start and stop wireless dongle


case "$1" in
start)
  OK="0"
  dmesg | grep -q eth1 && OK="1"

  if [ "$OK" == "1" ] ; then
     ifup eth1
     iwconfig eth1 essid <YourNetworkName>
  fi

  echo -n "Starting wireless dongle"
  ;;
stop)
  OK="0"
   dmesg | grep -q eth1 && OK="1"

  if [ "$OK" == "1" ] ; then
     ifdown eth1
  fi
  echo -n "Stopping wireless dongle"
  ;;

# restart)
#   ;;
#
# *)
#   echo "Usage: /etc/init.d/wireless {start|stop|restart}"
#   exit 1
esac

exit 0
chmod a+x /etc/init.d/wireless

WPA Interfaces

pico /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
network={
        ssid=<YourNetworkName>
        psk=<YourSecurityKey>
        proto=WPA
        priority=5
       }

If you want to use WPA2, change proto=WPA to proto=WPA2

pico /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
       address 192.168.0.103
       netmask 255.255.255.0
       network 192.168.0.0
       broadcast 192.168.0.255
       gateway 192.168.0.1

       pre-up wpa_supplicant -Bw -ieth1 -c/etc/wpa_supplicant.conf -Dwext
       post-down killall -q wpa_supplicant


auto eth0
iface eth0 inet static
       address 192.168.0.101
       network 192.168.0.0
       netmask 255.255.255.0
       broadcast 192.168.0.255
       gateway 192.168.0.1

Installation cont

Putting eth1 before eth0 in /etc/network/interfaces should bring up your wireless dongle (eth1) before the wired ethernet (eth0), but it doesn't for me? So, I had to alter the network start file -

pico /etc/init.d/networking
case "$1" in
   start)
       doopt spoofprotect yes
       doopt syncookies no
       doopt ip_forward no

       echo -n "Configuring network interfaces..."
       ifup -a
       ifup eth1
       echo "done."
       ;;
   stop)
       if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
         grep -q "^/ nfs$"; then
           echo "NOT deconfiguring network interfaces: / is an NFS mount"
       elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
         grep -q "^/ smbfs$"; then
           echo "NOT deconfiguring network interfaces: / is an SMB mount"
       elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
         grep -qE '^(nfs[1234]?|smbfs|ncp|ncpfs|coda|cifs)$'; then
           echo "NOT deconfiguring network interfaces: network shares still mo$
       else
           echo -n "Deconfiguring network interfaces..."
           ifdown -a --exclude=lo
           ifdown eth1 --exclude=lo
           echo "done."
       fi
       ;;
   force-reload|restart)
       doopt spoofprotect yes
       doopt syncookies no
       doopt ip_forward no
       echo -n "Reconfiguring network interfaces..."
       ifdown -a --exclude=lo
       ifdown eth1 --exclude=lo
       ifup -a
       ifup eth1
       echo "done."
       ;;
   *)
       echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"
       exit 1
       ;;
esac

exit 0

Test to see if its working

ifup eth1
dmesg | grep eth1

If you are using WEP you may still see

zd1211rw 1-1:1.0: eth1
ADDRCONF(NETDEV_UP): eth1: link is not ready

If this is the case you will need to do

iwconfig eth1 essid <YourNetworkName>

Do another

dmesg | grep eth1

Hopefully you should now see

zd1211rw 1-1:1.0: eth1
ADDRCONF(NETDEV_UP): eth1: link is not ready
ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

OK - Now you should be able to connect to your wireless dongle on the address you specified in /etc/network/interfaces under eth1 If that works restart

reboot

Once it boots try connecting to your wireless dongle on the address you specified in /etc/network/interfaces under eth1. Hopefully you get a connection

Things To Do

Currently I can't connect to the internet (apt-get etc...) whilst I have both wired ethernet port (eth0) and wireless (eth1) "up" You will need to do

ifdown eth0

and then everything should be good to go. Obviously this means that the ethernet port can't be used for anything else (must be able to fix this?)

Put that into the start script, but becareful that eth1 has a connection, else you'll be locked out? (My box just reverted to 2.4, and so couldn't connect)

Needs to be finished Bauldrick 20:50, 24 January 2007 (EST)