forked from svpcom/wfb-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 5GHz / 2.4GHz band selection to startup scripts svpcom#7
- Loading branch information
Showing
2 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
#!/bin/bash | ||
|
||
WLANS=$@ | ||
BAND="5G" | ||
#BAND="2G" | ||
|
||
CHANNEL2G="6" | ||
CHANNEL5G="149" | ||
|
||
for WLAN in $WLANS | ||
do | ||
echo "Setting $WLAN to channel $CHANNEL5G" | ||
ifconfig $WLAN down | ||
iw dev $WLAN set monitor otherbss | ||
iw reg set BO | ||
ifconfig $WLAN up | ||
iw dev $WLAN set bitrates ht-mcs-5 1 sgi-5 | ||
iw dev $WLAN set channel $CHANNEL5G HT40+ | ||
|
||
case $BAND in | ||
"5G") | ||
echo "Setting $WLAN to channel $CHANNEL5G" | ||
iw dev $WLAN set bitrates ht-mcs-5 1 sgi-5 | ||
iw dev $WLAN set channel $CHANNEL5G HT40+ | ||
;; | ||
"2G") | ||
echo "Setting $WLAN to channel $CHANNEL2G" | ||
iw dev $WLAN set bitrates ht-mcs-2.4 1 sgi-2.4 | ||
iw dev $WLAN set channel $CHANNEL2G HT40+ | ||
;; | ||
*) | ||
echo "Select 2G or 5G band" | ||
exit -1; | ||
;; | ||
esac | ||
done | ||
|
||
./rx $WLANS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,33 @@ | ||
#!/bin/bash | ||
|
||
WLAN=$1 | ||
|
||
BAND="5G" | ||
#BAND="2G" | ||
|
||
CHANNEL2G="6" | ||
CHANNEL5G="149" | ||
|
||
echo "Setting $WLAN to channel $CHANNEL5G" | ||
ifconfig $WLAN down | ||
iw dev $WLAN set monitor otherbss | ||
iw reg set BO | ||
ifconfig $WLAN up | ||
iw dev $WLAN set bitrates ht-mcs-5 1 sgi-5 | ||
iw dev $WLAN set channel $CHANNEL5G HT40+ | ||
|
||
case $BAND in | ||
"5G") | ||
echo "Setting $WLAN to channel $CHANNEL5G" | ||
iw dev $WLAN set bitrates ht-mcs-5 1 sgi-5 | ||
iw dev $WLAN set channel $CHANNEL5G HT40+ | ||
;; | ||
"2G") | ||
echo "Setting $WLAN to channel $CHANNEL2G" | ||
iw dev $WLAN set bitrates ht-mcs-2.4 1 sgi-2.4 | ||
iw dev $WLAN set channel $CHANNEL2G HT40+ | ||
;; | ||
*) | ||
echo "Select 2G or 5G band" | ||
exit -1; | ||
;; | ||
esac | ||
|
||
./tx $WLAN |