Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
WPA Madwifi Hell - I can't be the only one!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Fri Feb 24, 2006 4:48 am    Post subject: WPA Madwifi Hell - I can't be the only one! Reply with quote

I know I am not the only one going through this hell! With the current config, the adapter does not start automatically.
I have been able to get ath0 to connect to the network, but only manually, by following these steps:

    1. /sbin/wlanconfig ath0 create wlandev wifi0 wlanmode sta
    2. wpa_supplicant -Dmadwifi -iath0 -c /etc/wpa_supplicant.conf -dd
    3. ifconfig ath0 192.168.10.5 netmask 255.255.255.0
    4. route add default gw 192.168.10.1


I know that at this point, I need to be close, but I am missing something. I have spent so much time going through these config files that I am sure it's something really simple I overlooked.

Any assistance would be greatly appreciated!

wpa_supplicant-0.5.1
madwifi_driver-0.1443.20060207
madwifi_tools-0.1443.20060207
sys-apps/baselayout-1.11.14-r5

/etc/conf.d/net
Code:
/sbin/wlanconfig ath0 create wlandev wifi0 wlanmode sta
wpa_supplicant -Dmadwifi -iath0 -c /etc/wpa_supplicant.conf -dd
ifconfig ath0 192.168.10.5 netmask 255.255.255.0
route add default gw 192.168.10.1
]ifconfig_ath0=("192.168.10.5 netmask 255.255.255.0")
routes_ath0=("default via 192.168.0.1")
modules=( "wpa_supplicant" )
wpa_supplicant_ath0="-Dmadwifi" # For Atheros based cards
wpa_timeout_ath0=10
config_ESSID=( "Mapuche" )
preup() {
        if [ "${IFACE}" = "ath0" ]; then
                /sbin/wlanconfig ath0 create wlandev wifi0 wlanmode sta
        return $?
        fi
}
postdown() {
        if [ "${IFACE}" = "ath0" ]; then
                killall wpa_supplicant
                /sbin/wlanconfig ath0 destroy
                return $?
        fi
}




/etc/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
fast_reauth=1
ap_scan=1
network={
        ssid="Mapuche"
        scan_ssid=1
        proto=WPA
        key_mgmt=WPA-PSK
        psk="D75B4BC374CC1B51F11F1B4D80"
}


Last edited by msalerno on Fri Feb 24, 2006 5:09 am; edited 2 times in total
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2091
Location: San Jose, CA

PostPosted: Fri Feb 24, 2006 5:02 am    Post subject: Re: WPA Madwifi Hell - I can't be the only one! Reply with quote

You're lucky your trying now, for a while (about four to five months) last year there was no way to get it to work without using old versions of stuff.

I am running, here's what I'm using:

Code:
*  sys-apps/baselayout
      Latest version available: 1.12.0_pre16-r1
      Latest version installed: 1.12.0_pre16-r1

*  net-wireless/wpa_supplicant
      Latest version available: 0.5.1
      Latest version installed: 0.5.1
 
*  net-wireless/madwifi-driver
      Latest version available: 0.1443.20060207
      Latest version installed: 0.1443.20060207

*  net-wireless/madwifi-tools
      Latest version available: 0.1443.20060207
      Latest version installed: 0.1443.20060207


Please note: to get these you have to add this to your /etc/portage/package.keywords:

Code:
sys-apps/baselayout ~x86
net-wireless/madwifi-driver ~x86
net-wireless/madwifi-tools ~x86
net-wireless/wpa_supplicant ~x86


There is one small problem I just figured out.

net.eth0 starts, even if you have removed it from startup with rc-update del net.eth0.

If you're like me and don't have your ethernet connected at some point you will not be able to connect to the internet (even though local lan works, looks like DNS fails).

However you can get it back by typing: /etc/init.d/net.eth0 stop

Strange...

Good luck, feel free to ask more questions.

Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Fri Feb 24, 2006 5:13 am    Post subject: Reply with quote

I used to have it all working, but I upgraded then I downgraded and went back and forth a few times, then the ebuild for wpa_supplicant-0.4.5 was removed, and I saw that madwifi was supported by the new wpa client, so I wanted to try it. I am just looking for some help with the configuration. I would imagine (purposely don't use assume :wink: ), that if I can get it working by using the existing wpa_supplicant configuration from the command line, I must have something screwed up in my /etc/conf.d/net file.
Back to top
View user's profile Send private message
Pandor
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2005
Posts: 128
Location: Belgium

PostPosted: Sat Feb 25, 2006 11:07 am    Post subject: Reply with quote

msalerno wrote:
...I must have something screwed up in my /etc/conf.d/net file.

pre up and post down, are no longer needed in your net script.
prior to version 1407, you had to manually create the device. (you could use the preup and postdown, or an udev rule).
But now the driver itself creates it by default.

see http://madwifi.org/wiki/UserDocs/autocreate
and Bug #121913 .
Back to top
View user's profile Send private message
MadScientist
n00b
n00b


Joined: 11 Apr 2003
Posts: 62

PostPosted: Sat Feb 25, 2006 5:36 pm    Post subject: Re: WPA Madwifi Hell - I can't be the only one! Reply with quote

msalerno wrote:
Code:
psk="D75B4BC374CC1B51F11F1B4D80"

Assuming you changed this since posting it - it is your password to get on the network...
Back to top
View user's profile Send private message
Pandor
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2005
Posts: 128
Location: Belgium

PostPosted: Sun Feb 26, 2006 10:35 am    Post subject: Re: WPA Madwifi Hell - I can't be the only one! Reply with quote

MadScientist wrote:
msalerno wrote:
Code:
psk="xxxxxxxxx"

Assuming you changed this since posting it - it is your password to get on the network...

And quoting it again is a good thing.
You'dd better wacht out now, you gonna get some leechers camping at your door :roll:

btw, *the above was meant sarcastic*... :wink:
Back to top
View user's profile Send private message
TenPin
Guru
Guru


Joined: 26 Aug 2002
Posts: 500
Location: Kansas City

PostPosted: Sun Feb 26, 2006 3:46 pm    Post subject: Reply with quote

I'm using the same versions as you.

wpa_supplicant-0.5.1, madwifi-driver-0.1443.20060207, wireless-tools-28_pre10, latest baselayout

The trick for me to getting it working was simply to set wpa_timeout_ath0=90 in /etc/conf.d/net

For some reason the new driver takes about twice as long as the old driver to connect to my access point.

Here is my wpa_supplicant.conf, I'm using WPA-PSK with AES.

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=1
ap_scan=1
fast_reauth=1

network={
ssid="wander"
psk=2338f3dc97d2a573cuahsdkfuh7hihqi3h7777739e3f8a81b79eff550b259f46a9cf2
priority=1
scan_ssid=1
}
_________________
For since in the wisdom of God the world by its wisdom did not know God, God was pleased to save those who believe by the foolishness of preaching.
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Tue Feb 28, 2006 10:39 pm    Post subject: Reply with quote

Awesome! I am in the process of getting married this week, so I'll put it in place next week!
Back to top
View user's profile Send private message
LimeFrog
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 187
Location: Skövde, Sweden

PostPosted: Wed Mar 01, 2006 8:33 am    Post subject: Reply with quote

Yay, i finally got my wireless WPA-PSK network running by adding this line to wpa_supplicant.conf.
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
    ssid="Valhalla"
    ---> bssid=00:00:00:00:00:00 <---
    proto=WPA
    key_mgmt=WPA-PSK
    pairwise=TKIP
    group=TKIP
    psk="password"
}

