Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've had trouble at my office using wifi. The thing is, the wifi network is totally seperate from the office LAN, and i've got to be on wifi if i want to use protocols like ssh or git.
I configured the wifi router to have a permanent DHCP lease on my Atheros card (using ath9k driver) and changed the password encryption to WPA2 (was using wep before... a shame). Also switched to channel 9, because the area is saturated with ch.11,6,7... emitters.

All worked fine until i connected the ethernet cable again. Now network manager (on Natty 11.04) spits this all over my syslog :

Oct  3 16:24:05 x wpa_supplicant[883]: Trying to associate with {box bssid} (SSID='xxxxx' freq=2452 MHz)
Oct  3 16:24:05 x NetworkManager[782]: <info> (wlan0): supplicant connection state:  scanning -> associating
Oct  3 16:24:05 x kernel: [ 9792.310325] wlan0: authenticate with {box bssid} (try 1)
Oct  3 16:24:05 x kernel: [ 9792.319767] wlan0: authenticated
Oct  3 16:24:05 x kernel: [ 9792.319802] wlan0: associate with {box bssid} (try 1)
Oct  3 16:24:05 x wpa_supplicant[883]: Associated with {box bssid}
Oct  3 16:24:05 x NetworkManager[782]: <info> (wlan0): supplicant connection state:  associating -> associated
Oct  3 16:24:05 x kernel: [ 9792.343240] wlan0: RX AssocResp from {box bssid} (capab=0x411 status=0 aid=1)
Oct  3 16:24:05 x kernel: [ 9792.343246] wlan0: associated
Oct  3 16:24:08 x kernel: [ 9795.442339] wlan0: deauthenticated from {box bssid} (Reason: 2)
Oct  3 16:24:08 x wpa_supplicant[883]: CTRL-EVENT-DISCONNECTED bssid={box bssid} reason=0
Oct  3 16:24:08 x NetworkManager[782]: <info> (wlan0): supplicant connection state:  associated -> disconnected
Oct  3 16:24:08 x kernel: [ 9795.507836] cfg80211: All devices are disconnected, going to restore regulatory settings
Oct  3 16:24:08 x kernel: [ 9795.507843] cfg80211: Restoring regulatory settings
Oct  3 16:24:08 x kernel: [ 9795.507847] cfg80211: Calling CRDA to update world regulatory domain
Oct  3 16:24:08 x kernel: [ 9795.512836] cfg80211: Ignoring regulatory request Set by core since the driver uses its own custom regulatory domain 
Oct  3 16:24:08 x kernel: [ 9795.512843] cfg80211: World regulatory domain updated:
Oct  3 16:24:08 x kernel: [ 9795.512845] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Oct  3 16:24:08 x kernel: [ 9795.512849] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Oct  3 16:24:08 x kernel: [ 9795.512852] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
Oct  3 16:24:08 x kernel: [ 9795.512855] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
Oct  3 16:24:08 x kernel: [ 9795.512858] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Oct  3 16:24:08 x kernel: [ 9795.512860] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Oct  3 16:24:08 x NetworkManager[782]: <info> (wlan0): supplicant connection state:  disconnected -> scanning

...and this goes on and on, trying to reconnect. Seems the authentification fails, but i don't understand why since it worked before i plugged the cable in. Any idea ?

EDIT : Supressed dhcp permanent lease, works again. Still interested about the cause ?!

share|improve this question
add comment

1 Answer

Try this in a Terminal window:

sudo ifconfig wlan0 down
sudo dhclient -r wlan0
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid "YOUR ESSID"
sudo iwconfig wlan0 mode Managed
sudo dhclient wlan0
share|improve this answer
    
thanks for the answer. as i said, it works again since i've removed the DHCP permanent lease, and i see you use dhclient -r to force renewal of the lease. As stated, i'm curious of what could cause such behaviour ("locking" my connection because of a lease). Could you explain me why ? –  m_x Oct 3 '11 at 21:22
    
dhclient -r actually removes DHCP. Then, we add it and we configure it. –  MiJyn Oct 4 '11 at 14:08
    
accepted answer because it works, but i still don't understand why it won't work in the first place ... (ô_é) –  m_x Oct 4 '11 at 14:23
    
Sure, I'll explain (I might have to divide it into a few comments). –  MiJyn Oct 4 '11 at 14:49
    
The first command (ifconfig wlan0 down) disables the network interface, dhclient -r wlan0 removes the DHCP interfaces, and ifconfig wlan0 up enables the network again. –  MiJyn Oct 4 '11 at 14:50
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.