1d23e [Solved] wpa_supplicant boot error - FreeBSD 8.0-RELEASE i386 - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Networking

Networking Network related discussions (including general TCP/IP stuff, routing, etc).

Reply
 
Thread Tools Display Modes
  #1  
Old February 18th, 2010, 09:45
BitUnique BitUnique is offline
Junior Member
 
Join Date: Feb 2010
Location: Norway
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Default wpa_supplicant boot error - FreeBSD 8.0-RELEASE i386

I'm getting some errors when i boot my machine related to wpa_supplicant, seems like it's not able to associate with my AP automatically. I'm connecting to a WPA AP using a pass phrase

Error at boot

Code:
Feb 18 07:32:11 pandora kernel: /etc/rc.d/wpa_supplicant: WARNING: /etc/wpa_supplicant.conf is not readable.
Feb 18 07:32:11 pandora kernel: /etc/rc.d/wpa_supplicant: WARNING: failed precmd routine for wpa_supplicant
Feb 18 07:32:11 pandora kernel: ifconfig: 
Feb 18 07:32:11 pandora kernel: create: bad value
/etc/rc.conf

Code:
wlans_iwn0="wlan0"
ifconfig_wlan0="ssid xxxx WPA DHCP"
/boot/load.conf

Code:
legal.intel_iwn.license_ack=1
if_iwn_load="YES"
if_iwnfw_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
etc/wpa_supplicant.conf

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

network={
        ssid="xxxx"
        proto=RSN WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP
        psk="xxxx"
}
I have searched around a lot, and haven't quiet found a solution to my problem.

Also, i would like to add that when i do run wpa_supplicant manually, my connection to the AP is stable, but i seem to get a lot of packet loss and timeouts.

