ar9170 atheros driver install (tl-wn821n usb AR9170+AR9102)

Home Page Forums Network Management ZeroShell ar9170 atheros driver install (tl-wn821n usb AR9170+AR9102)

This topic contains 6 replies, has 0 voices, and was last updated by  thistleknot 8 years, 7 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #42596

    thistleknot
    Member

    So I’ve had this project of mine for the longest time.

    Get my wifi usb to work in zeroshell.

    I’ve been doing a lot of homework.

    First I was lead down the path of wifi support added with madwifi, but that was in 07, yet when I boot with zeroshell, it doesn’t find any athero’s chipsets of notice.
    http://www.zeroshell.net/eng/forum/viewtopic.php?t=479

    Anyways, the problem seems to be chipset support in the kernel.

    This is what I’ve found digging around.

    To load usb nic
    http://www.zeroshell.net/eng/forum/viewtopic.php?t=1530
    told me to insmod a .ko file associated with the driver

    So I looked for a matching .ko file, of which I did not find.

    I ran into this site when looking for how to load drivers
    http://www.zeroshell.net/eng/forum/viewtopic.php?p=5479&sid=ff4e541b1a874e91348cf0e0a26b5447

    Code:
    lsusb

    then check if the corresponding module is loaded.
    Code:
    lsmod

    then check if the interface is working
    Code:
    ifconfig -a

    If you cannot find something
    Code:
    dmesg | grep ETH

    I found this device id for my device
    0cf3:1002

    Then I found a matching ko file on this site
    http://forums.opensuse.org/english/get-help-here/wireless/423886-tp-link-tl-wn821n-3.html

    /lib/modules/2.6.27.29-0.1-default/updates/drivers/net/wireless/ar9170/ar9170.ko

    Course it uses a newer kernel. I couldn’t find the file itself, but I did some more research.

    led me to this site
    http://linuxwireless.org/en/users/Drivers/ar9170

    Which has instructions on loading the drivers with the kernel that beta13 uses , but I’m a bit lost on the header instructions.

    Please be very sure you have your kernel headers installed before reporting any sort of build issues with this package. This usually will mean having this symlink point to a valid directory with kernel headers in it:

    /lib/modules/`uname -r`/build

    Also found out how debian loads it.
    http://wiki.debian.org/ar9170usb

    Anyone know using the last two url’s how I might get it accomplished in zeroshell?

    Thanks a bunch!

    I did some more research
    I kept running out of space when I was trying to wget packages.

    Realized I’m in read only environment
    So it’s a huge long process to get all this working

    To install headers
    I have to get a writeable copy of zeroshell
    http://www.zeroshell.net/eng/forum/viewtopic.php?t=210

    Then I have to follow this pdf to setup a developer environment
    http://comm7777.t35.com/developer.kit.pdf

    Then I can load headers
    http://www.linux.com/archive/forums/topic/3317

    Then I can probably setup the wifi drivers.

    #50946

    thistleknot
    Member

    just to let you guys know. I’ve finished setting up the environment.

    I basically did everything up to the point of actually installing the drivers.

    I’ll fill you guys in. It took me a week to figure out the writeable copy of zeroshell, learning how to mount a partition in fstab and setting up paths in the /etc/profile, but now I’m pretty much there.

    also, another possible way to get wifi n support is by having a kernel that has the modules already supported, so update the kernel.

    http://www.zeroshell.net/eng/forum/viewtopic.php?t=1911

    #50947

    thistleknot
    Member

    apt-get needed more space on / 🙁

    Maybe I can download the precompiled kernel and work with that to build my environment.

    #50948

    thistleknot
    Member

    well, I got zeroshell to boot from a hard drive following the instructions on how to make a writeable copy.

    I was able to do it without using a ramdrive. I had enough free space to extract apt.bin; however, on subsequent reboot, it wouldn’t boot, got a message about a bunch of files not found in /etc.

    Maybe my hd is corrupt. will try again with an ssd flash card I have.

    To make matters worse, my profile got corrupt.

    So in theory, if I get it up and running I should be able to get those linux drivers (cross fingers), and then compile the compat wireless drivers.

    #50949

    thistleknot
    Member

    openwrt has a x86 version. It’s a bit of a pain to get to work right from the getgo, but it has a webgui. It’s not like zeroshell, you do have to use the shell prompt, but not necessarily.

    This distribution already has support for some linux wifi n drivers, primarily the one in this thread, but also the 5008 athero’s chipset.

    I haven’t gotten it to work with x86 yet, but I have seen it working on my wnr854t router.

    Installing packages is pretty easy
    opkg install http:\www.alsjdflksajdflkjdsaflkjdsa.opk is how you install stuff.

    be wary, don’t uninstall busybox (tried to do so to install bash), and when you do, all commands seem to not work anymore (except opkg), so I advice you to not use opkg install on all your packages, at the very least have busybox’s opk on your drive before uninstalling it

    Lastly.

    If you want an easy working copy of openwrt backfire on your hd.

    I had to do these steps.
    (I don’t know the parameters to dd the ext-2-combined file, so I took the root and extracted it manually to a formatted partition (using a partition tool), and then installed grub via zeroshell (grub install –root-directory /hd /dev/hda), then put the vmlinuz file in the /boot/ dir and then used the grub console to boot to the openwrt.

    I had to find what nic openwrt used as default to http into, but I was able to use the webgui from there to get stuff done, but you have to telnet in to get it to reboot (i.e. command reboot).

    #50950

    thistleknot
    Member

    to be honest, with openwrt on my wnr854t, my wifi n is quite fast, but I’d rather prefer not to have my wifi on an access point.

    Anyways. I tried openwrt. I figured the first try it didn’t work after installing all the packages I thought it needed. Then I figured I’d install all the packages that were different from the x86 package (btw use physdiskwrite to install openwrt from the .img.gz file to hd, it doesn’t ask for anything other than the image, and it booted right away). It showed a wireless adapter, but I never saw a signal from it, and worse, it never gave me an encryption method different than WEP, which led me to believe it wasn’t working.

    Fuck. Why the hell is wifi n so hard on linux routers? I mean, it’s possible, why can’t i get it on an x86 environment?

    #50951

    ppalias
    Member

    Just to answer on your last sentense…
    All the effort to make devices work in linux is rarely supported by the manufacturer. Usually it is users and hackers who make things work in linux and sometimes they don’t achieve it so well. If we set aside Atheros which has good support in linux, I don’t trust other vendors.

    #50952

    thistleknot
    Member

    It was the antenna’s

    Here’s a complete list of packages I used for openwrt

    I used the default packages that came with the x86-combined-ext2 set

    and the following

    had to add
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/libgcc_4.1.2-43.3_x86.ipk
    wireless-tools 29-4

    for wap
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/hostap-utils_0.4.7-1_x86.ipk
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/hostapd-mini_20100418-2_x86.ipk
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/crda_1.1.0-2_x86.ipk

    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/hostap-utils_0.4.7-1_x86.ipk
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/kmod-hostap-cs_2.6.32.16-x86-1_x86.ipk
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/kmod-pcmcia-core_2.6.32.16-1_x86.ipk
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/kmod-hostap-pci_2.6.32.16-x86-1_x86.ipk
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/kmod-hostap-plx_2.6.32.16-x86-1_x86.ipk
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/kmod-hostap_2.6.32.16-x86-1_x86.ipk
    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/kmod-lib80211_2.6.32.16-1_x86.ipk

    http://downloads.openwrt.org/backfire/10.03.1-rc3/x86/packages/hostapd-utils_20100418-2_x86.ipk

    and voila, wifi n on my desktop (but not with this usb adapter, I used an r5008 chipset).

    Hope that helps some zeroshell people who are frustrated with no wifi n! I tested wifi n with dslreports.

    Ping still fluctuated the same with my wnr854t vs the desktop (I was hoping the desktop with it’s 3ghz proc would help prevent ping fluctuations, so I guess it’s the wifi card that is getting overloaded).

    I couldn’t get a fair read off of dslreports java test because my la server is acting funky. But hoo fucking rah guys. Got wifi n with openwrt!

    Update:
    Tested with dslreports. I think I’m getting lower speeds with the card in the desktop than when I had it in my openwrt wnr854t router. With dslreports java speed test I was getting around 25Mb/s, now I’m getting about 10-15.

    I even moved the computer to expose the antenna’s more, and still the same thing.

    update 2:
    I guess my speeds were limited by the time of day.
    I was able to get 23Mb down with wifi. Before I was able to get 25Mb down. However with lan I was able to get 29, and I got 28 today. So i figure there about the same right now (plus my antenna’s not as exposed as it was before).

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.