Topic: custom image - disassociating error

I'm somewhat new to openwrt, but not new to 3rd party firmwares. I'd like to say that this is a very impressive project and the ability to build a custom image is amazing.

I compiled using "svn co svn://svn.openwrt.org/openwrt/trunk" - so the trunk development version.

My configuration - WRT54GL - trying to get onto GoogleWiFiSecure (free google wifi). I'm using WPA2-EAP, PEAP, and MSCHAPV2. When setting it to the GoogleWiFi (non-secure no encryption), then everything works. When using encryption, I have lots of problems. So I recompiled to 'make defconfig' + luci-medium + libopenssl + wpad (- wpad_mini).

This seems to do a pretty good job. First issue now is that there is a disagreement on capitalization between wpa_supplicant.sh and LUCI. the /etc/network/config file has

         option 'eap_type' 'PEAP'

yet wpa_supplicant.sh looks for peap|ttls and that won't match. By changing peap to PEAP, it seems to work fine. But now I have a message in the logs about disassociating by local choice:

Here is the relevant part of the logs:



Aug 14 23:04:39 OpenWrt user.info firewall: info removing lan (br-lan) from zone lan
Aug 14 23:04:39 OpenWrt user.info kernel: br-lan: port 1(eth0.0) entering disabled state
Aug 14 23:04:39 OpenWrt user.info kernel: device eth0 left promiscuous mode
Aug 14 23:04:39 OpenWrt user.info kernel: device eth0.0 left promiscuous mode
Aug 14 23:04:39 OpenWrt user.info kernel: br-lan: port 1(eth0.0) entering disabled state
Aug 14 23:04:46 OpenWrt user.notice rdate: No usable time server for loopback found
Aug 14 23:04:47 OpenWrt user.info kernel: device eth0.0 entered promiscuous mode
Aug 14 23:04:47 OpenWrt user.info kernel: device eth0 entered promiscuous mode
Aug 14 23:04:47 OpenWrt user.info kernel: br-lan: port 1(eth0.0) entering forwarding state
Aug 14 23:04:58 OpenWrt user.notice rdate: No usable time server for lan found
Aug 14 23:04:59 OpenWrt user.info firewall: info adding lan (br-lan) to zone lan
Aug 14 23:05:00 OpenWrt user.info kernel: b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
Aug 14 23:05:00 OpenWrt user.info kernel: b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
Aug 14 23:05:03 OpenWrt user.debug kernel: wlan0: authenticate with 00:0d:97:14:86:3e (try 1)
Aug 14 23:05:04 OpenWrt user.debug kernel: wlan0: authenticate with 00:0d:97:14:86:3e (try 2)
Aug 14 23:05:04 OpenWrt user.debug kernel: wlan0: authenticate with 00:0d:97:14:86:3e (try 3)
Aug 14 23:05:04 OpenWrt user.debug kernel: wlan0: authenticated
Aug 14 23:05:04 OpenWrt user.debug kernel: wlan0: associate with 00:0d:97:14:86:3e (try 1)
Aug 14 23:05:04 OpenWrt user.debug kernel: wlan0: RX AssocResp from 00:0d:97:14:86:3e (capab=0x11 status=0 aid=264)
Aug 14 23:05:04 OpenWrt user.debug kernel: wlan0: associated
Aug 14 23:05:04 OpenWrt user.info kernel: cfg80211: Calling CRDA for country: US
Aug 14 23:05:08 OpenWrt user.debug kernel: wlan0: disassociating from 00:0d:97:14:86:3e by local choice (reason=3)
Aug 14 23:05:08 OpenWrt user.info kernel: cfg80211: Calling CRDA to update world regulatory domain
Aug 14 23:05:08 OpenWrt user.info kernel: cfg80211: World regulatory domain updated:
Aug 14 23:05:08 OpenWrt user.info kernel:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Aug 14 23:05:08 OpenWrt user.info kernel:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Aug 14 23:05:08 OpenWrt user.info kernel:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
Aug 14 23:05:08 OpenWrt user.info kernel:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
Aug 14 23:05:08 OpenWrt user.info kernel:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Aug 14 23:05:08 OpenWrt user.info kernel:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Aug 14 23:05:09 OpenWrt user.debug kernel: wlan0: deauthenticating from 00:0d:97:14:86:3e by local choice (reason=2)

This last sequence of authentication continues on and on.

I can't quite figure out why the disassociating by local choice (reason=3) is happening.

Any help would be greatly appreciated.

Thank you,
Nachum

Re: custom image - disassociating error

Some better news,

I got it to work. Compile with wpa_supplicant - set it to use libopenssl, and make sure to add in libopenssl. Don't use wpad. (I don't know if this is what fixed it, or the fact that I'm not using trunk, but rather backfire...)

You also must fix the /lib/wifi/wpa_supplicant.sh script. There is a line that compares eap to peap|tls and it must be changed to PEAP|TLS, otherwise the compare doesn't work and the switch statement doesn't enter that case and it doesn't set all the variables needed.

Other than those 2 things, it works. You can ignore the Path-to-certificate line in LUCI (if you use that) because when it's blank it won't affect anything. It just doesn't verify the server's identity.

Lastly there seems to be a bug that it only works upon hard restart. Something messed with some scripts probably. So after changing settings in LUCI, save them, unplug and plug back in. Give it a few minutes and it should be online.

Nachum