Skip to content

Commit

Permalink
[no ci] Update wifibroadcast-ng (#1732)
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorxda authored Feb 26, 2025
1 parent 1adb8b8 commit 53f81f6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion general/package/wifibroadcast-ng/files/wfb.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
wireless:
txpower: 1
channel: 161
width: HT20
width: 20
broadcast:
mcs_index: 2
tun_index: 1
Expand Down
13 changes: 7 additions & 6 deletions general/package/wifibroadcast-ng/files/wifibroadcast
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,26 @@ load_modules() {

load_interface() {
iw "$wfb_dev" set monitor none
iw "$wfb_dev" set channel "$channel" "$width"

[ "$width" = "40" ] && wfb_width=HT40+ || wfb_width=HT20
iw "$wfb_dev" set channel "$channel" "$wfb_width"
iw reg set 00

[ "$driver" = "88XXau" ] && wfb_power=$((txpower * -100)) || wfb_power=$((txpower * 50))
iw "$wfb_dev" set txpower fixed "$wfb_power"
[ "$width" = "HT20" ] && wfb_width=20 || wfb_width=40
}

start_broadcast() {
echo_log "Starting wfb_tx"
wfb_tx -K "$wfb_key" -M "$mcs_index" -B "$wfb_width" -k "$fec_k" -n "$fec_n" \
wfb_tx -K "$wfb_key" -M "$mcs_index" -B "$width" -k "$fec_k" -n "$fec_n" \
-S "$stbc" -L "$ldpc" -i "$link_id" -C 8000 -G short "$wfb_dev" &> /dev/null &
}

start_tunnel() {
echo_log "Starting wfb_tun"
wfb_rx -p 160 -u 5800 -K "$wfb_key" -i "$link_id" "$wfb_dev" &> /dev/null &
wfb_tx -p 32 -u 5801 -K "$wfb_key" -M "$tun_index" -k "$fec_k" -n "$fec_n" \
-S "$stbc" -L "$ldpc" -i "$link_id" "$wfb_dev" &> /dev/null &
wfb_rx -K "$wfb_key" -i "$link_id" -p 160 -u 5800 "$wfb_dev" &> /dev/null &
wfb_tx -K "$wfb_key" -M "$tun_index" -B "$width" -k "$fec_k" -n "$fec_n" \
-S "$stbc" -L "$ldpc" -i "$link_id" -p 32 -u 5801 "$wfb_dev" &> /dev/null &
wfb_tun -a 10.5.0.10/24 > /dev/null &
}

Expand Down
4 changes: 2 additions & 2 deletions general/package/wifibroadcast-ng/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ <h3>Wireless</h3>

<h3>Broadcast</h3>
<div class="row">
<label for="wfb_index">MCS Index:</label>
<select id="wfb_index" name="wfb.broadcast.mcs_index"></select>
<label for="mcs_index">MCS Index:</label>
<select id="mcs_index" name="wfb.broadcast.mcs_index"></select>
</div>

<hr class="divider">
Expand Down
5 changes: 2 additions & 3 deletions general/package/wifibroadcast-ng/www/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ function syncForm(data, formPrefix, mode) {
}

const isCheckbox = field.type === "checkbox";
const value = data[section][key];

if (mode === "setup") {
isCheckbox ? field.checked = value === true : field.value = value;
isCheckbox ?
field.checked = data[section][key] === true : field.value = data[section][key];
} else if (mode === "update") {
data[section][key] = isCheckbox ?
field.checked : (isNaN(field.value) ? field.value : Number(field.value));
Expand Down
1 change: 1 addition & 0 deletions general/package/wifibroadcast-ng/www/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ h3 {
#preview {
width: 100%;
max-width: 75%;
margin-top: 25px;
background-color: #000;
border-radius: 4px;
box-shadow: 0 2px 10px #00000080;
Expand Down

0 comments on commit 53f81f6

Please sign in to comment.