"problems with adapter TL-WN781ND"

Виктор Кузькин torrvic at mail.ru
Fri Oct 7 08:22:30 PDT 2016



Hello!
 I have a problem with connecting of my wireless adapter to wifi network.
 Please help.
 I have access to Internet by WiFi-router only. (Distance for router is 1 meter.)
 I can not change settings in this router.
 I have wifi adapter TL-WN781ND.
 Due of this table
http://linux-wless.passys.nl/query_hostif.php
 driver is in kernel tree (find by "wn781nd").
 I am using Fedora-24. When I connected the adapter to motherboard (PCI-E)
 and booted the system, kernel created network interface (wlp4s0) itself.
--------------------------------------------------------------------------------------
 This is the output of command "ifconfig -a":
enp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether d0:50:99:4f:f8:90  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
        device interrupt 19  
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 144  bytes 12672 (12.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 144  bytes 12672 (12.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
wlp4s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether f4:f2:6d:c7:61:48  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
--------------------------------------------------------------------------------------
 This is the output of command "lspci | grep Network":
04:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
--------------------------------------------------------------------------------------
 This is the output of command "dmesg | grep Ather":
[    1.202524] alx 0000:01:00.0 eth0: Qualcomm Atheros AR816x/AR817x Ethernet [d0:50:99:4f:f8:90]
[   18.028248] ieee80211 phy0: Atheros AR9485 Rev:1 mem=0xf9500000, irq=18
--------------------------------------------------------------------------------------
 This is the output of command "lsmod":
Module                  Size  Used by
fuse                   90112  7
nf_conntrack_netbios_ns    16384  0
nf_conntrack_broadcast    16384  1 nf_conntrack_netbios_ns
ip6t_rpfilter          16384  1
ip6t_REJECT            16384  2
nf_reject_ipv6         16384  1 ip6t_REJECT
xt_conntrack           16384  21
ip_set                 36864  0
nfnetlink              16384  1 ip_set
ebtable_broute         16384  1
bridge                110592  1 ebtable_broute
stp                    16384  1 bridge
llc                    16384  2 stp,bridge
ebtable_nat            16384  1
ip6table_security      16384  1
ip6table_raw           16384  1
ip6table_nat           16384  1
nf_conntrack_ipv6      20480  12
nf_defrag_ipv6         24576  1 nf_conntrack_ipv6
nf_nat_ipv6            16384  1 ip6table_nat
ip6table_mangle        16384  1
iptable_security       16384  1
iptable_raw            16384  1
iptable_nat            16384  1
nf_conntrack_ipv4      16384  11
nf_defrag_ipv4         16384  1 nf_conntrack_ipv4
nf_nat_ipv4            16384  1 iptable_nat
nf_nat                 20480  2 nf_nat_ipv4,nf_nat_ipv6
nf_conntrack           94208  8 nf_conntrack_netbios_ns,nf_nat,nf_nat_ipv4,nf_nat_ipv6,xt_conntrack,nf_conntrack_broadcast,nf_conntrack_ipv4,nf_conntrack_ipv6
iptable_mangle         16384  1
ebtable_filter         16384  1
ebtables               24576  3 ebtable_broute,ebtable_nat,ebtable_filter
ip6table_filter        16384  1
ip6_tables             20480  5 ip6table_filter,ip6table_mangle,ip6table_security,ip6table_nat,ip6table_raw
snd_hda_codec_realtek    73728  1
snd_hda_codec_generic    69632  1 snd_hda_codec_realtek
uas                    20480  0
snd_hda_intel          32768  7
snd_hda_codec         114688  3 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel
usb_storage            57344  3 uas
arc4                   16384  2
ath9k                 114688  0
snd_hda_core           57344  4 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
kvm_amd                61440  0
snd_hwdep              16384  1 snd_hda_codec
ath9k_common           36864  1 ath9k
ath9k_hw              454656  2 ath9k_common,ath9k
snd_seq                57344  0
kvm                   487424  1 kvm_amd
snd_seq_device         16384  1 snd_seq
ppdev                  20480  0
irqbypass              16384  1 kvm
mac80211              626688  1 ath9k
snd_pcm                98304  3 snd_hda_codec,snd_hda_intel,snd_hda_core
ath                    24576  3 ath9k_common,ath9k,ath9k_hw
edac_mce_amd           24576  0
snd_timer              28672  2 snd_pcm,snd_seq
snd                    65536  23 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_seq_device
soundcore              16384  1 snd
k10temp                16384  0
cfg80211              499712  4 ath,ath9k_common,ath9k,mac80211
edac_core              49152  0
nuvoton_cir            20480  0
rfkill                 24576  4 cfg80211
parport_pc             28672  0
rc_core                28672  1 nuvoton_cir
parport                40960  2 ppdev,parport_pc
i2c_nforce2            16384  0
acpi_cpufreq           20480  0
tpm_tis                20480  0
tpm                    40960  1 tpm_tis
nfsd                  290816  1
auth_rpcgss            53248  1 nfsd
nfs_acl                16384  1 nfsd
lockd                  77824  1 nfsd
grace                  16384  2 nfsd,lockd
sunrpc                274432  7 nfsd,auth_rpcgss,lockd,nfs_acl
nouveau              1347584  7
video                  36864  1 nouveau
mxm_wmi                16384  1 nouveau
wmi                    20480  2 mxm_wmi,nouveau
i2c_algo_bit           16384  1 nouveau
drm_kms_helper        118784  1 nouveau
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
ttm                    77824  1 nouveau
drm                   290816  10 ttm,drm_kms_helper,nouveau
serio_raw              16384  0
alx                    32768  0
ata_generic            16384  0
mdio                   16384  1 alx
pata_acpi              16384  0
sata_nv                24576  0
pata_amd               16384  2
fjes                   28672  0
--------------------------------------------------------------------------------------
 This is the output of command "iwlist scan":
wlp4s0    Scan completed :
          Cell 01 - Address: BC:C6:DB:62:31:D8
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=49/70  Signal level=-61 dBm  
                    Encryption key:on
                    ESSID:"NOKIA"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=00000000027cea54
                    Extra: Last beacon: 77ms ago
                    IE: Unknown: 00054E4F4B4941
                    IE: Unknown: 010482848B96
                    IE: Unknown: 030106
                    IE: Unknown: 2A0100
                    IE: Unknown: 32080C1218243048606C
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 2D1A2C0103FF00000000000000000000000000000000000000000000
                    IE: Unknown: 3D1606000000000000000000000000000000000000000000
                    IE: Unknown: DD180050F2020101810003A4000027A4000042435E0062322F00
                    IE: Unknown: DD7D0050F204104A0001101044000102103B000100104700108A9ABAEB26F84941B0ADB470A580CE30102100094D6963726F736F66741023000757696E646F777310240008362E322E3932303010420001301054000800010050F20000001011000D57696E646F77732050686F6E651008000201081049000600372A000120
                    IE: Unknown: DD080050F21102000000
--------------------------------------------------------------------------------------
 This is my config file (/etc/wpa_supplicant/wpa_supplicant.conf"): 
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
#ctrl_interface_group=wheel
#ctrl_interface_group=netdev
update_config=1
ap_scan=1
network={
   ssid="NOKIA"
#  proto=WPA
   proto=RSN
   key_mgmt=WPA-PSK
#  key_mgmt=WPA-EAP
#  key_mgmt=NONE
   psk="09051092"
   id_str="home"
   pairwise=CCMP TKIP
   group=CCMP TKIP
         }
--------------------------------------------------------------------------------------
 This is my shell-script for making up the connection:

ifconfig wlp4s0 up
rm -f /var/run/wpa_supplicant/wlp4s0
echo "-Dnl80211"
wpa_supplicant -Dnl80211 -iwlp4s0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
#wpa_supplicant -Dwext -iwlp4s0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
sleep 5
echo "scan"
wpa_cli -p /var/run/wpa_supplicant scan
sleep 5
echo "scan_results"
wpa_cli -p /var/run/wpa_supplicant scan_results
sleep 5
echo "remove_network"
wpa_cli -p /var/run/wpa_supplicant remove_network 0
sleep 5
echo "ap_scan 0"
wpa_cli -p /var/run/wpa_supplicant ap_scan 0
sleep 5
echo "add_network"
wpa_cli -p /var/run/wpa_supplicant add_network
sleep 5
echo "set_network 0 ssid NOKIA ..."
wpa_cli -p /var/run/wpa_supplicant set_network 0 ssid "NOKIA" psk "09051092"
sleep 5
echo "check status"
iw dev wlp4s0 link
#echo "dhclient wlp4s0"
#dhclient wlp4s0
--------------------------------------------------------------------------------------
 This is the output of shell-script:
-Dnl80211
Successfully initialized wpa_supplicant
scan
Selected interface 'wlp4s0'
OK
scan_results
Selected interface 'wlp4s0'
bssid / frequency / signal level / flags / ssid
bc:c6:db:62:31:d8 2437 -60 [WPA2-PSK-CCMP][WPS][ESS][P2P] NOKIA
remove_network
Selected interface 'wlp4s0'
OK
ap_scan 0
Selected interface 'wlp4s0'
OK
add_network
Selected interface 'wlp4s0'
0
set_network 0 ssid NOKIA ...
Selected interface 'wlp4s0'
FAIL
check status
Not connected.
--------------------------------------------------------------------------------------
  As you can see I have short message "FAIL" without any hints about reasons of this.
 It is clearly that my adapter "sees" the wifi network.
 But he can not to connect to it.
 I tried to change different parameters in my config file, but unlucky.
 Please give me a hint, what I am doing wrong?
 Why the command "wpa_cli" is failed when trying to connect?
 I think it is not the bug into "wpa_cli".
 I thinK I do something wrong. I am reading different forums during two weeks, but
 I can not find the solution of my problem.
 Please, help.
  Thanks.

-- 
Victor Kuzkin


More information about the ath9k_htc_fw mailing list