Чт 27 фев 2014 13:19:51
Здравствуйте. Имею PCI Wireless адаптер TP-Link TL-WN851ND. Не получается
подключить его к системе. Как делал-

[[email protected] wi-fi]# ifconfig wlp2s5; iwconfig wlp2s5
wlp2s5: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 10:fe:ed:5e:92:80  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp2s5    IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

Определение модуля поддержки устройства:

[[email protected] wi-fi]# lspci -k | grep -A 3 -i Wireless
02:05.0 Network controller: Qualcomm Atheros AR9227 Wireless Network Adapter (rev 01)
    Subsystem: Qualcomm Atheros Device 0300
    Kernel driver in use: ath9k
    Kernel modules: ath9k

[[email protected] wi-fi]# dmesg | grep Atheros
[    9.221438] ieee80211 phy0: Atheros AR9287 Rev:2 mem=0xf81a0000, irq=21
Решил использовать ath9k, т.к. имеется в системе. Создал файлы конфигурации:

dhcpd.conf:

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
option domain-name-servers 192.168.0.6 ;
subnet 10.42.43.0 netmask 255.255.255.0 {
    range 10.42.43.50 10.42.43.70;
    option subnet-mask 255.255.255.0;
    option broadcast-address 10.42.43.255;
    option routers 10.42.43.1;
}

hostapd.conf:

interface=wlp2s5
driver=ath9k
ssid=bsm_TestHostapd
channel=12
hw_mode=n
auth_algs=1
wpa=3
wpa_passphrase=XtibhcrbqRjn
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
Затем выполнил:

modprobe ath9k

iwconfig wlp2s5 essid bsm_TestHostapd mode Master freq 2.42G
sleep 12
ifconfig wlp2s5 10.42.43.1/24 up

echo INTERFACES=wlp2s5 > /etc/default/dhcp

dhcpd -cf dhcpd.conf wlp2s5
hostapd -d hostapd.conf
И получил сообщения:

Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlp2s5 ; Invalid argument.

Internet Systems Consortium DHCP Server 4.2.5-P1
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.
Listening on LPF/wlp2s5/10:fe:ed:5e:92:80/10.42.43.0/24
Sending on   LPF/wlp2s5/10:fe:ed:5e:92:80/10.42.43.0/24
Sending on   Socket/fallback/fallback-net

random: Trying to read entropy from /dev/random
Configuration file: hostapd.conf
Line 5: invalid/unknown driver 'ath9k'
1 errors found in configuration file 'hostapd.conf'
Failed to set up interface with hostapd.conf
hostapd_init: free iface 0x8ec9430
Failed to initialize interface
hostapd_interface_deinit_free((nil))
При этом:
[code]
[[email protected] router]# lsmod | grep ath9k
ath9k                  84400  0
ath9k_common            1430  1 ath9k
ath9k_hw              383712  2 ath9k_common,ath9k
ath                    15461  3 ath9k_common,ath9k,ath9k_hw
mac80211              413077  1 ath9k
cfg80211              344410  3 ath,ath9k,mac80211

[[email protected] wi-fi]# ifconfig wlp2s5; iwconfig wlp2s5
wlp2s5: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 10.42.43.1  netmask 255.255.255.0  broadcast 10.42.43.255
        ether 10:fe:ed:5e:92:80  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp2s5    IEEE 802.11bgn  ESSID:"bsm_TestHostapd"
          Mode:Managed  Access Point: Not-Associated   Tx-Power=19 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
Что необходимо исправить? Спасибо.