[SOLVED] Startup Script to Configure Alfa AWUS036H Driver

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
matthias2223

[SOLVED] Startup Script to Configure Alfa AWUS036H Driver

Post 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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
remoulder
Level 17
Level 17
Posts: 7621
Joined: Fri May 09, 2008 1:14 pm

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

Post by remoulder »

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.
AlbertP
Level 16
Level 16
Posts: 6701
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

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

Post 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
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
matthias2223

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

Post by matthias2223 »

Thanks Albert, that worked like a charm!
shappappo

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

Post 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
shappappo

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

Post 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
shappappo

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

Post 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
Locked

Return to “Beginner Questions”