Page 1 of 5 123 ... LastLast
Results 1 to 10 of 48

Thread: How TO - Zydas ZD1211 on Edgy with WPA

  1. #1
    Join Date
    Apr 2005
    Location
    Sussex, UK
    Beans
    277
    Distro
    Ubuntu 12.04 Precise Pangolin

    How TO - Zydas ZD1211 on Edgy with WPA

    HOW TO: Zydas ZD1211 wireless with automatic WPA

    Aim
    This is the Edgy version of my previous guide. As before, I hope this helps you set up a WPA encrypted wireless network when using a ZD1211 based wireless card, such as the Safecom SWLU-5400 dongle. It comes in 3 parts:
    Part 1 – Installing the module
    Part 2 – Installing wpa supplicant


    User level
    Intermedidate. 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.

    Roadmap
    The kernel team are developing a kernel module for this card called ZD1211RW. Expected to be fully functional in 2.6.18, this should mean that these cards will work “out of the box” with the packaged wpa_supplicant. More details can be found at http://zd1211.ath.cx/

    Prerequisites
    You can navigate around the file system using the terminal
    You can copy and move files using the terminal
    You can edit files from the terminal.
    You can untar packages
    You can follow bad how to's
    All downloaded files are assumed to be in /usr/src.

    Part 1 – Installing the module

    1) With Edgy, the delivered wpasupplicant now works using the wext driver. However I couldn't get the built in zd1211rw module to work. To remove the module, open a terminal and type
    Code:
    sudo modprobe -r zd1211rw
    2)To stop the module from loading up on a reboot, blacklist this module by editing /etc/modprobe.d/blacklist and entering on a new line

    Code:
    blacklist zd1211rw
    3) The following may not be essential, but it's worth installing to ensure better success with this and any future projects you might do. In a terminal type:
    Code:
     sudo apt-get install build-essential kernel-package gcc libncurses5   libncurses5-dev libqt3-mt-dev wireless-tools libssl-dev
    4) Work out which version of the kernel you have by typing:
    Code:
    uname -r
    5) Obtain the correct headers and source for the kernel. In my case I'm running 2.6.17-10-generic, so I need to get:
    Code:
    sudo apt-get install linux-headers-2.6.17-10 linux-headers-2.6.17-10-386 linux-headers-2.6.17-10-generic linux-headers-386 linux-headers-generic linux-source

    6) Unpack the source and create a standard symbolic link.
    Code:
    cd /usr/src
    sudo tar -xvjf linux-source-2.6.17.tar.bz2
    sudo ln -s /usr/src/linux-headers-2.6.17-10 /usr/src/linux-headers
    sudo ln -s /usr/src/linux-source-2.6.17 /usr/src/linux
    7) Also make sure you have a link in /lib/modules/2.6.17-10-386/build pointing to /usr/src/linux-headers-2.6.17-10-386. This should be already present, but if not type:
    Code:
    sudo ln -s /usr/src/linux-headers-2.6.17-10-386 /lib/modules/2.6.17-10-386/build

    8.) In /usr/src, download a working version of the ZD1211 driver from http://zd1211.ath.cx/download/.
    There are multiple versions of the driver and you may need to experiment with different drivers to get one that works for your particular dongle and kernel. For me, the r77 worked.
    {Edit 5th Nov 2006. Have upgraded to r83 as this is more stable and doesn't fill my log. The instructions are identical for this package as well}

    9) In /usr/src, untar the source package you selected and edit the Makefile to have the following options:
    KERNEL_SOURCE=/usr/src/linux
    ZD1211REV_B=0 (set this to 1 if you have a ZD1211B)

    10) Compile the module by typing:
    Code:
    sudo make
    sudo make install
    11) Copy the resulting zd1211.ko by typing
    [code]
    use sudo cp /usr/src/zd1211-driver-r77/zd1211.ko /lib/modules/2.6.17-10-386/build/drivers/usb/net/
    [code]

    12) Install the module using
    Code:
    sudo depmod 
    sudo modprobe -v zd1211
    13) Now connect the dongle and type
    Code:
    dmesg
    You should see something like:
    Code:
    [17180336.828000] zd1211 - http://zd1211.ath.cx/ - r77
    [17180336.828000] Based on www.zydas.com.tw driver version 2.5.0.0
    [17180336.828000] usbcore: registered new driver zd1211
    If you get any error codes here, you will need to go back to 8.) and use another driver package.

    14) If you have an unsecured network, you should be able to start browsing. To check type:
    Code:
    sudo ifconfig
    to list all the active network connections
    Code:
    sudo iwconfig
    to list the status of your wireless connection.

    You may need to edit /etc/network/interfaces. To help I've pasted my file below

    Code:
    auto lo
    iface lo inet loopback
    
    #iface eth0 inet static
    #address 192.168.0.135
    #netmask 255.255.255.0
    #gateway 192.168.0.1
    
    auto wlan0
    iface wlan0 inet static
    pre-up wpa_supplicant -Bw -i wlan0 -c  /etc/wpa_supplicant.conf -D wext
    post-down killall -q wpa_supplicant
    address 192.168.0.134
    netmask 255.255.255.0
    gateway 192.168.0.1
    wireless-essid mySSID
    Note I use static addressing, not DHCP.

    If you go to SYSTEM-ADMINISTRATION-NETWORKING you can bring up the networking tool to manually disable your ethernet connection and set up wep encryption. I found keeping only the wireless or wired interface active made my system more stable.

    Note if you use a different kernel or recompile your kernel differently, you may well need to do this again. It's worth posting the driver package that worked for you and the kernel/system used.


    Part 2 – Setting up WPA encryption

    Unless you're comfortable with the world and their dog also using your wireless network, you should really put some encryption on it. WEP is trivial to do and trivial to break. Currently WPA/PSK is much more secure.

    Luckily, the Edgy version of WPA suplicant is compatable with the ZD1211 chipset. It does this by using the standard wireless extensions (wext) driver interface instead of the Zydas interface.


    1) Create /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
    	}
    where network id is your SSID, and encryption key is your router encryption password.

    2) Set up your AP to be encrypted, then test the supplicant by typing:
    Code:
    	
    sudo wpa_supplicant  -i wlan0 -c /etc/wpa_supplicant.conf -D wext -ddddd
    and reading the output on the terminal for any error messages. This took a few attempts with my keyboard becoming very slow as the connection was made. If your connection is dropped repeatedly, you may need a different driver.

    3) If you can connect OK, you can terminate the supplicant by typing CTRL+C, and set it in the background by typing into a terminal
    Code:
    sudo wpa_supplicant  -Bw -i wlan0 -c /etc/wpa_supplicant.conf -D zydas
    4) To have your wireless network come up automatically with wpasupplicant, edit /etc/network/interfaces to my version above.

    5) Then restart your network, type
    Code:
    sudo /etc/init.d/networking restart
    and hopefully wpa should now be working.........

    Hope this helps
    Last edited by shof2k; November 5th, 2006 at 12:57 PM.
    The Free Software war is won, all else is now maneuvering
    http://brainstorm.ubuntu.com/idea/27361/image/1/

  2. #2
    Join Date
    Oct 2005
    Location
    Southeast Asia
    Beans
    Hidden!
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: How TO - Zydas ZD1211 on Edgy with WPA

    Confirmed working on Edimax EW-7317Ug

    Thanks for the how-to! Something is odd about Step 11 that may be misleading to some users. I unpacked the r77 driver to my desktop, not in the /usr/src/ directory. And I use 2.6.17-10-generic, so I don't see the point in copying the zd1211.ko to the /lib/modules/2.6.17-10-386/build/drivers/usb/net/ directory. I never boot to that kernel, in fact it's not even an option in grub... anymore . or unless i'm misunderstanding why it should be copied to the /lib/modules/2.6.17-10-386/build/drivers/usb/net/ directory.

    Again, thank you for a great easy to read tutorial.
    Last edited by domino; November 2nd, 2006 at 08:21 AM. Reason: added dongle model

  3. #3
    Join Date
    Apr 2005
    Location
    Sussex, UK
    Beans
    277
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How TO - Zydas ZD1211 on Edgy with WPA

    I'll update step 8.) to say you should download the driver source to /usr/src.

    With regards to your second point, my installation of Edgy (beta) only had the 2.6.17-10-generic kernel. The reason I copy the module to /lib/modules/2.6.17-10-386/... is a hang up from my previous work on Hoary, Breezy, and Dapper. In theory, doing "make install" after compiling the module should copy it in, but I found I had to manually copy it over. This may well be something strange that I've been doing.

    Roll on 2.6.18, and I can simply plug n play
    The Free Software war is won, all else is now maneuvering
    http://brainstorm.ubuntu.com/idea/27361/image/1/

  4. #4
    Join Date
    Oct 2005
    Location
    Southeast Asia
    Beans
    Hidden!
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: How TO - Zydas ZD1211 on Edgy with WPA

    gotcha shof2k and thanks for the explanation. I can't give feedback on wpa because i use MAC filtering. but your tutorial works for open system though. Much easier than when i first originally got this edimax to work properly.
    Last edited by domino; November 2nd, 2006 at 08:18 AM.

  5. #5
    Join Date
    Apr 2005
    Location
    Sussex, UK
    Beans
    277
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How TO - Zydas ZD1211 on Edgy with WPA

    No problems. Be warned though just using MAC filtering really isn't secure these days. You can spoof a MAC address via arp poisoning, allowing an attacker to become a 'man in the middle' when your on the network. If you need anymore information, I could find a link to a site that explains it better than I can.
    The Free Software war is won, all else is now maneuvering
    http://brainstorm.ubuntu.com/idea/27361/image/1/

  6. #6
    Join Date
    Oct 2005
    Location
    Southeast Asia
    Beans
    Hidden!
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: How TO - Zydas ZD1211 on Edgy with WPA

    It wasn't too hard to find it in *the* google , so that wont be nessessary. Thanks for offering though.

  7. #7
    Join Date
    Oct 2005
    Location
    Southeast Asia
    Beans
    Hidden!
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: How TO - Zydas ZD1211 on Edgy with WPA

    sho2k,
    Have you tried these drivers before?

    http://www.atheros.com/RD/ZyDAS/web_...211_USB/Linux/

  8. #8
    Join Date
    May 2005
    Location
    Wellington, NZ
    Beans
    61

    Re: How TO - Zydas ZD1211 on Edgy with WPA

    Great How-To. Thanks!
    Last edited by gb5757870; November 5th, 2006 at 11:13 AM. Reason: Fou

  9. #9
    Join Date
    May 2005
    Location
    Wellington, NZ
    Beans
    61

    Re: How TO - Zydas ZD1211 on Edgy with WPA

    Mmm, after creating the wpa_supplicant.conf (and populating with my network details), activating the encryption and running:
    sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -D wext -ddddd

    I get the following (blumberg is my network key):

    Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
    Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
    Reading configuration file '/etc/wpa_supplicant.conf'
    Line: 1 - start of a new network block
    Line 2: unknown network field 'ssid '.
    Line 3: unknown network field 'scan_ssid '.
    pairwise: 0x8
    Line 5: Invalid PSK '******'.
    Line 5: failed to parse psk '*******'.
    key_mgmt: 0x2
    proto: 0x1
    Line 8: WPA-PSK accepted for key management, but no PSK configured.
    Line 8: removed CCMP from group cipher list since it was not allowed for pairwise cipher
    Line 8: failed to parse network block.
    Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
    Failed to add interface wlan0
    Cancelling scan request
    Last edited by gb5757870; November 5th, 2006 at 09:44 PM.

  10. #10
    Join Date
    Apr 2005
    Location
    Sussex, UK
    Beans
    277
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How TO - Zydas ZD1211 on Edgy with WPA

    Could you paste a copy of /etc/wpa_supplicant.conf? You should asterisk the PSK out as that isn't too important for debugging and giving away your PSK is the same as having no encryption.
    The Free Software war is won, all else is now maneuvering
    http://brainstorm.ubuntu.com/idea/27361/image/1/

Page 1 of 5 123 ... LastLast

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
  •