[SOLVED] Startup Script to Configure Alfa AWUS036H Driver

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

[SOLVED] Startup Script to Configure Alfa AWUS036H Driver

Postby matthias2223 on Tue Mar 27, 2012 8:25 pm

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
Last edited by matthias2223 on Wed Mar 28, 2012 7:53 pm, edited 1 time in total.
matthias2223
Level 1
Level 1
 
Posts: 4
Joined: Sun Mar 04, 2012 5:21 pm

Linux Mint is funded by ads and donations.
 

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

Postby remoulder on Wed Mar 28, 2012 5:57 am

Try the method suggested here
[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.
User avatar
remoulder
Level 17
Level 17
 
Posts: 7667
Joined: Fri May 09, 2008 1:14 pm

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

Postby AlbertP on Wed Mar 28, 2012 5:59 am

You can put the lines in the /etc/rc.local file before the exit 0 line.
Code: Select all
gksudo gedit /etc/rc.local
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 16
Level 16
 
Posts: 6513
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

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

Postby matthias2223 on Wed Mar 28, 2012 7:52 pm

Thanks Albert, that worked like a charm!
matthias2223
Level 1
Level 1
 
Posts: 4
Joined: Sun Mar 04, 2012 5:21 pm

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

Postby shappappo on Thu Jan 03, 2013 3:32 pm

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
shappappo
Level 1
Level 1
 
Posts: 3
Joined: Thu Jan 03, 2013 2:53 pm

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

Postby shappappo on Sat Mar 23, 2013 11:47 am

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
shappappo
Level 1
Level 1
 
Posts: 3
Joined: Thu Jan 03, 2013 2:53 pm

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

Postby shappappo on Thu Mar 28, 2013 7:16 am

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
shappappo
Level 1
Level 1
 
Posts: 3
Joined: Thu Jan 03, 2013 2:53 pm

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: 0ddity, Annoyingduck, Bing [Bot], Reorx and 22 guests