wfb-ng/scripts/tx_standalone.sh

42 lines
745 B
Bash
Raw Normal View History

2017-04-07 11:38:41 -03:00
#!/bin/bash
2019-06-23 10:31:20 -03:00
####
#### WARNING!!!
#### This script is depricated and **not supported** by author!
#### I leave it only for reference for **developers**.
#### Use python services instead.
####
2017-04-07 11:38:41 -03:00
WLAN=$1
BAND="5G"
#BAND="2G"
CHANNEL2G="6"
2017-04-07 11:38:41 -03:00
CHANNEL5G="149"
2023-02-07 09:59:58 -04:00
nmcli device set $WLAN managed no
ip link set $WLAN down
2017-04-07 11:38:41 -03:00
iw dev $WLAN set monitor otherbss
iw reg set BO
2023-02-07 09:59:58 -04:00
ip link set $WLAN up
case $BAND in
"5G")
echo "Setting $WLAN to channel $CHANNEL5G"
2023-02-07 09:59:58 -04:00
iw dev $WLAN set channel $CHANNEL5G HT20
;;
"2G")
echo "Setting $WLAN to channel $CHANNEL2G"
2023-02-07 09:59:58 -04:00
iw dev $WLAN set channel $CHANNEL2G HT20
;;
*)
echo "Select 2G or 5G band"
exit -1;
;;
esac
2017-04-07 11:38:41 -03:00
# Video TX
2023-02-07 09:59:58 -04:00
./wfb_tx -p 0 -u 5602 -K drone.key $WLAN