LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 06-08-2013, 12:31 PM   #1
RudyMartin
LQ Newbie
 
Registered: Nov 2011
Location: Argentina
Distribution: Slackware
Posts: 25

Rep: Reputation: Disabled
erratic behavior on atheros 9271


hi all

after searching on the net and this forum for several hours I tend to think this piece of hardware is a bit buggy: TP-WN722N.

from /var/log/dmesg
[ 6.401152] ath9k_htc 1-2:1.0: ath9k_htc: Target is unresponsive
[ 6.401252] ath9k_htc: Failed to initialize the device
[ 6.414748] usb 1-2: ath9k_htc: USB layer deinitialized

unplugged and pluged again and now iwconfig:

wlan1 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

bash-4.2# wpa_supplicant -Dwext -iwlan1 -c /etc/wpa_supplicant.conf
wlan1: Trying to associate with 90:f6:52:a5:9e:a4 (SSID='2284689764' freq=2412 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan1: Association request to the driver failed
wlan1: Authentication with 90:f6:52:a5:9e:a4 timed out.
wlan1: Trying to associate with 90:f6:52:a5:9e:a4 (SSID='2284689764' freq=2412 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan1: Association request to the driver failed
wlan1: Authentication with 90:f6:52:a5:9e:a4 timed out.
wlan1: Trying to associate with 90:f6:52:a5:9e:a4 (SSID='2284689764' freq=2412 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan1: Association request to the driver failed
wlan1: Associated with 90:f6:52:a5:9e:a4
wlan1: WPA: Key negotiation completed with 90:f6:52:a5:9e:a4 [PTK=CCMP GTK=TKIP]
wlan1: CTRL-EVENT-CONNECTED - Connection to 90:f6:52:a5:9e:a4 completed (auth) [id=0 id_str=]
wlan1: WPA: Key negotiation completed with 90:f6:52:a5:9e:a4 [PTK=CCMP GTK=TKIP]
wlan1: WPA: Key negotiation completed with 90:f6:52:a5:9e:a4 [PTK=CCMP GTK=TKIP]
wlan1: CTRL-EVENT-DISCONNECTED bssid=90:f6:52:a5:9e:a4 reason=0
wlan1: Trying to associate with 90:f6:52:a5:9e:a4 (SSID='2284689764' freq=2412 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan1: Association request to the driver failed
wlan1: Associated with 90:f6:52:a5:9e:a4
wlan1: WPA: Key negotiation completed with 90:f6:52:a5:9e:a4 [PTK=CCMP GTK=TKIP]
wlan1: CTRL-EVENT-CONNECTED - Connection to 90:f6:52:a5:9e:a4 completed (reauth) [id=0 id_str=]
wlan1: WPA: Group rekeying completed with 90:f6:52:a5:9e:a4 [GTK=TKIP]

apparently, rc.inet1.conf is ignored (I'm saying this because I had it named wlan0 and still appears as wlan1)
downloaded the wireless.kernel.org. I saw
Firmware is the lastest, checked with diff. using Slackware 14 32

and now for the Problem I want to solve. I want to be able to use this card at boot time without having to unplug and plug again

any suggestions? thanks in advance.
 
Old 06-08-2013, 01:38 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Hello,

I think you've missunderstood some things.

You cannot name wlan0 or wlan1 in /etc/rc.d/rc.inet1.conf because in this file you only say what to do with wlan0, wlan1 and so on. If your interface appears as wlan1 and you want it to be wlan0 you'll have to take a look at the /etc/udev/rules.d/70-persistent-net.rules file
Code:
markus@samsung:/etc/udev/rules.d$ cat 70-persistent-net.rules 

# PCI device 0x168c:/sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0 (ath9k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f0:7b:cb:2e:cd:3e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x11ab:/sys/devices/pci0000:00/0000:00:06.0/0000:04:00.0 (sky2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:54:6e:93:49", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
here the example from my laptop. This file tells udev which name to give to the wireless interface. You should at first check if the entries in this file are really true for your device! If not change them. If the entries are correct but it assigns wlan1 to the interface, change it here and reload the rules
Code:
udevadm control --reload
Next Point: the errormessages when running wpa_supplicant suggest, that it is already running. You should at first check if any instance of the program is already running
Code:
ps -e | grep wpa
and kill it. Afterwards check if there is a wpa_supplicant file in /var/run, if there is one but no instance running, you should delete the file because if it exists wpa_supplicant thinks that it's already running.

And please execute
Code:
lspci -k | grep -iA3 wire
this will show you which module is loaded for the device. Please post the output here.

Markus
 
1 members found this post helpful.
Old 06-09-2013, 03:31 PM   #3
RudyMartin
LQ Newbie
 
Registered: Nov 2011
Location: Argentina
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: Disabled
Markus:

thanks a lot for your answer

And now that I have turned on the computer and the "thing" decided to work at bootup. I do have two of those usb devices at the moment, that's explain why the wlan0 wlan1 device name.

here is the output from the commands:
Code:
root@trax:~# cat /etc/udev/rules.d/70-persistent-net.rules 

# PCI device 0x10ec:/sys/devices/pci0000:00/0000:00:14.4/0000:02:02.0 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:76:06:6f:a1", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# USB device 0x0cf3:0x9271 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="64:70:02:15:42:ed", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# USB device 0x0cf3:0x9271 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:1a:67:18:9f:d3", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"
now it is clear to me the reason of why the wlan1 and wlan0. HW Id are not the same.

even with the usbcard working I had nothing on lspci, instead I can see it on lsusb.
Code:
root@trax:~# lspci -k | grep -iA3 wire
root@trax:~# lspci -k
00:00.0 Host bridge: Advanced Micro Devices [AMD] nee ATI Radeon Xpress 200 Host Bridge (rev 01)
        Subsystem: Intel Corporation Device d600
00:01.0 PCI bridge: Advanced Micro Devices [AMD] nee ATI RS480 PCI Bridge
00:11.0 IDE interface: Advanced Micro Devices [AMD] nee ATI IXP SB400 Serial ATA Controller (rev 80)
        Subsystem: Intel Corporation Device d600
        Kernel driver in use: sata_sil
00:12.0 IDE interface: Advanced Micro Devices [AMD] nee ATI IXP SB400 Serial ATA Controller (rev 80)
        Subsystem: Intel Corporation Device d600
        Kernel driver in use: sata_sil
00:13.0 USB controller: Advanced Micro Devices [AMD] nee ATI IXP SB400 USB Host Controller (rev 80)
        Subsystem: Intel Corporation Device d600
        Kernel driver in use: ohci_hcd
00:13.1 USB controller: Advanced Micro Devices [AMD] nee ATI IXP SB400 USB Host Controller (rev 80)
        Subsystem: Intel Corporation Device d600
        Kernel driver in use: ohci_hcd
00:13.2 USB controller: Advanced Micro Devices [AMD] nee ATI IXP SB400 USB2 Host Controller (rev 80)
        Subsystem: Intel Corporation Device d600
        Kernel driver in use: ehci_hcd
00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI IXP SB400 SMBus Controller (rev 81)
        Subsystem: Intel Corporation Device d600
00:14.1 IDE interface: Advanced Micro Devices [AMD] nee ATI IXP SB400 IDE Controller (rev 80)
        Subsystem: Intel Corporation Device d600
        Kernel driver in use: pata_atiixp
00:14.2 Audio device: Advanced Micro Devices [AMD] nee ATI IXP SB4x0 High Definition Audio Controller (rev 01)
        Subsystem: Intel Corporation Device d600
        Kernel driver in use: snd_hda_intel
00:14.3 ISA bridge: Advanced Micro Devices [AMD] nee ATI IXP SB400 PCI-ISA Bridge (rev 80)
        Subsystem: Intel Corporation Device d600
00:14.4 PCI bridge: Advanced Micro Devices [AMD] nee ATI IXP SB400 PCI-PCI Bridge (rev 80)
01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RC410 [Radeon Xpress 200]
        Subsystem: Intel Corporation Device d600
        Kernel driver in use: radeon
02:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
        Subsystem: Intel Corporation Device d600
        Kernel driver in use: 8139too

root@trax:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 003 Device 002: ID 0566:3107 Monterey International Corp. 
Bus 002 Device 002: ID 15d9:0a4c Trust International B.V. USB+PS/2 Optical Mouse
As for the wpa_supplicant process, yesterday I ran it manually just to see the output as I showed in the first post, I couldn't get it to work at bootup but today decided to work on the first try. even on reboot and after doing a usb port change. now both cards are refusing to stop working properly, just to reproduce the problem. annoying. really annoying.

I can't stop thinking this is a buggy piece of hardware, I do had a problem under windoze using the native wireless client (had to use the one bundled in the mini-cdrom to get it working) and now this on three different computers using slackware versions 13.37 and 14

from your answer I must suppose the propper module are inserted automagically by udevd
Code:
root@trax:~# ps -A |grep dev
    9 ?        00:00:00 kdevtmpfs
 1281 ?        00:00:00 devfreq_wq
 1340 ?        00:00:00 udevd
 2791 ?        00:00:00 udevd
 2792 ?        00:00:00 udevd
I'll mark this thread as solved, because I consider the propper solution should be to buy another product instead of this usb wireless card.

again, thanks a lot for your help.

rudy
 
Old 06-09-2013, 03:46 PM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
I didn't recognize that it's an USB-device, therefore I mentioned lspci.

You could execute the lsmod command in order to check which modules are loaded. Put it in a pipe with sort, then you'll get sorted output
Code:
lsmod | sort
You could also take a look at the output of dmesg when inserting the device and check which module is mentioned there.

I don't understand what you mean with "now both cards are refusing to stop working properly".

It would be good if you posted the messages of wpa_supplicant. These are very helpful when troubleshooting.

Markus
 
Old 06-09-2013, 04:50 PM   #5
RudyMartin
LQ Newbie
 
Registered: Nov 2011
Location: Argentina
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: Disabled
sorry about my english, that was meant to be a joke, I was trying to say both cards were working. Also Im sorry for not posting all the information about all the things I did.

after a reboot, using the same usb cards I get

Code:
root@darkstar:/lib# cat /var/log/dmesg |grep ath
[    2.356160] md: multipath personality registered for level -4
[    7.362462] usb 1-4: ath9k_htc: Firmware - ar9271.fw not found
[    7.362563] ath9k_hif_usb: probe of 1-4:1.0 failed with error -22
[    7.362668] usbcore: registered new interface driver ath9k_hif_usb
ar9271.fw wasn't found on /lib/firmware.
downloaded from http://wireless.kernel.org/download/htc_fw/1.3/
renamed it as ar9271.fw

Code:
re: registered new interface driver ath9k_hif_usb
root@darkstar:/lib# tail /var/log/messages       
Jun  9 18:05:06 darkstar dbus-daemon: [system] Rejected send message, 1 matched rules; type="method_call", sender=":1.9" (uid=1000 pid=2638 comm="kdeinit4: kded4 [kdeinit]) interface="org.freedesktop.Hal.Device.SystemPowerManagement" member="SetPowerSave" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=1824 comm="/usr/sbin/hald))
Jun  9 18:15:16 darkstar kernel: [  679.113415] usb 1-4: USB disconnect, address 3
Jun  9 18:15:18 darkstar kernel: [  681.069021] usb 1-4: new high speed USB device using ehci_hcd and address 4
Jun  9 18:15:18 darkstar kernel: [  681.203904] usb 1-4: New USB device found, idVendor=0cf3, idProduct=9271
Jun  9 18:15:18 darkstar kernel: [  681.203909] usb 1-4: New USB device strings: Mfr=16, Product=32, SerialNumber=48
Jun  9 18:15:18 darkstar kernel: [  681.203913] usb 1-4: Product: USB2.0 WLAN
Jun  9 18:15:18 darkstar kernel: [  681.203915] usb 1-4: Manufacturer: ATHEROS
Jun  9 18:15:18 darkstar kernel: [  681.203917] usb 1-4: SerialNumber: 12345
Jun  9 18:15:19 darkstar kernel: [  681.484483] usb 1-4: ath9k_htc: Transferred FW: ar9271.fw, size: 51272
Jun  9 18:15:19 darkstar kernel: [  681.719438] usb 1-4: ath9k_htc: HTC initialized with 33 credits

root@darkstar:/lib# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

vmnet1    no wireless extensions.

dummy0    no wireless extensions.

root@darkstar:/lib# cat /etc/udev/rules.d/70-persistent-net.rules 
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:c0:bc:c6:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

root@darkstar:/lib# lsmod |grep ath
ath9k_htc              38370  0 
mac80211              181473  1 ath9k_htc
ath9k_common            1497  1 ath9k_htc
ath9k_hw              251635  2 ath9k_htc,ath9k_common
ath                    11089  2 ath9k_htc,ath9k_hw
cfg80211              122542  3 ath9k_htc,mac80211,ath
root@darkstar:/lib# ps -A |grep wpa
root@darkstar:/lib#
next step, moved it to another usb port, just in case, same result.

at this point I think it's pointless to run wpa_supplicant because there's no wlanX created yet.

I think the real solution would be to install the drivers from wireless.kernel.org, following the SOP: make, make install

gotta reboot. I will post results in a min.
 
Old 06-09-2013, 06:43 PM   #6
RudyMartin
LQ Newbie
 
Registered: Nov 2011
Location: Argentina
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: Disabled
for the record I got the cards working on another computer using slackware 13.37. Solution involved installing compat-drivers-3.8-1.tar.gz from wireless.kernel.org, doing make && make install as root.

Also had to update /etc/udev/rules.d/70-persistent-net.rules by hand:

and the usual /etc/rc.d/rc.inet1.conf and /etc/wpa_supplicant.conf

by working I mean I can see them in iwconfig, and wpa_supplicant managed to connect to an AP, and I can see the clients from the AP web management.

I still have an issue on why I don't get a IPv4 assigned every time but that's another story.

edit: got dhcp problem fixed by configuring both rc.inet1.conf and wpa_supplicant.conf correctly.

Last edited by RudyMartin; 06-09-2013 at 06:54 PM. Reason: avoid doubleposting
 
Old 06-09-2013, 06:55 PM   #7
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Code:
dhcpcd wlan0
wpa_supplicant doesn't run dhcpcd automatically.

Markus
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compact-wireless driver issue | tl-wn722n | atheros chipset - 9271 floorripper Linux - Hardware 6 03-04-2012 10:12 AM
erratic mouse behavior in 10.3 sirius57 Suse/Novell 2 04-16-2008 09:31 PM
Menudrake: Erratic behavior Jiawen Mandriva 1 09-13-2006 05:33 AM
Erratic Touchpad Behavior usaf_sp Suse/Novell 4 08-16-2006 11:03 AM
erratic mouse behavior loserone Slackware 9 08-31-2004 08:23 PM


All times are GMT -5. The time now is 09:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration