98 notes &
dockstar + TL-WN821N

Until now I was using Linksys 802.11g wi-fi usb stick for my Dockstar.
The idea I had was to use Dockstar as a media storage server with ability to watch movies straight from the server. But with 1-2MB/s upload/download speeds all I got was a buffering player window every couple of minutes.
So I spend some time searching for a 802.11n alternative on ebay and bought TP-LINK TL-WN821N for £11.
It did not work out of the box but with a little help from Google I managed to get it up and running.
First, I tried to follow instructions from http://www.mikrocontroller.net/topic/193795
but it turned out that I need some newer components and other wifi firmware.
Ok, I’ll just paste the short version of setup, if you need more info go to the link I mentioned above:
apt-get install wpasupplicant iw wireless-tools
apt-get install hwinfo usbutils
apt-get install linux-headers-2.6.32-5-kirkwood
cd /lib/firmware
wget http://wireless.kernel.org/download/htc_fw/1.3/htc_7010.fw
cd /usr/src
wget http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2011-07-01.tar.bz2
tar jxvf compat-wireless-2011-07-01.tar.bz2
cd compat-wireless-2011-07-01
./scripts/driver-select ath9k_htc
make
make install
reboot
After dockstar restarts, ssh to it again and execute
dmesg
search for usb messages about Atheros device and that it was registered.
[ 4.476844] usb 1-1.4: new high speed USB device using orion-ehci and address 6
[ 4.606509] usb 1-1.4: New USB device found, idVendor=0cf3, idProduct=7015
[ 4.613426] usb 1-1.4: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[ 4.621043] usb 1-1.4: Product: UB95
[ 4.624637] usb 1-1.4: Manufacturer: ATHEROS
[ 4.629040] usb 1-1.4: SerialNumber: 12345
[ 4.634424] usb 1-1.4: configuration #1 chosen from 1 choice
[ 14.185416] Compat-wireless backport release: compat-wireless-2011-06-28-2-g89a736d
[ 14.193235] Backport based on linux-next.git next-20110701
[ 14.394350] cfg80211: Calling CRDA to update world regulatory domain
[ 14.872681] usb 1-1.4: ath9k_htc: Transferred FW: htc_7010.fw, size: 72992
[ 14.934148] ath9k_htc 1-1.4:1.0: ath9k_htc: HTC initialized with 45 credits
[ 15.095141] ath9k_htc 1-1.4:1.0: ath9k_htc: FW Version: 1.3
[ 15.100764] ath: EEPROM regdomain: 0x809c
[ 15.100771] ath: EEPROM indicates we should expect a country code
[ 15.100781] ath: doing EEPROM country->regdmn map search
[ 15.100789] ath: country maps to regdmn code: 0x52
[ 15.100798] ath: Country alpha2 being used: CN
[ 15.100805] ath: Regpair used: 0x52
[ 15.118507] ieee80211 phy0: Atheros AR9287 Rev:2
[ 15.124269] Registered led device: ath9k_htc-phy0
[ 15.129061] usb 1-1.4: ath9k_htc: USB layer initialized
[ 15.134380] usbcore: registered new interface driver ath9k_htc
[ 15.180192] udev[191]: renamed network interface wlan0 to wlan1
Execute
iwconfig
you should see wlan0 in the list.
Modify /etc/network/interfaces file with something like this:
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
wpa-ssid ENTER_YOUR_SSID
wpa-psk ENTER_YOUR_PASSWORD
and execute commands bellow to start wifi.
ifdown wlan0
ifup wlan0
