Results 1 to 10 of 64

Thread: HOW TO: Zydas ZD1211 wireless with WPA

Threaded View

  1. #1
    Join Date
    Apr 2005
    Location
    Sussex, UK
    Beans
    277
    Distro
    Ubuntu 12.04 Precise Pangolin
    HOW TO: Zydas ZD1211 wireless with automatic WPA

    [Edit] I've included the versions of the packages used and cleared the text up. [/Edit]

    Aim
    I hope this helps you set up a WPA encrypted wireless network when using a ZD1211 based wireless card, such as Safecom SWLU-5400 dongle.
    Thanks to ubuntu user dom for pointing me in the right direction

    User level
    Intermediate. This isn't meant to be a simple list of commands to type in to a terminal because networking has too many options for any one script to cover. You may need to tweak some of the commands or files to your own system settings.

    Pre-requisites
    You have a 2.6.12-9 kernel. If you managed to get this working on another kernel type, then post your details.
    You can navigate around the file system using the terminal
    Can copy / move files using the terminal
    Can untar packages
    Can follow bad how to's

    How To Part 1 - preparation
    You will need the ZD1211 kernel module and wpa supplicant. Unfortunately, the versions supplied by ubuntu don't work, so we have to remove them first. Using synaptic or using a terminal and typing:
    Code:
    sudo modprobe -r zd1211
    Code:
    sudo apt-get remove wpasupplicant
    The following may not be essential, but it's worth doing to ensure better success with other programs.
    Code:
            sudo apt-get install linux-tree
    	sudo apt-get update
    	sudo apt-get install build-essential
    	sudo apt-get install kernel-package
    	sudo apt-get install gcc
    	sudo apt-get install libncurses5
    	sudo apt-get install libncurses5-dev
    	sudo apt-get install libqt3-mt-dev
    	sudo apt-get install wireless-tools
    Unpack the linux source and create a standard symbolic link
    Code:
            cd /usr/src
    	sudo tar --bzip2 -xvf linux-2.6.12.tar.bz2
    	sudo ln -s /usr/src/linux-2.6.12 /usr/src/linux
    Create standard symbolic link for the linux headers.
    Code:
    sudo ln -s /usr/src/linux-headers-2.6....  /usr/src/linux-headers

    Download the source to openssl from http://www.openssl.org/source/ and unpackage it /usr/src/openssl. I've used version 0.96m.

    Download the latest zd1211 driver source from http://zd1211.ath.cx/download and unpackage it to /usr/src/zd1211src. I used version r38.

    If you're having difficulty compiling these, there is an alternative source archive from http://www.zydas.com.tw/downloads/download-1211.asp. I've never got these to work, but it might help you.

    Download the latest wpa supplicant source from
    http://hostap.epitest.fi/wpa_supplicant
    I used version 0.39.

    Unpackage it to /usr/src/wpasupplicant. Inside the source folder, create a symbolic link called openssl pointing to /usr/src/openssl/include.
    Code:
       sudo ln -s /usr/src/openssl/include /usr/src/wpasupplicant/openssl

    Go into the zd1211 source type
    Code:
     sudo gedit Makefile
    Make sure that the lines
    KERN_26=y
    KERNEL_SOURCE=/usr/src/linux
    are present. If not comment out the current values and replace with the above.

    Compile the zd1211 module.
    Code:
            sudo make
    	sudo make install
    Copy the resulting zd1211.ko to /lib/modules/...../net

    Install the module
    Code:
    sudo modprobe -v zd1211
    Attatch the dongle, dmesg should show the following
    Code:
    [4294699.485000]  _____     ____    _    ____
    [4294699.485000] |__  /   _|  _ \  / \  / ___|
    [4294699.485000]   / / | | | | | |/ _ \ \___ \
    [4294699.485000]  / /| |_| | |_| / ___ \ ___) |
    [4294699.485000] /____\__, |____/_/   \_\____/
    [4294699.485000]      |___/
    [4294699.485000] zd1211 - version 2.0.0.0
    Note the version number and format may change. What you don't want are any sort of error messages as this indicates something is wrong.


    How To Part 2 - Connecting to an open network

    If your access point is unencrypted, you should now be able to connect to it. You can use the iwconfig wireless tools to specify your accessid etc. If you're having problems connecting, try the following articles:
    http://www.ubuntuforums.org/showthread.php?t=92142
    http://www.ubuntuforums.org/showthread.php?t=86389

    To see if your module is active type the following
    Code:
     ifconfig
    will give a list of all network connections.
    Code:
     iwconfig
    will give a similar list for all wireless connections. You should see something like this:
    Code:
    wlan0     802.11b/g NIC  ESSID:"youressid"
              Mode:Managed  Frequency=2.462 GHz  Access Point: your-access-point
              Bit Rate:54 Mb/s
              Retry:off   RTS thr=2432 B   Fragment thr:off
              Power Management:off
              Link Quality=80/92  Signal level=30/154  Noise level=161/154
              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
              Tx excessive retries:11601  Invalid misc:0   Missed beacon:0
    Code:
     iwlist scanning
    will search out the wireless networks available. If you can see your network here then the module is working.

    How To Part 3 - Connecting to an encrypted network

    I don't recommend using a wireless network without some sort of encryption. If you want WEP encryption, use the gnome networking tool (system-administration-networking) and specify a WEP key.

    If you want WPA encryption (stronger than WEP), then compile wpa supplicant.
    Code:
            sudo cp /usr/src/wpasupplicant
    	sudo make
    Set up /etc/wpa_supplicant.conf, changing the values in italics
    Code:
    network={
            ssid="network id"
            scan_ssid=1
            pairwise=TKIP
            psk="encryption key"
            key_mgmt=WPA-PSK
            proto=WPA
    }
    Connect your dongle and type the following to activate the wireless network
    Code:
    sudo ifconfig eth0 down
    to shut down your ethernet connection
    Code:
    sudo ifconfig wlan0 up
    to start your wireless connection
    Code:
    cd /usr/src/wpasupplicant
    	sudo ./wpa_supplicant -Bw -i wlan0 -c /etc/wpa_supplicant.conf -D zydas
    After a few moments, use ifconfig to see if you have connected to your access point. If not, check dmesg and the system logs for error messages.

    Once you're happy that you can use the connection, the final step is to automate the process. Backup and edit /etc/network/interfaces and add the following code

    Code:
    pre-up /usr/src/wpasupplicant/wpa_supplicant -Bw -i wlan0 -c/etc/wpa_supplicant.conf -D zydas
    
    post-down killall -q wpa_supplicant
    To restart your network:
    Code:
     sudo /etc/init.d/networking restart
    and hopefully wpa should now be working..........

    Hope this helps
    Last edited by shof2k; February 8th, 2006 at 09:31 PM. Reason: General improvements. I've also included the version of each package that I used.
    The Free Software war is won, all else is now maneuvering
    http://brainstorm.ubuntu.com/idea/27361/image/1/

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •