Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I'm trying to get my D-Link DWL-520 (pci with atheros chipset) wireless card to work. I am using madwifi and i got that working after some minor headachs (but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie jpalfree's Avatar
    Join Date
    Jul 2005
    Location
    Montreal, CA
    Posts
    198

    Unhappy wireless migranes with wpa and wep...help? (SOLVED)


    Hi,

    I'm trying to get my D-Link DWL-520 (pci with atheros chipset) wireless card to work. I am using madwifi and i got that working after some minor headachs (but i don't know exactly how).

    My problem is that i want some kind of encryption on my router. WPA would be best, but i'd settle with WEP. I tried both, and neither work. I think it's something really really simple that I am missing.

    i've tried using both wpa_supplicant and iwconfig, neither are being nice to me.

    One MAJOR inconsistancy is while using wpa_supplicant, all of the "how to"s i've read have said put:
    wpa_supplicant_ath0="-Dmadwifi"
    .
    but this is the output i get from gentoo when i try that:
    Code:
    # /etc/init.d/net.ath0 start
     * Caching service dependencies ...                                       [ ok ]
     * Starting ath0
     *   Starting wpa_supplicant on ath0 ...
    Unsupported driver 'madwifi'.		     				  [ !! ]
    seems to me like that is a major clue as to what my problem is..but i don't know the solution!

    I tried to use WEP with iwconfig but i got this output:
    Code:
    # /etc/init.d/net.ath0 start
     * Caching service dependencies ...                                       [ ok ]
     * Starting ath0
     *   Configuring wireless network for ath0
     *   Trying to force preferred in case they are hidden
     *   Failed to associate with any preferred access points on ath0
     *   Failed to configure wireless for ath0                                [ !! ]

    here is my /etc/wpa_supplicant.conf:
    ctrl_interface=/var/run/wpa_supplicant
    # Ensure that only root can read the WPA configuration
    ctrl_interface_group=0
    # Let wpa_supplicant take care of scanning and AP selection ap_scan=1

    # Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers
    network={
    ssid="simple"
    psk="MYHEXCODE"
    priority=5
    }
    # Same as previous, but request SSID-specific scanning (for APs that reject # broadcast SSID)
    network={
    ssid="MYSSID"
    scan_ssid=1
    psk="MYHEXCODE"
    priority=5
    }
    # Only WPA-PSK is used. Any valid cipher combination is accepted network={
    ssid="MYSSID"
    proto=WPA
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP WEP104 WEP40
    psk=06b4be19da289f475aa46a33cb793029d4ab3db7a23ee9 2382eb0106c72ac7bb
    priority=2
    }
    here is my /etc/conf.d/net:
    #when using wpa_supplicant...
    modules=( "wpa_supplicant" )
    wpa_supplicant_ath0="-Dmadwifi"
    #...
    #when using iwconfig
    modules=( "iwconfig" )
    essid_ath0="any"
    key_MYSSID="[1] MYHEXCODE key [1] enc open"
    preferred_aps=( "MYSSID" )
    Any ideas no matter how vague would be really appreciated. Maybe someone could post one of their wpa_supplicant.conf or /etc/conf.d/net files to help me learn by example?
    Thanks
    Avatar from xkcd.com, a hilarious computer related webcomic.

  2. #2
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    Ok here goes, my wpa_supplicant and conf.d/net:
    Quote Originally Posted by /etc/conf.d/net
    modules=( "wpa_supplicant" )
    wpa_supplicant_wlan0="-Dndiswrapper"
    config_wlan0=( "192.168.0.5" )
    routes_wlan0=( "default gw 192.168.0.1" )
    channel_wlan0="9"
    mode_wlan0="manged"
    Quote Originally Posted by /etc/wpa_supplicant.conf
    ctrl_interface=/var/run/wpa_supplicant
    ctrl_interface_group=0
    network={
    ssid="my_ssid"
    mode=0
    proto=WPA
    key_mgmt=WPA-PSK
    psk="my_wpa_passphrase"
    priority=5
    }
    I saw on gentoo forums, that some people have problems trying to run madwifi + wpa on the 2.6.15 kernels, I don't know if that issue has been fixed or anything. Also, I find that working with hidden ssid's and linux can be a pain in the ass, so for testing, just enable ssid broadcast.

    The above files work perfectly for me, have no problems with them.

    Hope the above help somewhat.
    Life is complex, it has a real part and an imaginary part.

  3. #3
    Linux Newbie jpalfree's Avatar
    Join Date
    Jul 2005
    Location
    Montreal, CA
    Posts
    198
    thanks for the quick reply, AlexK.

    I hope it's not the kernel... I am, in fact, using the 2.6.15-gentoo-r7 kernel.

    One question though. In your /etc/wpa_supplicant.conf, the line:
    psk="my_wpa_passphrase"
    is that actually psk="s:your_passphrase"?
    and what would i do if i had spaces in my passphrase? is it ok to put something like psk="s:'this is my passphrase'"?
    Avatar from xkcd.com, a hilarious computer related webcomic.

  4. #4
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    yes, the wpa key is in string format, just no s: infront of it. I think if there are spaces inside your key, then having it like so psk="xxxx xxxx yyyy" should be fine. Note, I haven't tried this though as my keys don't use spaces in them.
    Life is complex, it has a real part and an imaginary part.

  5. #5
    Linux Newbie jpalfree's Avatar
    Join Date
    Jul 2005
    Location
    Montreal, CA
    Posts
    198
    SUCCESS!

    thanks for the help AlexK! It ended up being something really simple. I forgot to add the "madwifi" use flag to /etc/make.conf so wpa_supplicant compiled without madwifi support... ooy. I checked the file: /usr/portage/profiles/use.desc and it didn't have madwifi listed there... so i thought it was ok.

    Is there a more extensive list of use flags?

    Anyways. For anyone else who had this problem:
    this is a good resource: Gentoo wiki: HOWTO Wireless Configuration and Startup

    this is my /etc/wpa_supplicant.conf:
    # The below line not be changed otherwise we refuse to work
    ctrl_interface=/var/run/wpa_supplicant

    # Ensure that only root can read the WPA configuration
    ctrl_interface_group=0

    # Let wpa_supplicant take care of scanning and AP selection
    ap_scan=1

    # Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers
    network={
    ssid="MYSSID"
    mode=0
    proto=WPA
    key_mgmt=WPA-PSK
    psk="MYPASSPHRASE_NO_SPACES"
    # The higher the priority the sooner we are matched
    priority=5
    }

    # For WPA-PSK with TKIP
    network={
    ssid="MYSSID"
    key_mgmt=WPA-PSK
    proto=WPA
    pairwise=TKIP
    group=TKIP
    psk="MYPASSPHRASE_NO_SPACES"
    }
    I think the two settings are synonymous but it works and i'm not going to change it to find out.

    here is my /etc/conf.d/net:
    config_ath0=( "dhcp" )

    # Prefer wpa_supplicant over wireless-tools
    modules=( "wpa_supplicant" )

    # It's important that we tell wpa_supplicant which driver we should
    # be using as it's not very good at guessing yet
    wpa_supplicant_ath0="-Dmadwifi"
    and remember to add "madwifi" to your useflags in /etc/make.conf
    Avatar from xkcd.com, a hilarious computer related webcomic.

  6. #6
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    Quote Originally Posted by jpalfree
    Is there a more extensive list of use flags?
    Is this list good enough? or what about this one

    Glad to hear you got everything working now. Congragulations.
    Life is complex, it has a real part and an imaginary part.

  7. #7
    Linux Newbie jpalfree's Avatar
    Join Date
    Jul 2005
    Location
    Montreal, CA
    Posts
    198
    they are good lists. It's nice to have little explinations but, neither has madwifi as one of the use flags. Odd. Oh well, that's what the forums are for
    Avatar from xkcd.com, a hilarious computer related webcomic.

Posting Permissions

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