Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

Need help with peripherals or devices?
Post Reply
Message
Author
pygy
Posts: 9
Joined: 2011-05-17 20:42

Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#1 Post by pygy »

Hello,

I'm trying to get a TP-Link TL-WN821N WiFi USB dongle to work. I bought it because I thought it was based on the Atheros ar9170 chip (which is supported in Squeeze), but I've since learnt that it was based on the ar9271, which is only supported from kernel v2.6.36 on.

I've read several threads on the subject, but I'm still confused about what I should exactly do. Since it is stuff that can potentially make the partition unbootable, I prefer to ask rather than to tinker.

I've read that upgrading the kernel would do the trick. The Liquorix kernel is especially recommended in one of those threads. However Liquorix only supports Sid and Testing. Apparently, you still can install it by fetching gcc 4.5 from the Sid repository, then install it... I'm a bit wary of screwing things up though...

Another route appears to be the compat-wireless tool. I've downloaded the latest 2.6.32 release of compat-wireless (see here), but there's no reference to the ar9271 in the README. Is it appropriate nevertheless (they refer to an online list of supported drivers that was updated after the release... not sure what to make of it)? Otherwise, can I install the so-called "bleeding-edge compat-wireless" with a 2.6.32 kernel?

BTW, I know that I'll also need the ath9k_htc firmware to be installed.

Regards,
--Pygy

Edit: maybe this discussion should be moved to "hardware"?

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#2 Post by bw123 »

Code: Select all

Otherwise, can I install the so-called "bleeding-edge compat-wireless" with a 2.6.32 kernel?
Why don't you try the compat-wireless driver first and then do the kernel upgrade if that doesn't work? I use a compat wireless daily build from 05-05-2011 on 2.6.32 kernel for my rtl8187b it works fine.
resigned by AI ChatGPT

pygy
Posts: 9
Joined: 2011-05-17 20:42

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#3 Post by pygy »

I've tried the last version (2011-05-16). Makes builds it, but troubles comes right after that:
http://wireless.kernel.org/en/users/Download#Building_and_installing wrote:Unload:

Since you might be replacing your old mac80211 and bluetooth drivers you should first try to unload all existing mac80211 and related drivers. Note also that broadcom, zydas, and atheros devices have old legacy drivers which you need to be sure are removed first. We provide a mechanism to unload all old and legacy drivers first so you should run to be sure:

Code: Select all

sudo make unload
Here's what I get (although I guess that a reboot would solve this).

Code: Select all

# make unload
Stoping bluetooth service..
Stopping bluetooth: bluetoothd.
bluetooth is running.
Unloading bnep...
FATAL: Module bnep is in use.
Unloading rfcomm...
Unloading sco...
FATAL: Module sco is in use.
Unloading bluetooth...
FATAL: Module bluetooth is in use.
Unloading l2cap...
FATAL: Module l2cap is in use.
The real problem is this:

Code: Select all

# make install
FATAL: Could not open /lib/modules/2.6.32-5-686/modules.dep.temp for writing: Read-only file system
What can I do about this? There are 0 Google results...

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#4 Post by bw123 »

kernel problem put you into read only for some reason? check dmesg for why
https://duckduckgo.com/html/?q=Read-only+file+system
resigned by AI ChatGPT

pygy
Posts: 9
Joined: 2011-05-17 20:42

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#5 Post by pygy »

Thanks for your answer. I know what read-only means, but I had never encountered the issue in Linux, and I didn't know that it would give a file-specific rather than partition or mount point-specific message.

Here's the relevant dmesg output (each of these line is followed by a notice that the FS has been remounted in read-only mode). Could the partition be damaged?

sda1 is an ext4 partition, could it be related?

Code: Select all

[16768.302526] EXT2-fs error (device sda1): ext2_check_page: bad entry in directory #82721: : unaligned directory entry - offset=0, inode=1409834694, rec_len=11105, name_len=168
[16768.302549] EXT2-fs error (device sda1): ext2_readdir: bad page in #82721
[16768.303284] EXT2-fs error (device sda1): ext2_check_page: bad entry in directory #82722: : unaligned directory entry - offset=0, inode=1409834694, rec_len=11105, name_len=168
[16768.303303] EXT2-fs error (device sda1): ext2_readdir: bad page in #82722

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#6 Post by bw123 »

pygy wrote: Here's the relevant dmesg output (each of these line is followed by a notice that the FS has been remounted in read-only mode).
yeah I think that has to be cleared up. If you can't boot without that problem you might want to hold up on doing anything at all, is it a new install? un tar any strange files lately?

filesystem error like that is above my pay grade, but I think the way it works is fsck runs at boot time before root is mounted and remounts read only on errors.
resigned by AI ChatGPT

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#7 Post by kedaha »

pygy wrote:Hello,

I'm trying to get a TP-Link TL-WN821N WiFi USB dongle to work. I bought it because I thought it was based on the Atheros ar9170 chip (which is supported in Squeeze), but I've since learnt that it was based on the ar9271, which is only supported from kernel v2.6.36 on.
Hi pygy,
I recently got a similar TL-WN722N WIFI USB dongle, which also uses the ar9271.fw to work by upgrading to the appropriate Debian Backports kernel. If you haven't done this, just do:

Code: Select all

# echo "deb http://backports.debian.org/debian-backports squeeze-backports main" >> /etc/apt/sources.list && aptitude update
I upgraded from the Squeeze standard 2.6.32-5-amd64 kernel to the 2.6.38-bpo.2-amd64 kernel.
You may find it easier to do this using Synaptic when you should, under Settings> Preferences> Distribution> select, for the upgrade, Prefer versions from squeeze backports.
Also do:

Code: Select all

# aptitude install firmware-atheros
Then you will find it starts working next time you reboot! :)
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

casey972oo
Posts: 12
Joined: 2011-05-19 06:34

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#8 Post by casey972oo »

Hi there ! ... how about ' usb-modeswitch ' ? ...

http://draisberghof.de/usb_modeswitch

http://sakis.tel4u.gr/blog/sakis3g

casey972oo

.

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#9 Post by kedaha »

pygy wrote:Hello,
I've read several threads on the subject, but I'm still confused about what I should exactly do. Since it is stuff that can potentially make the partition unbootable, I prefer to ask rather than to tinker.

I've read that upgrading the kernel would do the trick. The Liquorix kernel is especially recommended in one of those threads. However Liquorix only supports Sid and Testing. Apparently, you still can install it by fetching gcc 4.5 from the Sid repository, then install it... I'm a bit wary of screwing things up though...

Another route appears to be the compat-wireless tool. I've downloaded the latest 2.6.32 release of compat-wireless (see here), but there's no reference to the ar9271 in the README. Is it appropriate nevertheless (they refer to an online list of supported drivers that was updated after the release... not sure what to make of it)? Otherwise, can I install the so-called "bleeding-edge compat-wireless" with a 2.6.32 kernel?

BTW, I know that I'll also need the ath9k_htc firmware to be installed.
I recommend you use the backports kernel as in my previous reply but I'd just like to comment that it is true that a mistake could make the 2.6.32-5 kernel, temporarily, unbootable.
I haven't had time to look at all the details but, on my system, after upgrading to the Debian Backports kernel and installing the atheros-firmware package from the stable non-free repository, the following command shows the ar9271.fw has been copied there, not the ath9k_htc firmware.

Code: Select all

# cd && ls /lib/firmware
I tried the other route: I downloaded the compat-wireless-2.6.tar.bz2 tarball, extracted it and made a compat-wireless-2011-05_16-1_amd64.deb package but found that, after copying htc_9271.fw to /lib/firmware, the system was unbootable due to kernel panic. However, I simply used a Debian live dvd in rescue mode and removed the htc_9271.fw and home-made compat-wireless deb package and was able to reboot normally.
So I'm curious to know if anyone reading this thread has been able to enable the so-called "bleeding-edge compat-wireless" with a 2.6.32-5 kernel?
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#10 Post by bw123 »

i'm using one from compat-wireless-2011-05-05.tar.bz2 for my little netgear usb, it works good. installs funny though, has several other files that work with it. I hacked the other stuff out that doesn't go with my adapter, I used the included scripts/.driver-select to build only the rtl818x, make, then make install to get it where it is. I didn't know you could build a deb,

Code: Select all

# modinfo rtl8187.ko
depends:        mac80211,eeprom_93cx6,led-class,cfg80211,usbcore,compat
vermagic:       2.6.32-5-amd64 SMP mod_unload modversions 
bw@debian:/lib/modules/2.6.32-5-amd64/updates
├── compat
│   ├── compat_firmware_class.ko
│   └── compat.ko
├── drivers
│   ├── misc
│   │   └── eeprom
│   │   └── eeprom_93cx6.ko
│   └── net
│   └── wireless
│   └── rtl818x
│   └── rtl8187
│   └── rtl8187.ko
└── net
└── net
├── mac80211
│   └── mac80211.ko
└── wireless
└── cfg80211.ko
resigned by AI ChatGPT

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#11 Post by kedaha »

bw123 wrote:i'm using one from compat-wireless-2011-05-05.tar.bz2 for my little netgear usb, it works good. installs funny though, has several other files that work with it. I hacked the other stuff out that doesn't go with my adapter, I used the included scripts/.driver-select to build only the rtl818x, make, then make install to get it where it is. I didn't know you could build a deb.
After using scripts/.driver-selec I used checkinstall, available in the main repository, to build a deb rather than the make install routine. Better, after make to use the su -c 'checkinstall -D --install=no' command which I found in Soul Singin's topic rather than just checkinstall: this way the deb doesn't get installed automatically.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Wifi: ar9271 in Squeeze: compat-wireless or new kernel?

#12 Post by bw123 »

I tried that technique with a newer file:

compat-wireless-2011-05-16.tar.bz2

I think I am going to try the practice deb project in that thread you linked and get the hang of it a little better, thanks.

The newer compat-wireless-2011-05-24-p.tar.bz2 is working fine, not sure why there are two versions (05-24 and 05-24-p) anyway?
resigned by AI ChatGPT

Post Reply