Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2012 15:49:20 +0200
From:      Johann Hugo <jhugo@meraka.csir.co.za>
To:        freebsd-wireless@freebsd.org
Subject:   wpa_supplicant + WPA psk + ad-hoc mode working
Message-ID:  <201205101549.20368.jhugo@meraka.csir.co.za>

next in thread | raw e-mail | index | archive | help
Hi

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

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=
=E2=80=90
             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 s=
et
             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 W=
PA,
             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.

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

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


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

ap_scan=3D2
=20
network=3D{
  ssid=3D"mesh"
  mode=3D1
  key_mgmt=3DWPA-NONE
  proto=3DWPA
  pairwise=3DNONE
  group=3DCCMP
  psk=3D"testsecret"
}

mesh-2aee:~ # ifconfig wlan0
wlan0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 15=
00
        ether 00:80:48:4f:2a:ee
        inet6 fe80::280:48ff:fe4f:2aee%wlan0 prefixlen 64 scopeid 0x7=20
        inet6 fd9c:6829:597c:20:280:48ff:fe4f:2aee prefixlen 64=20
        inet6 fd9c:6829:597c:20:: prefixlen 64 anycast=20
        nd6 options=3D21<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  =20
00:80:48:4f:2a:ee    0   13   0M  4.0  105  47746   2496 IP   A     =20
00:21:a4:32:06:53    0   13  24M 22.5    0   1793  22160 IPS  AQE     WPA W=
ME
00:21:a4:32:06:39    0   13  24M 25.5    0  24479   8848 IPS  AQE     WPA W=
ME

Johann



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205101549.20368.jhugo>