mirror of https://github.com/OpenIPC/firmware.git
Update wifibroadcast (#1640)
parent
7ea9b831bc
commit
10299bb5cc
|
@ -10,12 +10,16 @@ region=00
|
||||||
channel=161
|
channel=161
|
||||||
bandwidth=20
|
bandwidth=20
|
||||||
mcs_index=1
|
mcs_index=1
|
||||||
|
telemetry_mcs_index=1
|
||||||
stream=0
|
stream=0
|
||||||
stbc=0
|
stbc=0
|
||||||
ldpc=0
|
ldpc=0
|
||||||
fec_k=8
|
fec_k=8
|
||||||
fec_n=12
|
fec_n=12
|
||||||
link_id=7669206
|
link_id=7669206
|
||||||
|
bandwidth_iw_mode_20=HT20
|
||||||
|
bandwidth_iw_mode_40=HT40+
|
||||||
|
bandwidth_iw_mode_80=80Mhz
|
||||||
|
|
||||||
# Default telemetry
|
# Default telemetry
|
||||||
router=msposd
|
router=msposd
|
||||||
|
@ -60,27 +64,30 @@ load_modules() {
|
||||||
}
|
}
|
||||||
|
|
||||||
load_interface() {
|
load_interface() {
|
||||||
|
iw dev "$wlan" set monitor none
|
||||||
|
iwconfig "$wlan" mode monitor
|
||||||
ifconfig "$wlan" up
|
ifconfig "$wlan" up
|
||||||
iw "$wlan" set type monitor
|
#iw "$wlan" set type monitor
|
||||||
|
|
||||||
if [ "$driver" = "8812eu" ] || [ "$driver" = "8733bu" ]; then
|
|
||||||
iw "$wlan" set txpower fixed $((txpower * 50))
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$bandwidth" in
|
case "$bandwidth" in
|
||||||
"20")
|
"20")
|
||||||
iw_mode=HT20
|
iw_mode="$bandwidth_iw_mode_20"
|
||||||
;;
|
;;
|
||||||
"40")
|
"40")
|
||||||
iw_mode=HT40+
|
iw_mode="$bandwidth_iw_mode_40"
|
||||||
;;
|
;;
|
||||||
"80")
|
"80")
|
||||||
iw_mode=80MHz
|
iw_mode="$bandwidth_iw_mode_80"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
iw "$wlan" set channel "$channel" "$iw_mode"
|
iw "$wlan" set channel "$channel" "$iw_mode"
|
||||||
iw reg set "$region"
|
iw reg set "$region"
|
||||||
|
|
||||||
|
if [ "$driver" = "8812eu" ] || [ "$driver" = "8733bu" ]; then
|
||||||
|
iw "$wlan" set txpower fixed $((txpower * 50))
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start_wfb() {
|
start_wfb() {
|
||||||
|
@ -92,7 +99,7 @@ start_wfb() {
|
||||||
start_tunnel() {
|
start_tunnel() {
|
||||||
echo "Starting wfb_tun"
|
echo "Starting wfb_tun"
|
||||||
wfb_rx -p 160 -u 5800 -K "$wfb_key" -i "$link_id" "$wlan" &> /dev/null &
|
wfb_rx -p 160 -u 5800 -K "$wfb_key" -i "$link_id" "$wlan" &> /dev/null &
|
||||||
wfb_tx -p 32 -u 5801 -K "$wfb_key" -M "$mcs_index" -S "$stbc" -L "$ldpc" \
|
wfb_tx -p 32 -u 5801 -K "$wfb_key" -M "$telemetry_mcs_index" -S "$stbc" -L "$ldpc" \
|
||||||
-k "$fec_k" -n "$fec_n" -i "$link_id" "$wlan" &> /dev/null &
|
-k "$fec_k" -n "$fec_n" -i "$link_id" "$wlan" &> /dev/null &
|
||||||
wfb_tun -a 10.5.0.10/24 > /dev/null &
|
wfb_tun -a 10.5.0.10/24 > /dev/null &
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue