wpa_supplicant + WPA psk + ad-hoc mode working

Johann Hugo jhugo at meraka.csir.co.za
Thu May 10 13:49:29 UTC 2012


Hi

Just managed to configure AES-CCM encryption between three wifi devices in 
adhoc mode and every thing seems to work fine. 

I also found out that "ap_scan" must be set to "2" before it works.

Looks like the man page needs a small update:
     ap_scan
             Access point scanning and selection control; one of 0, 1
             (default), or 2.  Only setting 1 should be used with the wlan(4)
             module; the other settings are for use on other operating sys‐
             tems.

    mode    IEEE 802.11 operation mode; either 0 (infrastructure, default) or
             1 (IBSS).  Note that IBSS (adhoc) mode can only be used with
             key_mgmt set to NONE (plaintext and static WEP), or key_mgmt set
             to WPA-NONE (fixed group key TKIP/CCMP).  In addition, ap_scan
             has to be set to 2 for IBSS.  WPA-NONE requires proto set to WPA,
             key_mgmt set to WPA-NONE, pairwise set to NONE, group set to
             either CCMP or TKIP (but not both), and psk must also be set.

----------------------------
Here is my configs:
----------------------------
mesh-2aee:~ # more /etc/rc.conf

wlans_ath0="wlan0"
create_args_wlan0="wlanmode adhoc country ZA"
ifconfig_wlan0="WPA channel 13 ssid mesh bssid 66:98:40:46:b7:0a"


mesh-2aee:~ # more /etc/wpa_supplicant.conf 

ap_scan=2
 
network={
  ssid="mesh"
  mode=1
  key_mgmt=WPA-NONE
  proto=WPA
  pairwise=NONE
  group=CCMP
  psk="testsecret"
}

mesh-2aee:~ # ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:80:48:4f:2a:ee
        inet6 fe80::280:48ff:fe4f:2aee%wlan0 prefixlen 64 scopeid 0x7 
        inet6 fd9c:6829:597c:20:280:48ff:fe4f:2aee prefixlen 64 
        inet6 fd9c:6829:597c:20:: prefixlen 64 anycast 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <adhoc>
        status: running
        ssid mesh channel 13 (2472 MHz 11g) bssid 66:98:40:46:b7:0a
        regdomain NONE country ZA ecm authmode WPA privacy ON deftxkey 1
        AES-CCM 1:128-bit txpower 30 scanvalid 450 protmode CTS wme burst
        roaming MANUAL

mesh-2aee:~ # ifconfig wlan0 list sta
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG   
00:80:48:4f:2a:ee    0   13   0M  4.0  105  47746   2496 IP   A      
00:21:a4:32:06:53    0   13  24M 22.5    0   1793  22160 IPS  AQE     WPA WME
00:21:a4:32:06:39    0   13  24M 25.5    0  24479   8848 IPS  AQE     WPA WME

Johann


More information about the freebsd-wireless mailing list