Page 1 of 2 12 LastLast
Results 1 to 10 of 21

Thread: Alfa TX Power Script

Hybrid View

  1. #1
    Senior Member
    Join Date
    May 2010
    Posts
    198

    Default Alfa TX Power Script

    This script will change the TX value of your Alfa Card
    Some still seem to be struggling with the Alfa (RTL8187) Card
    This is part of my network connect script but thought you might find it useful

    put this code in a whatever.sh file
    chmod +x
    change the tx value to whatever you want ( I AM NOT RESPONSIBLE IF YOU BREAK YOUR CARD!!!! I don't set it above 30 myself)
    run script

    Max TX Value with this script is 30!

    Code:
    #!/bin/bash
    set -x
    #  (C)opyright 2010 Scamentology
    # This Script changes the TX Power for the Alfa Wireless card
    
        txpower_up="yes"                             # Raises TX Power for alfa Adapters
     txpower_value="30"                              # Value to raise alfa adapter to
         interface="$(airmon-ng | grep "RTL8187" | awk '{print $1}')"  # "eth0" "wlan0" "wlan1"
    
    #__ Nothing To Change Below This Line _____________________________________________________________
    
    #__ TX Power Increase for Alfa ____________________________________________________________________
    if [ ! $interface ] ; then echo "Alfa Card Not Found" ; /usr/bin/notify-send "Alfa Card Not Found" ; exit 0 ; fi
    ifconfig $interface down
    ifconfig $interface up
    sleep 3
    if [ $txpower_up == "yes" ] ; then
       alfa="$(airmon-ng | grep "RTL8187" | awk '{print $1}')"
       if [ "$alfa" == "$interface" ] ; then
          tx_status="$(iwconfig $interface | grep "Tx-Power" | awk '{print $4}')"
          if [ "$tx_status" == "Not-Associated" ] ; then tx_status="$(iwconfig $interface | grep "Tx-Power" | awk '{print $5}')" ; fi
          if [ "$tx_status" == "Tx-Power=$txpower_value" ] ; then
             /usr/bin/notify-send "$tx_status"
          else 
             iw reg set BO
             iwconfig $interface TxPower $txpower_value
             tx_status="$(iwconfig $interface | grep "Tx-Power" | awk '{print $4}')"
             if [ "$tx_status" == "Not-Associated" ] ; then tx_status="$(iwconfig $interface | grep "Tx-Power" | awk '{print $5}')" ; fi
             if [ "$tx_status" == "Tx-Power=$txpower_value" ] ; then
                /usr/bin/notify-send "$tx_status"
             fi
          fi
       fi
    fi
    
    exit 0
    Last edited by Scamentology; 03-11-2011 at 01:21 AM.
    "Never do anything against conscience -- even if the state demands it."
    -- Albert Einstein

  2. #2
    Member
    Join Date
    May 2010
    Location
    Frankfurt/Main
    Posts
    58

    Default Re: Alfa TX Power Script

    what does that mean " your network connect script " ? is it possible to change the script in the way, that i can let it run everytime i logon, even when i dont want to use my alfa, but when i plug it in, its able to TX with the power ive set in your scriipt ?

    when i plugin my alfa usb, something happens obviously in the background to get it running, wouldnt it be smart to connect the scripts which starts when i plug-in the alfa with your script ? is this possible ?

  3. #3
    Senior Member
    Join Date
    May 2010
    Posts
    198

    Default Re: Alfa TX Power Script

    How does It work for you?

    I wrote a script for connecting to the network without having to open WICD. This allows me to just click one button to log on. I may post it at some point if there is any interest in it.
    to get it to run just add the script to your .bash_profile file.
    you could get it to autorun the script. Hmmm - that actually sounds like a good idea.

    Quote Originally Posted by MartinBishop View Post
    what does that mean " your network connect script " ? is it possible to change the script in the way, that i can let it run everytime i logon, even when i dont want to use my alfa, but when i plug it in, its able to TX with the power ive set in your scriipt ?

    when i plugin my alfa usb, something happens obviously in the background to get it running, wouldnt it be smart to connect the scripts which starts when i plug-in the alfa with your script ? is this possible ?
    "Never do anything against conscience -- even if the state demands it."
    -- Albert Einstein

  4. #4
    Member
    Join Date
    May 2010
    Location
    Frankfurt/Main
    Posts
    58

    Default Re: Alfa TX Power Script

    to get it to run just add the script to your .bash_profile file.
    when ive not connected the awus to my notebook and run the script, its worthless i guess ? or did this script set the parameters and if i later on plugin my alfa i have the +++power ?

  5. #5
    Senior Member
    Join Date
    May 2010
    Posts
    198

    Default Re: Alfa TX Power Script

    I don't think you can change the values of a device that doesn't exist on the system.
    I assume it works when your card is plugged in.

    Quote Originally Posted by MartinBishop View Post
    when ive not connected the awus to my notebook and run the script, its worthless i guess ? or did this script set the parameters and if i later on plugin my alfa i have the +++power ?
    "Never do anything against conscience -- even if the state demands it."
    -- Albert Einstein

  6. #6
    Member
    Join Date
    Jul 2010
    Location
    Holland
    Posts
    110

    Default Re: Alfa TX Power Script

    Indeed , this script won't get past 30 dBm. I have the same script in about 5 lines of code, made myself.
    I guess your script is ok, but I think you have to be more precize what you are offering. This is spoken about in another thread here.

    The best ,
    tfdm

  7. #7
    Just burned his ISO
    Join Date
    May 2010
    Posts
    19

    Default Re: Alfa TX Power Script

    Quote Originally Posted by Scamentology View Post
    How does It work for you?
    I wrote a script for connecting to the network without having to open WICD. This allows me to just click one button to log on. I may post it at some point if there is any interest in it.
    If possible I'd like to try this script, because when running BT4R2 inside a VirtualBox WICD does not work, giving always error of BAD PASSWORD, which of course isn't. I have tryed also a manual configuration of wpa_supplicant but sometimes this gives problems too.
    I use the Alfa 1000mW.

  8. #8
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    17

    Default Re: Alfa TX Power Script

    hi thankyou for the scrip but when i run it all i get is

    root@bt:~# sh alfa
    Error for wireless request "Set Tx Power" (8B26) :
    SET failed on device wlan0 ; Invalid argument.
    any idea's?

  9. #9
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    17

    Default Re: Alfa TX Power Script

    sorted that problem with a reboot thankyou

  10. #10
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    17

    Default Re: Alfa TX Power Script

    Well I think this is a good script and I thankyou for it! It does exactilly what you say it does!

Page 1 of 2 12 LastLast

Similar Threads

  1. boost tx power alfa awus036h to 35/40
    By TheFlyingDutchMan in forum Beginners Forum
    Replies: 25
    Last Post: 03-10-2011, 07:53 PM
  2. ALFA - AWUS036H 1W > power control
    By Predator_Crack in forum HardWare Compatibility List
    Replies: 1
    Last Post: 12-04-2010, 08:32 AM
  3. No signal power on Alfa AWUS036H
    By PostalService in forum Beginners Forum
    Replies: 0
    Last Post: 10-22-2010, 12:59 AM
  4. ALFA AWUS036H Support Power ?
    By KherKhere in forum Beginners Forum
    Replies: 2
    Last Post: 02-21-2010, 09:31 PM
  5. alfa awus036h high power
    By cain#1 in forum OLD Newbie Area
    Replies: 10
    Last Post: 02-07-2009, 12:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •