WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: wireless cfg80211 versus wext  (Read 4945 times)

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14568
wireless cfg80211 versus wext
« on: April 12, 2013, 06:54:24 AM »
I've been playing around with the broadcom wl module - the one in the repo is compiled to use the depreciated wext interface, but it can also be compiled to use the more recent cfg80211 interface.

Using the wext interface with an ap using wpa2 (aes) with no ssid broadcast - I can connect by issuing commands manually, but wifi.sh will only connect if the ssid is broadcast. I have to issue the udhcpc command twice due to a bug with the wl wext module, but wifi.sh will connect first time.

Using the cfg80211 interface with an ap using wpa2 (aes) with no ssid broadcast - I cannot connect by issuing commands manually and wifi.sh will only connect if the ssid is broadcast.

The manual commands I use are:
Code: [Select]
$ sudo wpa_supplicant -B -i eth1 -c/etc/wpa_configure.conf
$ sudo udhcpc -b -i eth1 -x hostname:boxdell -p /var/run/udhcpc.eth1.pid

The commands wifi.sh uses are:
Code: [Select]
# wpa_supplicant -i eth1 -c /etc/wpa_supplicant.conf -B
# udhcpc -n -i eth1

Using the cfg80211 interface, if I save the wifi.db created with ssid broadcast enabled and use it with "sudo wifi.sh -a" with ssid broadcast disabled, wifi.sh will not connect. If I use manual commands with the wpa_supplicant.conf created by wifi.sh, I cannot connect.

What I'd like to do is use the wl module in cfg80211 mode with either manual commands or wifi.sh with with ssid broadcast disabled - is there something I'm missing?
« Last Edit: April 12, 2013, 06:57:05 AM by Juanito »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14568
Re: wireless cfg80211 versus wext
« Reply #1 on: April 12, 2013, 08:02:31 AM »
to answer my own question, "ap_scan=2" and "scan_ssid=1" are needed to be added as follows for networks where the ssid is not broadcast (in cfg80211 mode at least).

Code: [Select]
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1

network={
        ssid="ssid"
        psk="passcode"
        scan_ssid=1
key_mgmt=WPA-PSK
proto=WPA2
pairwise=CCMP
group=CCMP
priority=5
}
..and I can now connect on the first attempt with manual commands

Strangely the lib80211_crypt_ccmp module is not loaded and the wireless ap is not in wpa2 mixed mode (aes + tkip), but things still work.
Code: [Select]
$ lsmod
Module                  Size  Used by    Tainted: P 
lib80211_crypt_tkip    12288  0
wl                   2355200  0
cfg80211               94208  1 wl
lib80211               12288  2 lib80211_crypt_tkip,wl

I'm guessing from the following that a more recent version of libnl and/or update to wl is required:
Code: [Select]
wl: Unknown symbol cfg80211_scan_done (err 0)
wl: Unknown symbol cfg80211_disconnected (err 0)
wl: Unknown symbol wiphy_register (err 0)
wl: Unknown symbol wiphy_new (err 0)
wl: Unknown symbol cfg80211_put_bss (err 0)
wl: Unknown symbol cfg80211_roamed (err 0)
wl: Unknown symbol lib80211_get_crypto_ops (err 0)
wl: Unknown symbol cfg80211_ibss_joined (err 0)
wl: Unknown symbol cfg80211_michael_mic_failure (err 0)
wl: Unknown symbol cfg80211_connect_result (err 0)
wl: Unknown symbol wiphy_unregister (err 0)
wl: Unknown symbol cfg80211_get_bss (err 0)
wl: Unknown symbol __ieee80211_get_channel (err 0)
wl: Unknown symbol ieee80211_channel_to_frequency (err 0)
wl: Unknown symbol cfg80211_inform_bss_frame (err 0)
wl: Unknown symbol ieee80211_frequency_to_channel (err 0)
wl: Unknown symbol wiphy_free (err 0)
lib80211: common routines for IEEE802.11 drivers
lib80211_crypt: registered algorithm 'NULL'
cfg80211: Calling CRDA to update world regulatory domain
wl 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
wl 0000:02:00.0: setting latency timer to 64
INFO @wl_cfg80211_attach : Registered CFG80211 phy
lib80211_crypt: registered algorithm 'TKIP'
eth1: Broadcom BCM4359 802.11 Hybrid Wireless Controller 5.100.82.112
..but suggestions welcome  :)
« Last Edit: April 12, 2013, 08:17:20 AM by Juanito »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14568
Re: wireless cfg80211 versus wext
« Reply #2 on: April 13, 2013, 01:04:25 AM »
I'm guessing from the following that a more recent version of libnl and/or update to wl is required

testing in corepure64 with wpa_supplicant-2.0 and libnl-3.2.21, the wl module errors disappear.