View previous topic :: View next topic |
Author |
Message |
trilexx Apprentice
Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Mon Jan 23, 2006 7:38 am Post subject: [SOLVED!] madiwfi startup |
|
|
good morning,
I have read several posts about recent problems using madwifi, especially in combination with wpa_supplicant. however, I could get a stable connection using the madwifi drivers and wpa_supplicant, but I dunno how to automate the startup process.
what I need to do to get a connection is:
create wifi0
Code: | wlanconfig ath0 create wlandev wifi0 wlanmode sta |
up ath0
start supplicant
Code: | wpa_supplicant -c /etc/wpa_supplicant.conf -Dmadwifi -iath0 |
get ip adress
voila, here we go. it works fine. my questions now is, is there a way to automate this process or do I need to write my own init script? since there is no net.ath0 I dunno what to do. linking ath0 to net.lo or net.eth0 does not work. it tries to start ath0 but cannot associate with any access points.
but since it works the hard way, I'm pretty sure /etc/conf.d/net and wpa_supplicant.conf are right.
thanks in advance
trilexx _________________ if it lives, compile it
Last edited by trilexx on Tue Jan 24, 2006 7:46 am; edited 1 time in total |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2326 Location: Bretagne
|
Posted: Mon Jan 23, 2006 8:17 am Post subject: |
|
|
Hi!
First of all, if you want ath0 to be created on each startup, you'll need to emerge udev-081 or 081-r1.
Then in /etc/conf.d/net, you need to have this:
Code: | modules=( "wpa_supplicant" )
wpa_supplicant_eth0="-Dmadwifi"
config_ath0=( "dhcp" ) |
And now :
Code: | # ln -s /etc/init.d/net.lo /etc/init.d/net.ath0
# rc-update add net.ath0 start |
This should be enough.
Have fun! |
|
Back to top |
|
|
trilexx Apprentice
Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Mon Jan 23, 2006 8:48 am Post subject: |
|
|
Quote: | wpa_supplicant_eth0="-Dmadwifi" |
I have a correct wpa_supplicant.conf with the settings you mentioned, but are you sure I have to specify eth0 here?
I am not sure about udev though, this is a newly setup system. I thought udev is installed anyway on new gentoo systems.
thanks for your reply,
trilexx _________________ if it lives, compile it |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2326 Location: Bretagne
|
Posted: Mon Jan 23, 2006 9:00 am Post subject: |
|
|
trilexx wrote: | Quote: | wpa_supplicant_eth0="-Dmadwifi" | I have a correct wpa_supplicant.conf with the settings you mentioned, but are you sure I have to specify eth0 here? |
My mistake, sorry about this. This is:
Code: | wpa_supplicant_ath0="-Dmadwifi" |
But I didn't mention anything about /etc/wpa_supplicant.conf. The settings I told you about are for: /etc/conf.d/net .
If you think it's weird, just parse /etc/conf.d/net.example, it helps a lot.
trilexx wrote: | I am not sure about udev though, this is a newly setup system. I thought udev is installed anyway on new gentoo systems. |
Yes, you're right, udev is always installed with the gentoo base system (on newer versions at least). The thing is madwifi-tools package writes a udev rule (/etc/udev/rules.d/65-madwifi.rules) that's meant to create ath0 iface on each startup. AND this rule doesn't work with versions of udev prior to 081.
So:
Code: | # echo "sys-fs/udev ~x86" >> /etc/portage/package.keywords
# emerge -u udev |
trilexx wrote: | thanks for your reply,
trilexx |
You're welcome! |
|
Back to top |
|
|
trilexx Apprentice
Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Mon Jan 23, 2006 9:18 am Post subject: |
|
|
Quote: | But I didn't mention anything about /etc/wpa_supplicant.conf. The settings I told you about are for: /etc/conf.d/net. |
Sorry, my mistake. I meant to write /etc/conf.d/net. The files are fine and contain what you listed above.
Quote: | ...AND this rule doesn't work with versions of udev prior to 081.
So:
Code: | # echo "sys-fs/udev ~x86" >> /etc/portage/package.keywords
# emerge -u udev |
|
that's it! I will try it as soon as I am at home. thanks, mate
greetings from austria _________________ if it lives, compile it |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2326 Location: Bretagne
|
Posted: Mon Jan 23, 2006 9:23 am Post subject: |
|
|
trilexx wrote: | that's it! I will try it as soon as I am at home. thanks, mate
greetings from austria |
Ok! Let us know then!
And.....french kisses from Paris! (just playin' mate! ) |
|
Back to top |
|
|
trilexx Apprentice
Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Mon Jan 23, 2006 6:51 pm Post subject: |
|
|
hmm...
this leads to:
Code: | *Couldn't find any access points on ath0
*Failed to configure wireless for ath0 |
the net and wpa_supplicant.conf must be right, as I can connect manually. whats wrong now? _________________ if it lives, compile it |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2326 Location: Bretagne
|
Posted: Mon Jan 23, 2006 6:58 pm Post subject: |
|
|
trilexx wrote: | the net and wpa_supplicant.conf must be right, as I can connect manually. whats wrong now? |
Please post them, and /etc/conf.d/wireless also (Though I'm not sure it's needed when using wpa_supplicant)
How did you start your card? /etc/init.d/net.ath0 start ? Can you give the full output you get from it?
thx! |
|
Back to top |
|
|
trilexx Apprentice
Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Mon Jan 23, 2006 7:24 pm Post subject: |
|
|
output:
Code: | * Starting ath0
* Configuring wireless network for ath0
* no access points found
* Couldn't find any access points on ath0
* Failed to configure wireless for ath0 [ !! ] |
my net:
Code: | preferred_aps=( "cloudcity" )
associate_order="preferredonly"
wpa_supplicant_ath0="-Dmadwifi"
wpa_timeout_ath0=10
dhcpcd_ath0="-t 5"
config_ath0=( "dhcp" )
dhcpcd_ath0="-t 5" |
wpa_supplicant.conf:
Code: |
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
#WPA-PSK
network={
ssid="cloudcity"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk=" *** "
priority=5
} |
my wirless.conf is empty. I ran etc-update after upgrading udev. _________________ if it lives, compile it |
|
Back to top |
|
|
optiactive Tux's lil' helper
Joined: 08 May 2004 Posts: 92
|
Posted: Mon Jan 23, 2006 7:39 pm Post subject: |
|
|
You need to specify to use wpa_supplicant in your /etc/conf.d/net file:
Code: | modules=( "wpa_supplicant" ) <--------------- Add this line
preferred_aps=( "cloudcity" )
associate_order="preferredonly"
wpa_supplicant_ath0="-Dmadwifi"
wpa_timeout_ath0=10
dhcpcd_ath0="-t 5" <------------------- Also, you can remove this line, as you have a duplicate below
config_ath0=( "dhcp" )
dhcpcd_ath0="-t 5"
|
Check out the wireless networking guide, if you haven't already. |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2326 Location: Bretagne
|
Posted: Mon Jan 23, 2006 7:39 pm Post subject: |
|
|
You forgot to comment this out in /etc/conf.d/net:
Code: | #modules=( "wpa_supplicant" ) |
If it's not commented out the scripts try to use wireless-tools instead and /etc/conf.d/wireless, which is empty. That's why it can't configure your network.
Not sure but I think you should also increase the dhcpcd_ath0 value as wpa is quite long to associate.
Let me know. |
|
Back to top |
|
|
trilexx Apprentice
Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Mon Jan 23, 2006 7:45 pm Post subject: |
|
|
omg, what a mistake!
will try this now. *crossfingers* _________________ if it lives, compile it |
|
Back to top |
|
|
trilexx Apprentice
Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Mon Jan 23, 2006 7:48 pm Post subject: |
|
|
ok, tried this.
its trying to connect, but times out. both the dhcp and wpa timeout values have been increased. _________________ if it lives, compile it |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2326 Location: Bretagne
|
Posted: Mon Jan 23, 2006 7:57 pm Post subject: |
|
|
trilexx wrote: | ok, tried this.
its trying to connect, but times out. both the dhcp and wpa timeout values have been increased. |
Which values exactly?
Double-check you PSK and try:
ap_scan=1
Give us again the output of /etc/init.d/net.ath0 please! |
|
Back to top |
|
|
optiactive Tux's lil' helper
Joined: 08 May 2004 Posts: 92
|
Posted: Mon Jan 23, 2006 8:02 pm Post subject: |
|
|
Adrien wrote: | You forgot to comment this out in /etc/conf.d/net:
Code: | #modules=( "wpa_supplicant" ) |
If it's not commented out the scripts try to use wireless-tools instead and /etc/conf.d/wireless, which is empty. That's why it can't configure your network.
Not sure but I think you should also increase the dhcpcd_ath0 value as wpa is quite long to associate.
Let me know. |
I thought it was the other way around. You need to leave the modules line in so that the system knows to use wpa_supplicant, instead of wireless-tools.
If /etc/conf.d/wireless is empty, just remove it. Maybe the system is choking on the fact that the file exists. |
|
Back to top |
|
|
trilexx Apprentice
Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Mon Jan 23, 2006 8:02 pm Post subject: |
|
|
output:
Code: | * Starting ath0.... [ok]
* Starting wpa_supplicant on ath0... [ok]
* timed out [!!]
|
I have increased the WPA timeout to 20, and dhcp to 10.
PSK MUST be correct, otherwise I could not connect manually running the commands. Using ap_scan=1 does't change anything, same output.
I have disabled SSID broadcasting, I'll enable this now, just to be sure.
see you in a minute _________________ if it lives, compile it |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2326 Location: Bretagne
|
Posted: Mon Jan 23, 2006 8:04 pm Post subject: |
|
|
optiactive wrote: | I thought it was the other way around. You need to leave the modules line in so that the system knows to use wpa_supplicant, instead of wireless-tools. |
Maybe my english is not right, when I said "comment out", I meant: "remove the comment symbol '#' " Is that right? |
|
Back to top |
|
|
optiactive Tux's lil' helper
Joined: 08 May 2004 Posts: 92
|
Posted: Mon Jan 23, 2006 8:07 pm Post subject: |
|
|
Adrien wrote: | optiactive wrote: | I thought it was the other way around. You need to leave the modules line in so that the system knows to use wpa_supplicant, instead of wireless-tools. |
Maybe my english is not right, when I said "comment out", I meant: "remove the comment symbol '#' " Is that right? |
Yeah, I was confused because your status is "veteran", so I'm pretty sure you know what you're talking about. But, you never know. Oh, and to shorten "remove the comment symbol", just say "uncomment". |
|
Back to top |
|
|
trilexx Apprentice
Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Mon Jan 23, 2006 8:10 pm Post subject: |
|
|
I did understand you right hey, still the same continent...
well, and it finally works! enabling SSID broadcast and ap_scan=2, it can connect within 3 seconds!
my thanks goes out to Adrien! many thanks! people like you make the gentoo community to what it is.
hope to see you soon again, on the boards, or icq?
see ya!
PS.: "ni**e la police" are the only words I can say in french
PPS.: of course, big thank you to optiactive too. _________________ if it lives, compile it |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2326 Location: Bretagne
|
Posted: Mon Jan 23, 2006 8:11 pm Post subject: |
|
|
optiactive wrote: | Yeah, I was confused because your status is "veteran", so I'm pretty sure you know what you're talking about. But, you never know. |
If you knew how n00bish I am, you'd have a good laugh!
optiactive wrote: | Oh, and to shorten "remove the comment symbol", just say "uncomment". |
Thanks! This is quite OFF but, is "to comment out" also right or not?
Edit: trilexx wrote: | PS.: "ni**e la police" are the only words I can say in french |
Glad it works! See you!
Last edited by Adrien on Mon Jan 23, 2006 8:16 pm; edited 1 time in total |
|
Back to top |
|
|
optiactive Tux's lil' helper
Joined: 08 May 2004 Posts: 92
|
Posted: Mon Jan 23, 2006 8:14 pm Post subject: |
|
|
Adrien wrote: | optiactive wrote: | Yeah, I was confused because your status is "veteran", so I'm pretty sure you know what you're talking about. But, you never know. |
If you knew how n00bish I am, you'd have a good laugh!
optiactive wrote: | Oh, and to shorten "remove the comment symbol", just say "uncomment". |
Thanks! This is quite OFF but, is "to comment out" also right or not? |
Yes, if you mean you want to add the # symbol to a line, you say "comment out" the line. |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2326 Location: Bretagne
|
Posted: Mon Jan 23, 2006 8:18 pm Post subject: |
|
|
optiactive wrote: | Yes, if you mean you want to add the # symbol to a line, you say "comment out" the line. |
thx again! I guess it'll will avoid extra issues in the forum! |
|
Back to top |
|
|
|