From 9bf1719cab2911d42ea19ad12356e7b5cf7fac11 Mon Sep 17 00:00:00 2001 From: cronyx Date: Tue, 13 Sep 2022 00:13:52 +0300 Subject: [PATCH] wfb-ng version update (#457) --- .../package/wifibroadcast/0001-makefile.patch | 20 +++++++-------- general/package/wifibroadcast/Makefile | 25 ------------------- general/package/wifibroadcast/files/S98wfb | 2 +- general/package/wifibroadcast/files/telemetry | 4 +-- .../wifibroadcast/files/telemetry.conf | 5 ++-- general/package/wifibroadcast/files/wfb.conf | 4 ++- .../package/wifibroadcast/wifibroadcast.mk | 4 +-- 7 files changed, 21 insertions(+), 43 deletions(-) delete mode 100644 general/package/wifibroadcast/Makefile diff --git a/general/package/wifibroadcast/0001-makefile.patch b/general/package/wifibroadcast/0001-makefile.patch index e6f2425c..1cc9cf5f 100644 --- a/general/package/wifibroadcast/0001-makefile.patch +++ b/general/package/wifibroadcast/0001-makefile.patch @@ -1,25 +1,25 @@ ---- a/Makefile 2022-09-01 22:07:30.449753541 +0300 -+++ b/Makefile 2022-09-01 20:42:21.816597209 +0300 -@@ -1,58 +1,25 @@ +--- a/Makefile 2022-09-12 12:30:23.273638715 +0300 ++++ b/Makefile 2022-09-12 12:37:26.310596402 +0300 +@@ -1,58 +1,29 @@ ARCH ?= $(shell uname -i) -PYTHON ?= /usr/bin/python3 -COMMIT ?= $(shell git rev-parse HEAD) -VERSION ?= $(shell $(PYTHON) ./version.py $(shell git show -s --format="%ct" $(shell git rev-parse HEAD)) $(shell git rev-parse --abbrev-ref HEAD)) --SOURCE_DATE_EPOCH ?= $(shell git show -s --format="%ct" $(shell git rev-parse HEAD)) +VERSION ?= $(shell git rev-parse HEAD) + SOURCE_DATE_EPOCH ?= $(shell git show -s --format="%ct" $(shell git rev-parse HEAD)) --export VERSION COMMIT SOURCE_DATE_EPOCH -+LDFLAGS := -lrt -lpcap -lsodium -+CFLAGS := -Wall -O2 -DWFB_VERSION='"$(VERSION)"' + export VERSION COMMIT SOURCE_DATE_EPOCH -_LDFLAGS := $(LDFLAGS) -lrt -lpcap -lsodium -_CFLAGS := $(CFLAGS) -Wall -O2 -DWFB_VERSION='"$(VERSION)-$(shell /bin/bash -c '_tmp=$(COMMIT); echo $${_tmp::8}')"' -- ++LDFLAGS := -lrt -lpcap -lsodium ++CFLAGS := -Wall -O2 -DWFB_VERSION='"$(VERSION)"' + -all: all_bin gs.key test - -env: - virtualenv env --python=$(PYTHON) -- ./env/bin/pip install --upgrade pip==20.2.3 setuptools==44.1.1 stdeb +- ./env/bin/pip install --upgrade pip setuptools stdeb - -all_bin: wfb_rx wfb_tx wfb_keygen - @@ -67,5 +67,5 @@ clean: - rm -rf env wfb_rx wfb_tx wfb_keygen dist deb_dist build wfb_ng.egg-info wfb-ng-*.tar.gz _trial_temp *~ src/*.o -- + rm -rf wfb_rx wfb_tx wfb_keygen *~ src/*.o + diff --git a/general/package/wifibroadcast/Makefile b/general/package/wifibroadcast/Makefile deleted file mode 100644 index 1b94e10b..00000000 --- a/general/package/wifibroadcast/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -ARCH ?= $(shell uname -i) -VERSION ?= $(shell git rev-parse HEAD) - -LDFLAGS := -lrt -lpcap -lsodium -CFLAGS := -Wall -O2 -DWFB_VERSION='"$(VERSION)"' - -all: wfb_rx wfb_tx wfb_keygen - -src/%.o: src/%.c src/*.h - $(CC) $(CFLAGS) -std=gnu99 -c -o $@ $< - -src/%.o: src/%.cpp src/*.hpp src/*.h - $(CXX) $(CFLAGS) -std=gnu++11 -c -o $@ $< - -wfb_rx: src/rx.o src/radiotap.o src/fec.o src/wifibroadcast.o - $(CXX) -o $@ $^ $(LDFLAGS) - -wfb_tx: src/tx.o src/fec.o src/wifibroadcast.o - $(CXX) -o $@ $^ $(LDFLAGS) - -wfb_keygen: src/keygen.o - $(CC) -o $@ $^ $(LDFLAGS) - -clean: - rm -rf wfb_rx wfb_tx wfb_keygen *~ src/*.o diff --git a/general/package/wifibroadcast/files/S98wfb b/general/package/wifibroadcast/files/S98wfb index d052d6e6..30c2df08 100755 --- a/general/package/wifibroadcast/files/S98wfb +++ b/general/package/wifibroadcast/files/S98wfb @@ -36,7 +36,7 @@ load_interface() { } start_wfb() { - wfb_tx -p ${radio_port} -u ${udp_port} -K ${keydir}/drone.key -B ${bandwidth} -M ${mcs_index} -S ${stbc} -L ${ldpc} -G ${guard_interval} -k ${fec_k} -n ${fec_n} -T ${fec_timeout} ${wlan} & + wfb_tx -p ${radio_port} -u ${udp_port} -K ${keydir}/drone.key -B ${bandwidth} -M ${mcs_index} -S ${stbc} -L ${ldpc} -G ${guard_interval} -k ${fec_k} -n ${fec_n} -T ${fec_timeout} -i ${stream} -e ${epoch} ${wlan} & } case "$1" in diff --git a/general/package/wifibroadcast/files/telemetry b/general/package/wifibroadcast/files/telemetry index 455203cf..f0dfe5f6 100755 --- a/general/package/wifibroadcast/files/telemetry +++ b/general/package/wifibroadcast/files/telemetry @@ -13,9 +13,9 @@ start_telemetry() { ln -s /usr/bin/wfb_tx /usr/bin/telemetry_tx ; chmod +x /usr/bin/telemetry_tx else if [ ${one_way} = "false" ]; then - telemetry_rx -p ${stream_rx} -u ${port_rx} -K ${keydir}/drone.key -k ${fec_k} -n ${fec_n} ${wlan} & + telemetry_rx -p ${radio_port} -u ${port_rx} -K ${keydir}/drone.key -k ${fec_k} -n ${fec_n} -i ${stream_rx} ${wlan} & fi - telemetry_tx -p ${stream_tx} -u ${port_tx} -K ${keydir}/drone.key -B ${bandwidth} -M ${mcs_index} -S ${stbc} -L ${ldpc} -G ${guard_interval} -k ${fec_k} -n ${fec_n} -T ${fec_timeout} ${wlan} & + telemetry_tx -p ${radio_port} -u ${port_tx} -K ${keydir}/drone.key -B ${bandwidth} -M ${mcs_index} -S ${stbc} -L ${ldpc} -G ${guard_interval} -k ${fec_k} -n ${fec_n} -T ${fec_timeout} -i ${stream_tx} ${wlan} & fi } diff --git a/general/package/wifibroadcast/files/telemetry.conf b/general/package/wifibroadcast/files/telemetry.conf index a29ab855..ad0d774f 100644 --- a/general/package/wifibroadcast/files/telemetry.conf +++ b/general/package/wifibroadcast/files/telemetry.conf @@ -3,8 +3,9 @@ bandwidth=20 stbc=1 ldpc=1 mcs_index=1 -stream_rx=1 -stream_tx=2 +radio_port=0 +stream_rx=0x90 +stream_tx=0x10 port_rx=14700 port_tx=14701 fec_k=1 diff --git a/general/package/wifibroadcast/files/wfb.conf b/general/package/wifibroadcast/files/wfb.conf index 7ad89043..d13d877e 100644 --- a/general/package/wifibroadcast/files/wfb.conf +++ b/general/package/wifibroadcast/files/wfb.conf @@ -9,7 +9,9 @@ bandwidth=20 stbc=1 ldpc=1 mcs_index=1 -radio_port=3 +radio_port=0 +stream=0x0 +epoch=0 udp_port=5600 fec_k=8 fec_n=12 diff --git a/general/package/wifibroadcast/wifibroadcast.mk b/general/package/wifibroadcast/wifibroadcast.mk index c255591a..8f14491b 100644 --- a/general/package/wifibroadcast/wifibroadcast.mk +++ b/general/package/wifibroadcast/wifibroadcast.mk @@ -4,11 +4,11 @@ # ################################################################################ -WIFIBROADCAST_VERSION = 3ff62387e68f0649899b00a8b8e1a451a04ffb25 +WIFIBROADCAST_VERSION = c00f4ca0817919e6ba5780212781e03dada206a6 WIFIBROADCAST_SITE = $(call github,svpcom,wifibroadcast,$(WIFIBROADCAST_VERSION)) WIFIBROADCAST_LICENSE = GPL-2.0 -WIFIBROADCAST_DEPENDENCIES += libpcap libsodium iw netcat +WIFIBROADCAST_DEPENDENCIES += libpcap libsodium iw WIFIBROADCAST_MAKE_OPTS = \ CC="$(TARGET_CC)" \