You are not logged in.

#1 2009-09-23 11:39:05

rubberdown
Member
Registered: 2009-09-16
Posts: 8

[solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

Hi all,

I have a TP-LINK TL-WN821N usb Wireless adapter which I am trying to get working via my recently done Arch system. Read the Wireless Setup @Wiki I have followed instructions to install wireless-compat (without problems) Having done the above I thought I could get this going! but not! smile I am hoping someone might be able to shed some light on this...? Thanks!!

So after the Wireless-compat install I rebooted but wlan0 and dmesg did not show anything useful with ath9k.

So I did :

modprobe ath9k

which showed me some good signs such as:

dmesg:

...
...
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
usb 1-6: new high speed USB device using ehci_hcd and address 2
usb 1-6: configuration #1 chosen from 1 choice
hub 1-6:1.0: USB hub found
hub 1-6:1.0: 4 ports detected
usb 1-7: new high speed USB device using ehci_hcd and address 3
Adding 265064k swap on /dev/sda2.  Priority:-1 extents:1 across:265064k 
usb 1-7: configuration #1 chosen from 1 choice
usb 1-6.2: new low speed USB device using ehci_hcd and address 4
usb 1-6.2: configuration #1 chosen from 1 choice
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
usb 1-6.3: new low speed USB device using ehci_hcd and address 5
input: Belkin Corporation Flip CC as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.2/1-6.2:1.0/input/input4
belkin 0003:050D:3201.0001: input,hiddev0,hidraw0: USB HID v1.10 Device [Belkin Corporation Flip CC] on usb-0000:00:1d.7-6.2/input0
usb 1-6.3: configuration #1 chosen from 1 choice
input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.3/1-6.3:1.0/input/input5
generic-usb 0003:046D:C018.0002: input,hidraw1: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1d.7-6.3/input0
usb 1-6.4: new low speed USB device using ehci_hcd and address 6
usb 1-6.4: configuration #1 chosen from 1 choice
input: BTC USB Multimedia Keyboard as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.4/1-6.4:1.0/input/input6
generic-usb 0003:046D:C312.0003: input,hidraw2: USB HID v1.10 Keyboard [BTC USB Multimedia Keyboard] on usb-0000:00:1d.7-6.4/input0
input: BTC USB Multimedia Keyboard as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.4/1-6.4:1.1/input/input7
generic-usb 0003:046D:C312.0004: input,hiddev1,hidraw3: USB HID v1.10 Device [BTC USB Multimedia Keyboard] on usb-0000:00:1d.7-6.4/input1
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
    (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US

then lsmod:

odule                  Size  Used by
ath9k                 320340  0 
mac80211              187232  1 ath9k
rfkill                 10640  1 ath9k
cfg80211               67780  2 ath9k,mac80211
led_class               3976  1 ath9k
hid_belkin              2212  0 
usbhid                 40608  0 
hid                    42496  2 hid_belkin,usbhid
snd_seq_dummy           2696  0 
snd_seq_oss            31168  0

lsusb:

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 046d:c312 Logitech, Inc. DeLuxe 250 Keyboard
Bus 001 Device 005: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 004: ID 050d:3201 Belkin Components F1DF102U/F1DG102U Flip KVM
Bus 001 Device 003: ID 0cf3:1002 Atheros Communications, Inc. 
Bus 001 Device 002: ID 0424:2524 Standard Microsystems Corp. USB MultiSwitch Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

iwlist scan:

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:08:C7:EB:2D:EB  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 :/
          RX bytes:600 (600.0 b)  TX bytes:600 (600.0 b)

Last edited by rubberdown (2009-09-29 09:51:48)

Offline

#2 2009-09-23 14:03:30

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,223
Website

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

Is wlan0 in your INTERFACES=() in /etc/rc.conf or did you set up a profile for wlan0 using netcfg?

If not: you have to bring it up manually with
# ifconfig wlan0 up

Offline

#3 2009-09-23 19:07:23

rubberdown
Member
Registered: 2009-09-16
Posts: 8

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

Hi zenlord,

Yes, I did setup a single file under /etc/rc.network and configured /etc/rc.conf with:

NETWORK=(xfilename) 
DAEMONS=(syslog-ng hal netfs crond net-profiles network)

rc.network has:

CONNECTION="wireless"
DESCRIPTION="a simple open wireless connection"
INTERFACE="wlan0"
ESSID="XXXXX"
IP="dhcp"

if i do ifconfig wlan0 up output is:
wlan0: unknown interface: No such device

Hope having netcfg at startup is not causing a problem? Thanks

Offline

#4 2009-09-24 10:55:39

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,223
Website

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

I don't know if it is related to your problem, but you should chose either 'net-profiles' or 'network'. Loading both could have unwanted collisions, but I doubt it is causing your problem.

Are you sure your device is named 'wlan0'? Atheros chipsets are sometimes named 'ath?', where ? is the number, probably '0'. Do your logs mention eth, ath, wlan?

Zl.

Offline

#5 2009-09-24 11:55:00

thn81
Member
Registered: 2009-08-27
Posts: 88

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

The driver for your Atheros USB stick is called ar9170usb not ath9k. However, the WN821N is not supported yet (using compat-wireless-2.6.30). You can try and apply this patch

diff -uNr compat-wireless-2.6.30.orig/drivers/net/wireless/ar9170/usb.c compat-wireless-2.6.30/drivers/net/wireless/ar9170/usb.c
--- compat-wireless-2.6.30.orig/drivers/net/wireless/ar9170/usb.c       2009-06-11 02:30:33.000000000 +0200
+++ compat-wireless-2.6.30/drivers/net/wireless/ar9170/usb.c    2009-09-24 13:44:16.000000000 +0200
@@ -59,6 +59,8 @@
        { USB_DEVICE(0x0cf3, 0x9170) },
        /* Atheros TG121N */
        { USB_DEVICE(0x0cf3, 0x1001) },
+       /* TP-Link WN821N */
+       { USB_DEVICE(0x0cf3, 0x1002) },
        /* Cace Airpcap NX */
        { USB_DEVICE(0xcace, 0x0300) },
        /* D-Link DWA 160A */

after unpacking the compat-wireless package and then continue compiling and installing the driver as you did before. Maybe you are lucky and the patched driver will work for you. Please don't hit me too hard if it doesn't work...

thn81

Offline

#6 2009-09-25 21:39:58

rubberdown
Member
Registered: 2009-09-16
Posts: 8

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

zenlord wrote:

I don't know if it is related to your problem, but you should chose either 'net-profiles' or 'network'. Loading both could have unwanted collisions, but I doubt it is causing your problem.

Are you sure your device is named 'wlan0'? Atheros chipsets are sometimes named 'ath?', where ? is the number, probably '0'. Do your logs mention eth, ath, wlan?

Zl.

Hi Zenlord, I haven't found any reference to ath0 using "dmesg | grep ath0" and doing "ifconfig ath0 up" gives "ath0: unkown interface: No such device" what are the other logs that I could check?

Tried disabling network and leaving net-profiles on but that did not do anything as you suspected.




thn81 wrote:

The driver for your Atheros USB stick is called ar9170usb not ath9k. However, the WN821N is not supported yet (using compat-wireless-2.6.30). You can try and apply this patch
Code:

diff -uNr compat-wireless-2.6.30.orig/drivers/net/wireless/ar9170/usb.c compat-wireless-2.6.30/drivers/net/wireless/ar9170/usb.c
--- compat-wireless-2.6.30.orig/drivers/net/wireless/ar9170/usb.c       2009-06-11 02:30:33.000000000 +0200
+++ compat-wireless-2.6.30/drivers/net/wireless/ar9170/usb.c    2009-09-24 13:44:16.000000000 +0200
@@ -59,6 +59,8 @@
        { USB_DEVICE(0x0cf3, 0x9170) },
        /* Atheros TG121N */
        { USB_DEVICE(0x0cf3, 0x1001) },
+       /* TP-Link WN821N */
+       { USB_DEVICE(0x0cf3, 0x1002) },
        /* Cace Airpcap NX */
        { USB_DEVICE(0xcace, 0x0300) },
        /* D-Link DWA 160A */

after unpacking the compat-wireless package and then continue compiling and installing the driver as you did before. Maybe you are lucky and the patched driver will work for you. Please don't hit me too hard if it doesn't work...

thn81

Thanks thn81, however how do I run your code? (bit of a newbie i am afraid)
I have already make, install the package so its in my system. What steps should I follow?

By the way reading the code: what is meant by having path compat-wireless-2.6.30.orig/drivers.....  ? Am I supposed to change this in someway?

Thanks a lot!

Offline

#7 2009-09-26 16:17:45

thn81
Member
Registered: 2009-08-27
Posts: 88

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

rubberdown wrote:

however how do I run your code?

1. Copy the contents of the "Code" box (starting with the "diff..." line) in my last post to a file and name it "wn821n.patch"
2. Get the compat-wireless-2.6.30.tar.bz2 package from wireless.kernel.org (you should already have it)
3. Open a terminal, unpack as described on http://wireless.kernel.org/en/users/Download, section "Building and installing"
4. Copy the wn821n.patch file into the compat-wireless-2.6.30 directory and change into that directory.
5. Use the following command: "patch -p1 < ./wn821n.patch" (without quotes)
6. Now continue with compiling and installing the driver just as you did before in your first try (make, sudo make install...)
Good luck.

Offline

#8 2009-09-27 09:50:40

rubberdown
Member
Registered: 2009-09-16
Posts: 8

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

Unfortunately that didn't work.
When I ran the code (as instructed) gave output :

bash-4.0# patch -p1 < ./wn821n.patch 
patching file drivers/net/wireless/ar9170/usb.c
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 59.
1 out of 1 hunk FAILED -- saving rejects to file drivers/net/wireless/ar9170/usb.c.rej

then I still ran the make, make install, make unload and modprobe ath9k (also tried modprobe ar9170usb) but neither helped. I guess it just does not work with TL-WN821N.

I will try a few other distros to see if they might be able to pick it up(?)

Thanks!

Offline

#9 2009-09-27 12:21:20

thn81
Member
Registered: 2009-08-27
Posts: 88

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

Unfortunately that didn't work.

Yes, you're right, sorry. Looks like the forum software here changed the format of the patch, so it doesn't match the original file anymore. (I think it replaced tabs with spaces...)
I uploaded the correct file to http://filebin.ca/kkwywc/wn821n.patch.
Sorry again for confusing you.

Offline

#10 2009-09-29 08:15:43

rubberdown
Member
Registered: 2009-09-16
Posts: 8

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

Apologies for the delay!
I tried the file that you had posted, thn81. It went through without error - and i continued to install compat-wireless. Rebooted the machine and did :

modeprobe ar9170usb

Dmesg gave me the following:

usbcore: registered new interface driver hiddev
input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.3/1-6.3:1.0/input/input4
generic-usb 0003:046D:C018.0002: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1d.7-6.3/input0
input: BTC USB Multimedia Keyboard as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.4/1-6.4:1.0/input/input5
generic-usb 0003:046D:C312.0003: input,hidraw1: USB HID v1.10 Keyboard [BTC USB Multimedia Keyboard] on usb-0000:00:1d.7-6.4/input0
input: BTC USB Multimedia Keyboard as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.4/1-6.4:1.1/input/input6
generic-usb 0003:046D:C312.0004: input,hiddev0,hidraw2: USB HID v1.10 Device [BTC USB Multimedia Keyboard] on usb-0000:00:1d.7-6.4/input1
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
nvidia 0000:01:00.0: setting latency timer to 64
NVRM: loading NVIDIA UNIX x86 Kernel Module  185.18.36  Fri Aug 14 17:18:04 PDT 2009
input: Belkin Corporation Flip CC as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.2/1-6.2:1.0/input/input7
belkin 0003:050D:3201.0001: input,hiddev1,hidraw3: USB HID v1.10 Device [Belkin Corporation Flip CC] on usb-0000:00:1d.7-6.2/input0
intel8x0_measure_ac97_clock: measured 53767 usecs (2591 samples)
intel8x0: clocking to 48000
Adding 265064k swap on /dev/sda2.  Priority:-1 extents:1 across:265064k 
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
    (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
usb 1-7: reset high speed USB device using ehci_hcd and address 3
usb 1-7: firmware: requesting ar9170-1.fw
usb 1-7: file with init values not found.
ar9170usb: probe of 1-7:1.0 failed with error -2
usbcore: registered new interface driver ar9170usb

Ifconfig did not have a wlan0 or ath0 etc.

According to dmesg it seems the driver failed to register properly. Thats too bad I guess as it almost seemed to have worked.

Thanks for your help again thn81!

Offline

#11 2009-09-29 09:29:01

thn81
Member
Registered: 2009-08-27
Posts: 88

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

Okay, we're getting closer...

usb 1-7: firmware: requesting ar9170-1.fw
usb 1-7: file with init values not found.

Looks like the driver needs a firmware file to work. It should be in /lib/firmware. Please read this http://linuxwireless.org/en/users/Drivers/ar9170 on how to get and to install it.

Offline

#12 2009-09-29 09:50:45

rubberdown
Member
Registered: 2009-09-16
Posts: 8

Re: [solved - thn81] ath9k via wireless-compat but wlan0 is not coming up

thn81 wrote:

Looks like the driver needs a firmware file to work. It should be in /lib/firmware. Please read this http://linuxwireless.org/en/users/Drivers/ar9170 on how to get and to install it.

That did the trick, thn81!!

Thanks so much!

Offline

Board footer

Powered by FluxBB