Inhaltsverzeichnis

FreeBSD - WLAN

PCI-Karte:

# pciconf -lv
ath0@pci0:3:0:0:        class=0x020000 card=0x058a1014 chip=0x1014168c rev=0x01 hdr=0x00
    vendor     = 'Atheros Communications Inc.'
    device     = 'AR5212 Atheros AR5212 802.11abg wireless'
    class      = network
    subclass   = ethernet

USB-Stick:

# usbconfig list
ugen3.2: <ZyXEL NWD271N ATHER> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

Da sehen wir, das es sich hierbei um einen Atheros-Chip (NWD271N → AR-9170) handelt. Leider wird selbst von FreeBSD 9.0 diese Stick noch nicht unterstützt.

Allerdings wird der "ZyXEL NWD270" von FreeBSD unterstützt.

Die man-Page zu dem Atheros-Treiber ermitteln:

# man -k Atheros
ath(4)                   - Atheros IEEE 802.11 wireless network driver
ath_hal(4)               - Atheros Hardware Access Layer (HAL)

Deshalb lesen wir als erstes ein mal die entsprechende man-Page:

# man ath

/boot/loader.conf

Bei FreeBSD 8.2 kann diese Datei leer bleiben, weil die unten aufgeführten Treiber bereits im GENERIC-Kernel enthalten sind.

# Atheros
if_ath_load="YES"
# Intersil Prism
#if_wi_load="YES"
# Verschlüsselungsmodule (werden eigentlich automatisch geladen)
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

KERNEL

device          wlan            # 802.11 support
device          wlan_wep        # 802.11 WEP support
device          wlan_ccmp       # 802.11 CCMP support
device          wlan_tkip       # 802.11 TKIP support
device          wlan_amrr       # AMRR transmit rate control algorithm
device          ath             # Atheros pci/cardbus NIC's
device          ath_hal         # pci/cardbus chip support
device          wi              # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
options         AH_SUPPORT_AR5416       # enable AR5416 tx/rx descriptors
device          ath_rate_sample # SampleRate tx rate control for ath

AP

Scan

# ifconfig wlan0 create wlandev ath0
# ifconfig wlan0 up scan
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
dlinkap         00:13:46:49:41:76   11   54M -90:96   100 EPS  WPA WME
freebsdap       00:11:95:c3:0d:ac    1   54M -83:96   100 EPS  WPA

Liste

# ifconfig wlan0 list scan

/etc/rc.conf

wlans_ath0="wlan0"
ifconfig_wlan0="mode 11g ssid Ihre_SSID DHCP"

WPA-PSK

/etc/wpa_supplicant.conf

network={
  ssid="freebsdap"
  psk="freebsdmall"
}

/etc/rc.conf

wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"

Start

# /etc/rc.d/netif start

rc.conf
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"
dev
ifconfig wlan0 create wlandev ath0

WPA-PSK-basierender Host-Access Point

/etc/rc.conf

hostapd_enable="YES"

/etc/hostapd.conf

interface=wlan0
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=freebsdap
wpa=1
wpa_passphrase=freebsdmall
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP

Start

# /etc/rc.d/hostapd forcestart
# ifconfig wlan0