Set the bssid to your AP's MAC-adress.
I hope that it helps, it did for me atleast. :D
_________________
I don't believe in God, but I'm afraid of him!
Back to top
View user's profile Send private message
plonka2000
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 160
Location: UK, Surrey

PostPosted: Wed Mar 01, 2006 12:16 pm    Post subject: Reply with quote

Hi,
Can someone advise a method to configure wpa_supplicant to connect to a unsecured network?
My network at the moment is technically unsecured but is hardware MAC filtered.

When I try and connect, I get errors.

I basically just want it to connect to a specific ssid without any encryption.

This is my current /etc/wpa_supplicant.conf:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
   ssid="wireless1"
   scan_ssid=1
   key_mgmt=IEEE8021X
   eap=TLS
   identity="user@example.com"
   ca_cert="/etc/cert/ca.pem"
   client_cert="/etc/cert/user.pem"
   private_key="/etc/cert/user.prv"
   private_key_passwd="password"
   eapol_flags=3
}

_________________
-Do not be afraid of what is different.
-Do not be afraid of being different.
-After all, ignorance is not an excuse.

Using Gentoo and Windows XPee.

Check my site here
Back to top
View user's profile Send private message
LimeFrog
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 187
Location: Skövde, Sweden

PostPosted: Wed Mar 01, 2006 1:38 pm    Post subject: Reply with quote

Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
    ssid="your network"
    key_mgmt=NONE
}

Something like this? :)
_________________
I don't believe in God, but I'm afraid of him!
Back to top
View user's profile Send private message
plonka2000
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 160
Location: UK, Surrey

PostPosted: Wed Mar 01, 2006 4:05 pm    Post subject: Reply with quote

LimeFrog wrote:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
    ssid="your network"
    key_mgmt=NONE
}

Something like this? :)


Hi and thanks for the reply.
I have done that after piecing together lots of info from forums and the official wpa_supplicant readme.

Its got to the point that I've already started my own thread about it https://forums.gentoo.org/viewtopic-t-438895.html. Its been an ongoing issue for nearly a week now.

The connection just seems to 'loop'. :(
_________________
-Do not be afraid of what is different.
-Do not be afraid of being different.
-After all, ignorance is not an excuse.

Using Gentoo and Windows XPee.

Check my site here
Back to top
View user's profile Send private message
LimeFrog
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 187
Location: Skövde, Sweden

PostPosted: Wed Mar 01, 2006 4:29 pm    Post subject: Reply with quote

Gah, it looks like i spoke to soon. I'm still having problems getting my connection up.
But it goes up after some restarts of ath0, though wpa_supplicant says the process fails. So all i have to write is "ifconfig ath0 192.168.0.3/24" and it works.
Ideas anyone? :roll:
_________________
I don't believe in God, but I'm afraid of him!
Back to top
View user's profile Send private message
sundialsvc4
Guru
Guru


Joined: 10 Nov 2005
Posts: 436

PostPosted: Wed Mar 01, 2006 6:06 pm    Post subject: Reply with quote

msalerno wrote:
Awesome! I am in the process of getting married this week, so I'll put it in place next week!

:D Congratulations! :D
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2091
Location: San Jose, CA

PostPosted: Thu Mar 02, 2006 1:33 am    Post subject: Reply with quote

LimeFrog wrote:
Gah, it looks like i spoke to soon. I'm still having problems getting my connection up.
But it goes up after some restarts of ath0, though wpa_supplicant says the process fails. So all i have to write is "ifconfig ath0 192.168.0.3/24" and it works.
Ideas anyone? :roll:


Are you running ifplugd or netplug?

It helps keep my eth0 (which is unplugged) from screwing up my DNS.

Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
LimeFrog
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 187
Location: Skövde, Sweden

PostPosted: Thu Mar 02, 2006 5:51 am    Post subject: Reply with quote

No but net.eth0 never starts up, atleast that's what "ifconfig -a" tells me. :)
_________________
I don't believe in God, but I'm afraid of him!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum