Transmit Power

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

Post Reply
KingJL
Posts: 10
Joined: Tue Jun 07, 2011 9:13 pm

Transmit Power

Post by KingJL »

Eric,
I have made a mod to the basic.sh that will set the Transmit Power range from 0 - Regulatory Limit for systems with "mac80211" drivers. I submit this for those who wish to test it and would request it be included as a change for Gargoyle. There may even be a method to improve it for the other driver sets as well.

In /www/basic.sh (in the first <script> section) change (add 2 lines):

Code: Select all

        timezone_is_utc=$(uci get system.@system[0].timezone | grep "^UTC" | sed 's/UTC//g')
        if [ -n "$timezone_is_utc" ] ; then
                echo "var timezoneName = \""$( echo "UTC-$timezone_is_utc" | sed 's/\-\-/+/g'  )"\";"

        else
                echo "var timezoneName = \""$(date | sed 's/^.*:...//' | sed 's/ .*$//' )"\";"
        fi
?>
to:

Code: Select all

        timezone_is_utc=$(uci get system.@system[0].timezone | grep "^UTC" | sed 's/UTC//g')
        if [ -n "$timezone_is_utc" ] ; then
                echo "var timezoneName = \""$( echo "UTC-$timezone_is_utc" | sed 's/\-\-/+/g'  )"\";"

        else
                echo "var timezoneName = \""$(date | sed 's/^.*:...//' | sed 's/ .*$//' )"\";"
        fi
        regpwr=$(iw reg get|grep \(24|awk -F "\), \(" '{print $2}'|awk -F ", " '{print $2}'|awk -F "\)" '{print $1}')
        echo "var regMaxPower = \"$regpwr\";"
?>
and further down in the same script change:

Code: Select all

var txPowerMax = wirelessDriver == "broadcom" ? 31 : (wirelessDriver == "mac80211" ? 20 : 18);
to:

Code: Select all

var txPowerMax = wirelessDriver == "broadcom" ? 31 : (wirelessDriver == "mac80211" ? regMaxPower : 18);
It appears to work for me with no problems!
Enjoy!

Post Reply