Page 1 of 1

[SOLVED] Startup Script to Configure Alfa AWUS036H Driver

Posted: Tue Mar 27, 2012 8:25 pm
by matthias2223
Hello, I'm a recent convert to the world of Linux and am liking it so far. I'm currently using Linux Mint 12 on a Dell Inspiron E1505. Most things worked well right out of the box except for my internet connection.

I had slow connection speeds and constant disconnects with my Alfa AWUS036H USB Network Adapter (uses rtl8187 driver) as compared to when I was running Windows. I disabled my onboard wireless adapter in my BIOS setting so that it wouldn't interfere with the Alfa Adapter.

I found a page on ArchLinux.org that explained that my problem was in some of the driver settings, namely the rate, rts, and fragmentation thresholds. When I entered the code they suggested my connection sped back up and the disconnects stopped. So far it seems to have fixed my network issues. The only remaining problem is that I have to reenter these commands every time after I reboot.

My question is how can I make my system run these commands automatically at startup so that I won't have to continue doing it manually?

If it helps, these are the commands I give:

sudo iwconfig wlan0 rate 5.5M fixed
sudo iwconfig wlan0 frag 2346
sudo iwconfig wlan0 rts 2347

Thanks

Re: Startup Script to Configure Alfa AWUS036H Adapter's Driv

Posted: Wed Mar 28, 2012 5:57 am
by remoulder
Try the method suggested here

Re: Startup Script to Configure Alfa AWUS036H Adapter's Driv

Posted: Wed Mar 28, 2012 5:59 am
by AlbertP
You can put the lines in the /etc/rc.local file before the exit 0 line.

Code: Select all

gksudo gedit /etc/rc.local

Re: Startup Script to Configure Alfa AWUS036H Adapter's Driv

Posted: Wed Mar 28, 2012 7:52 pm
by matthias2223
Thanks Albert, that worked like a charm!

Re: [SOLVED] Startup Script to Configure Alfa AWUS036H Drive

Posted: Thu Jan 03, 2013 3:32 pm
by shappappo
I also have this VERY annoying behaviour of the Alfa awus036h in Mint, Ubuntu, and Fedora.

I really want to try this fix, but I don't know

1) how to make a script
2) how to run it automatically at startup.

for the first problem I'll try the proposed link, and I suppose that the procedure will be the same in any linux distro.

About about where to save the script.....right now I'm on Fedora (Ubu and Mint run on another computer), and this OS has no /etc/rc.local directory.

Any suggestion for Fedora (and Ubu, as you are here...)?
I barely know what I'm doing, so I would like not to mess everithing up....

If this is an effective fix for the Alfa antenna it would just be great.

Thankyou

Re: [SOLVED] Startup Script to Configure Alfa AWUS036H Drive

Posted: Sat Mar 23, 2013 11:47 am
by shappappo
Mathias I tried your solution. It seems to work, by now.

I also added before your commands

sudo iw reg set BO
sudo iwconfig wlan1 txpower 30

That I SUPPOSE should push the antenna at his max transmitting power

I'll let you know if it's stable

Thank you very much

Re: [SOLVED] Startup Script to Configure Alfa AWUS036H Drive

Posted: Thu Mar 28, 2013 7:16 am
by shappappo
matthias2223 wrote:Hello, I'm a recent convert to the world of Linux and am liking it so far. I'm currently using Linux Mint 12 on a Dell Inspiron E1505. Most things worked well right out of the box except for my internet connection.

I had slow connection speeds and constant disconnects with my Alfa AWUS036H USB Network Adapter (uses rtl8187 driver) as compared to when I was running Windows. I disabled my onboard wireless adapter in my BIOS setting so that it wouldn't interfere with the Alfa Adapter.

I found a page on ArchLinux.org that explained that my problem was in some of the driver settings, namely the rate, rts, and fragmentation thresholds. When I entered the code they suggested my connection sped back up and the disconnects stopped. So far it seems to have fixed my network issues. The only remaining problem is that I have to reenter these commands every time after I reboot.

My question is how can I make my system run these commands automatically at startup so that I won't have to continue doing it manually?

If it helps, these are the commands I give:

sudo iwconfig wlan0 rate 5.5M fixed
sudo iwconfig wlan0 frag 2346
sudo iwconfig wlan0 rts 2347

Thanks
Hi Mathias

at least in MY case, it just didn't work.

After years of happily removing windows on every single computer ever come in my hands....I'm seriously thinking to reinstall it, and it would really be a problem, because I recently found a desktop heaven in using Ubu 13.04 + latest kernel + latest gnome + cairo dock.
I tried the latest kernel because among the changes it was claimed a better usb peripheral support, specifically a fix that prevented such peripherals to unpredictably switch off after some time, that is one of the "symptoms" many of us experiment with this crappy antenna.
As you can imagine, nothing changed, but the need to learn how to reduce part of the absurd hardware requirements of the latest gnome (I still have some work to do with that)
But I just can't afford an unreliable internet connection, and if I won't find an effective fix I'll have to return messing with antiviruses and viruses like windows itself.

anyway....I'll dedicate a few more days in searching a fix, if you happen to know something more to try let me know, thank you