Code:
pandora# wpa_supplicant -D bsd -i wlan0 -c /etc/wpa_supplpicant.conf
CTRL-EVENT-SCAN-RESULTS 
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='xxxx' freq=2462 MHz)
Associated with xx:xx:xx:xx:xx:xx
WPA: Key negotiation completed with xx:xx:xx:xx:xx:xx [PTK=TKIP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:xx:xx completed (auth) [id=0 id_str=]
Any help appreciated
Bit
Reply With Quote
  #2  
Old February 18th, 2010, 11:02
bschmidt bschmidt is offline
Member
 
Join Date: Oct 2009
Location: Schwandorf, Germany
Posts: 298
Thanks: 0
Thanked 39 Times in 28 Posts
Default

Quote:
Originally Posted by BitUnique View Post
/etc/rc.conf

Code:
wlans_iwn0="wlan0"
ifconfig_wlan0="ssid xxxx WPA DHCP"
You can drop the "ssid XXXX " part there.

Quote:
Originally Posted by BitUnique View Post
/boot/load.conf
This is loader.conf isn't it?

Quote:
Originally Posted by BitUnique View Post
etc/wpa_supplicant.conf

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

network={
        ssid="xxxx"
        proto=RSN WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP
        psk="xxxx"
}
Can you also post # ls -l /etc/wpa_supplicant.conf?

Quote:
Originally Posted by BitUnique View Post
Also, i would like to add that when i do run wpa_supplicant manually, my connection to the AP is stable, but i seem to get a lot of packet loss and timeouts.
This can have several reasons.. before getting deeper into that, did you try the driver from stable/8 oder head? Also, TKIP has known issues in 8.0-RELEASE (fixed in head), you might want to use CCMP and RSN only, as in:

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

network={
        ssid="xxxx"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
        psk="xxxx"
}
Reply With Quote
  #3  
Old February 18th, 2010, 11:14
BitUnique BitUnique is offline
Junior Member
 
Join Date: Feb 2010
Location: Norway
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
This is loader.conf isn't it?
Yes, my bad. Sorry

Quote:
Can you also post # ls -l /etc/wpa_supplicant.conf?
Code:
-rw-r--r--  1 bitunique  bitunique  222 Feb 18 07:59 /etc/wpa_supplpicant.conf
Quote:
This can have several reasons.. before getting deeper into that, did you try the driver from stable/8 oder head? Also, TKIP has known issues in 8.0-RELEASE (fixed in head)
Not sure how to update drivers/modules. I haven't gotten that far in the handbook yet.
__________________
In a world without walls and fences, who needs windows and gates.
Reply With Quote
  #4  
Old February 18th, 2010, 11:20
bschmidt bschmidt is offline
Member
 
Join Date: Oct 2009
Location: Schwandorf, Germany
Posts: 298
Thanks: 0
Thanked 39 Times in 28 Posts
Default

Quote:
Originally Posted by BitUnique View Post
Code:
-rw-r--r--  1 bitunique  bitunique  222 Feb 18 07:59 /etc/wpa_supplpicant.conf
I don't know whether the file owner makes a difference, though, changing it to root:wheel for a test won't hurt.

Quote:
Originally Posted by BitUnique View Post
Not sure how to update drivers/modules. I haven't gotten that far in the handbook yet.
Try switching to CCMP first, it might solve your issue regarding stability.
Reply With Quote
  #5  
Old February 18th, 2010, 11:36
BitUnique BitUnique is offline
Junior Member
 
Join Date: Feb 2010
Location: Norway
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by bschmidt View Post
I don't know whether the file owner makes a difference, though, changing it to root:wheel for a test won't hurt.
Indeed, that did it It didn't occur to me that the file had to be root:wheel even tho that is completely logical heh.

Quote:
Try switching to CCMP first, it might solve your issue regarding stability.
CCMP only does not work, completely unable to associate. I'm forced to use TKIP it seems.
__________________
In a world without walls and fences, who needs windows and gates.
Reply With Quote
  #6  
Old February 18th, 2010, 11:44
BitUnique BitUnique is offline
Junior Member
 
Join Date: Feb 2010
Location: Norway
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Just did a dmesg |grep iwn to check things out, and i got the following

Code:
wlan0: ieee80211_vap_detach: STA parent iwn0
iwn0: need multicast update callback
That might be related to the instability?
__________________
In a world without walls and fences, who needs windows and gates.
Reply With Quote
  #7  
Old February 18th, 2010, 11:55
bschmidt bschmidt is offline
Member
 
Join Date: Oct 2009
Location: Schwandorf, Germany
Posts: 298
Thanks: 0
Thanked 39 Times in 28 Posts
Default

Quote:
Originally Posted by BitUnique View Post
Just did a dmesg |grep iwn to check things out, and i got the following

Code:
wlan0: ieee80211_vap_detach: STA parent iwn0
iwn0: need multicast update callback
That might be related to the instability?
Nope, that is just a warning about a missing driver callback, this is fixed with the newer driver.

As I said, TKIP has a known issue with rekeying. You can fix that by either changing the "Group Key Interval Update", in case your AP provides such a setting, or by building your own kernel with the fix applied. Read this starting with post #229.
Reply With Quote
  #8  
Old February 18th, 2010, 12:18
BitUnique BitUnique is offline
Junior Member
 
Join Date: Feb 2010
Location: Norway
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Thanks for your support on this? I'll get cracking on building my own kernel
__________________
In a world without walls and fences, who needs windows and gates.
Reply With Quote
  #9  
Old February 18th, 2010, 12:53
bschmidt bschmidt is offline
Member
 
Join Date: Oct 2009
Location: Schwandorf, Germany
Posts: 298
Thanks: 0
Thanked 39 Times in 28 Posts
Default

Quote:
Originally Posted by BitUnique View Post
Thanks for your support on this? I'll get cracking on building my own kernel
You're welcome and good luck
Reply With Quote
  #10  
Old February 18th, 2010, 15:16
BitUnique BitUnique is offline
Junior Member
 
Join Date: Feb 2010
Location: Norway
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Alright, its been a little while now since i patched my kernel and rebuilt my driver. And it's definately better.

But its still not completely stable.

dmesg | grep iwn

Code:
iwn0: <Intel(R) PRO/Wireless 4965BGN> mem 0xf3100000-0xf3101fff irq 17 at device 0.0 on pci6
iwn0: Reg Domain: MoW2, address 00:13:e8:95:f8:8b
iwn0: [ITHREAD]
iwn0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwn0: 11na MCS: 15Mbps 30Mbps 45Mbps 60Mbps 90Mbps 120Mbps 135Mbps 150Mbps 30Mbps 60Mbps 90Mbps 120Mbps 180Mbps 240Mbps 270Mbps 300Mbps
iwn0: 11ng MCS: 15Mbps 30Mbps 45Mbps 60Mbps 90Mbps 120Mbps 135Mbps 150Mbps 30Mbps 60Mbps 90Mbps 120Mbps 180Mbps 240Mbps 270Mbps 300Mbps
iwn0: need multicast update callback
iwn0: need multicast update callback
iwn0: need multicast update callback
Also found this;

Code:
gnome-keyring-daemon[1211]: couldn't allocate secure memory to keep passwords and or keys from being written to the disk
To rebuild the driver i cd'd in to /usr/src/sys/modules/iwn and did
Code:
make clean && make
after patching the kernel. Followed by a reboot. I'm not sure if this was the correct way of doing it or not.
__________________
In a world without walls and fences, who needs windows and gates.
Reply With Quote
  #11  
Old February 18th, 2010, 16:14
bschmidt bschmidt is offline
Member
 
Join Date: Oct 2009
Location: Schwandorf, Germany
Posts: 298
Thanks: 0
Thanked 39 Times in 28 Posts
Default

Quote:
Originally Posted by BitUnique View Post
To rebuild the driver i cd'd in to /usr/src/sys/modules/iwn and did
Code:
make clean && make
after patching the kernel. Followed by a reboot. I'm not sure if this was the correct way of doing it or not.
You rebuild the driver, that is right. Though, the fix is for net80211 which is provided by the "wlan" module. The GENERIC kernel configuration does include wlan directly so just rebuilding the driver/wlan module isn't enough, you must rebuild the whole kernel.

Code:
# cd /usr/src
# make buildkernel
# make installkernel
# reboot
Reply With Quote
  #12  
Old February 18th, 2010, 16:38
BitUnique BitUnique is offline
Junior Member
 
Join Date: Feb 2010
Location: Norway
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by bschmidt View Post
You rebuild the driver, that is right. Though, the fix is for net80211 which is provided by the "wlan" module. The GENERIC kernel configuration does include wlan directly so just rebuilding the driver/wlan module isn't enough, you must rebuild the whole kernel.

Code:
# cd /usr/src
# make buildkernel
# make installkernel
# reboot

Yes i did all the steps.

I patched the kernel, rebuilt it, and reinstalled it. then rebuilt the driver/moduled, then i rebooted. Every thing works a lot better. But i still get some hangups now and then.
__________________
In a world without walls and fences, who needs windows and gates.
Reply With Quote
  #13  
Old February 18th, 2010, 16:47
bschmidt bschmidt is offline
Member
 
Join Date: Oct 2009
Location: Schwandorf, Germany
Posts: 298
Thanks: 0
Thanked 39 Times in 28 Posts
Default

Quote:
Originally Posted by BitUnique View Post
Yes i did all the steps.

I patched the kernel, rebuilt it, and reinstalled it. then rebuilt the driver/moduled, then i rebooted. Every thing works a lot better. But i still get some hangups now and then.
Might be indeed related to driver itself then. In case you are curious you can try the new driver. Installation instructions
Reply With Quote
  #14  
Old February 18th, 2010, 18:06
BitUnique BitUnique is offline
Junior Member
 
Join Date: Feb 2010
Location: Norway
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by bschmidt View Post
Might be indeed related to driver itself then. In case you are curious you can try the new driver. Installation instructions
Ok, i updated the driver. Rebooted, and saw no more error messages, all is well i thought. Then i realised that wpa_supplicant couldnt associate with the AP, it keep failing for some reason, and i cant see any error at all.

Tried dhclient wlan0
Code:
no link..........giving up.
wpa_supplicant can see the AP, just not accociate, it times out every time.
__________________
In a world without walls and fences, who needs windows and gates.
Reply With Quote
  #15  
Old February 18th, 2010, 18:25
bschmidt bschmidt is offline
Member
 
Join Date: Oct 2009
Location: Schwandorf, Germany
Posts: 298
Thanks: 0
Thanked 39 Times in 28 Posts
Default

uhmm.. that's weird. That shouldn't happen. Can you enable debugging with # wlandebug +scan +assoc +state and post the output? You might also want to run wpa_supplicant manually with # wpa_supplicant -Dbsd -iwlan0 -c/etc/wpa_supplicant.conf -ddts.

If we can't figure out what's wrong, you can get the old driver back with
Code:
# cd /usr/src/sys/modules/iwn
# make
# make install
# cd /usr/src/sys/modules/iwnfw
# make
# make install
Reply With Quote
  #16  
Old February 18th, 2010, 19:41
BitUnique BitUnique is offline
Junior Member
 
Join Date: Feb 2010
Location: Norway
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Alright, i reverted back. here are some debugging from the driver that failed.
That's the only relevant part i could see

Code:
Feb 18 18:20:06 pandora kernel: wlan0: [00:21:96:13:a4:08] ieee80211_scan_assoc_fail: reason 1
Feb 18 18:20:06 pandora kernel: wlan0: [00:21:96:13:a4:08] sta_assoc_fail: reason 1 fails 15
wpa_supplicant[320]: failed to disable wpa in the driver
wlan0: ieee80211_new_state_locked:pending scan -> AUTH transission lost
Aswell as
__________________
In a world without walls and fences, who needs windows and gates.

Last edited by DutchDaemon; February 19th, 2010 at 01:18.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is there no graphics driver for my nvidia card in FreeBSD 8.0 - RELEASE i386? Lasse X.Org 6 December 18th, 2009 20:30
[Solved] 8.0-RELEASE-i386-dvd1.iso.gz lumiwa Installing & Upgrading 4 December 8th, 2009 21:19
[Solved] 7.2-Release-i386 livefs.iso ? cch General 2 October 23rd, 2009 09:27
7.1-RELEASE-i386-dvd1.iso & SHA256 z3n Installing & Upgrading 14 April 21st, 2009 01:55
FreeBSD 7.1 RC1 boot only ( i386 ) error fbsd24h Installing & Upgrading 5 December 13th, 2008 04:37


All times are GMT +1. The time now is 19:09.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0