Friday, October 2, 2015

TP-Link TL-WN821N v2 on Raspbian Jessie

Problem -

[  176.283254] usb 1-1.2: new high-speed USB device number 5 using dwc_otg
[  176.431063] usb 1-1.2: New USB device found, idVendor=0cf3, idProduct=1002
[  176.431089] usb 1-1.2: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[  176.431107] usb 1-1.2: Product: USB2.0 WLAN
[  176.431123] usb 1-1.2: Manufacturer: ATHER
[  176.431139] usb 1-1.2: SerialNumber: 12345
[  176.633242] usb 1-1.2: reset high-speed USB device number 5 using dwc_otg
[  176.769865] usbcore: registered new interface driver carl9170
[  176.770955] usb 1-1.2: Direct firmware load for carl9170-1.fw failed with error -2
[  176.770980] usb 1-1.2: firmware not found.

pi@raspberrypi ~/Downloads $ lsusb
...
Bus 001 Device 009: ID 0cf3:1002 Atheros Communications, Inc. TP-Link TL-WN821N v2 802.11n [Atheros AR9170]
...

Solution

pi@raspberrypi ~/Downloads $ sudo aptitude install firmware-linux-free
The following NEW packages will be installed:
  firmware-linux-free
0 packages upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 19.1 kB of archives. After unpacking 90.1 kB will be used.
Get: 1 http://mirrordirector.raspbian.org/raspbian/ jessie/main firmware-linux-free all 3.3 [19.1 kB]
Fetched 19.1 kB in 0s (44.0 kB/s)            
Selecting previously unselected package firmware-linux-free.
(Reading database ... 116795 files and directories currently installed.)
Preparing to unpack .../firmware-linux-free_3.3_all.deb ...
Unpacking firmware-linux-free (3.3) ...
Setting up firmware-linux-free (3.3) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.120) ...
                                       
Result

[14402.310944] usb 1-1.2: new high-speed USB device number 9 using dwc_otg
[14402.459068] usb 1-1.2: New USB device found, idVendor=0cf3, idProduct=1002
[14402.459096] usb 1-1.2: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[14402.459114] usb 1-1.2: Product: USB2.0 WLAN
[14402.459129] usb 1-1.2: Manufacturer: ATHER
[14402.459145] usb 1-1.2: SerialNumber: 12345
[14402.560962] usb 1-1.2: reset high-speed USB device number 9 using dwc_otg
[14402.698503] usb 1-1.2: driver   API: 1.9.7 2012-12-15 [1-1]
[14402.698543] usb 1-1.2: firmware API: 1.9.6 2012-07-07
[14403.050326] ath: EEPROM regdomain: 0x809c
[14403.050351] ath: EEPROM indicates we should expect a country code
[14403.050365] ath: doing EEPROM country->regdmn map search
[14403.050377] ath: country maps to regdmn code: 0x52
[14403.050390] ath: Country alpha2 being used: CN
[14403.050401] ath: Regpair used: 0x52
[14403.080221] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[14403.084478] cfg80211: Calling CRDA to update world regulatory domain
[14403.099237] input: phy1 WPS Button as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/ieee80211/phy1/input2
[14403.099912] usb 1-1.2: Atheros AR9170 is registered as 'phy1'
[14403.559455] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

If necessary
Manually update wpa_supplicant as at the link below -
https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

Oct  2 20:39:21 raspberrypi kernel: [  395.645848] wlan0: authenticate with 00:22:07:37:dd:a7
Oct  2 20:39:21 raspberrypi kernel: [  395.780519] wlan0: send auth to 00:22:07:37:dd:a7 (try 1/3)
Oct  2 20:39:21 raspberrypi kernel: [  395.780780] cfg80211: Calling CRDA to update world regulatory domain
Oct  2 20:39:21 raspberrypi kernel: [  395.782417] wlan0: authenticated
Oct  2 20:39:21 raspberrypi kernel: [  395.786584] wlan0: associate with 00:22:07:37:dd:a7 (try 1/3)
Oct  2 20:39:21 raspberrypi kernel: [  395.790141] wlan0: RX AssocResp from 00:22:07:37:dd:a7 (capab=0x411 status=0 aid=7)
Oct  2 20:39:21 raspberrypi kernel: [  395.799474] wlan0: associated
Oct  2 20:39:21 raspberrypi kernel: [  395.799637] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready


1 comment:

Thomas Trueten said...

Thaks 4 the hint. I'm just reactivating an old Raspberry with this W-Lan Stick, which I've found deep in a box full of odds and ends. Now it's running wild with OctoPi