From 7377ea7c76eca93c2c3d884e5ffeb42363bc53f9 Mon Sep 17 00:00:00 2001 From: viktorxda <35473052+viktorxda@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:11:35 +0100 Subject: [PATCH] [no ci] Update wifibroadcast-ng --- .../package/wifibroadcast-ext/src/keygen.c | 59 ------------------- .../wifibroadcast-ext/wifibroadcast-ext.mk | 7 --- .../wifibroadcast-ng/files/wifibroadcast | 13 ++-- .../wifibroadcast-ng/wifibroadcast-ng.mk | 2 +- 4 files changed, 8 insertions(+), 73 deletions(-) delete mode 100644 general/package/wifibroadcast-ext/src/keygen.c diff --git a/general/package/wifibroadcast-ext/src/keygen.c b/general/package/wifibroadcast-ext/src/keygen.c deleted file mode 100644 index 58022316..00000000 --- a/general/package/wifibroadcast-ext/src/keygen.c +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2017 - 2024 Vasily Evseenko - -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include -#include -#include - -int main(int argc, char **argv) { - unsigned char publickey[crypto_box_PUBLICKEYBYTES]; - unsigned char secretkey[crypto_box_SECRETKEYBYTES]; - FILE *fp; - - if (argc != 2) { - printf("Passphrase is missing\n"); - return 1; - } - - if (sodium_init() < 0) { - printf("Libsodium init failed\n"); - return 1; - } - - char seed[32]; - strncpy(seed, argv[1], sizeof(seed)); - printf("Using passphrase: %s\n", seed); - - if (crypto_box_seed_keypair(publickey, secretkey, seed) != 0) { - printf("Unable to generate key\n"); - return 1; - } - - const char *key = "/etc/drone.key"; - if ((fp = fopen(key, "w")) == NULL) { - printf("Unable to save: %s\n", key); - return 1; - } - - fwrite(secretkey, crypto_box_SECRETKEYBYTES, 1, fp); - fwrite(publickey, crypto_box_PUBLICKEYBYTES, 1, fp); - fclose(fp); - - printf("Key saved: %s\n", key); - - return 0; -} diff --git a/general/package/wifibroadcast-ext/wifibroadcast-ext.mk b/general/package/wifibroadcast-ext/wifibroadcast-ext.mk index 268bb637..97366e89 100644 --- a/general/package/wifibroadcast-ext/wifibroadcast-ext.mk +++ b/general/package/wifibroadcast-ext/wifibroadcast-ext.mk @@ -4,18 +4,11 @@ # ################################################################################ -WIFIBROADCAST_EXT_DEPENDENCIES += libsodium - -define WIFIBROADCAST_EXT_BUILD_CMDS - $(TARGET_CC) $(WIFIBROADCAST_EXT_PKGDIR)/src/keygen.c -o $(@D)/keygen -lsodium -s -endef - define WIFIBROADCAST_EXT_INSTALL_TARGET_CMDS $(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d $(INSTALL) -m 755 -t $(TARGET_DIR)/etc/init.d $(WIFIBROADCAST_EXT_PKGDIR)/files/S75generate_vtx_info $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin - $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/keygen $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(WIFIBROADCAST_EXT_PKGDIR)/files/generate_vtx_info endef diff --git a/general/package/wifibroadcast-ng/files/wifibroadcast b/general/package/wifibroadcast-ng/files/wifibroadcast index 6ec1cc7a..774c40fe 100755 --- a/general/package/wifibroadcast-ng/files/wifibroadcast +++ b/general/package/wifibroadcast-ng/files/wifibroadcast @@ -83,14 +83,15 @@ start_telemetry() { [ "$chipset" = "ssc33x" ] && devmem 0x1F207890 16 0x8 echo_log "Starting $router" - if [ "$router" = "msposd" ]; then - config=$(curl -s localhost/api/v1/config.json) - [ -n "$config" ] && size=$(echo "$config" | jsonfilter -e "@.video0.size") - msposd -b 115200 -c 8 -d -r "$osd_fps" -z "${size:-1280x720}" \ - -m /dev/"$serial" -o 10.5.0.1:14551 > /dev/null & - elif [ "$router" = "mavfwd" ]; then + if [ "$router" = "mavfwd" ]; then mavfwd -b 115200 -c 8 -p 100 -a 15 -t \ -m /dev/"$serial" -i 0.0.0.0:14550 -o 10.5.0.1:14551 > /dev/null & + else + if [ "$router" = "msposd" ]; then + size=$(curl -s localhost/api/v1/config.json | jsonfilter -e "@.video0.size") + fi + msposd -b 115200 -c 8 -z "$size" -r "$osd_fps" \ + -m /dev/"$serial" -o 10.5.0.1:14551 > /dev/null & fi } diff --git a/general/package/wifibroadcast-ng/wifibroadcast-ng.mk b/general/package/wifibroadcast-ng/wifibroadcast-ng.mk index 2a3445a9..13cfacd5 100644 --- a/general/package/wifibroadcast-ng/wifibroadcast-ng.mk +++ b/general/package/wifibroadcast-ng/wifibroadcast-ng.mk @@ -4,7 +4,7 @@ # ################################################################################ -WIFIBROADCAST_NG_VERSION = 1d14a1a32df559b5a421fa15841e79e3b7a8ef99 +WIFIBROADCAST_NG_VERSION = 6c5febf31c713beacd63221bfd74dfe30031c44d WIFIBROADCAST_NG_SITE = $(call github,svpcom,wfb-ng,$(WIFIBROADCAST_NG_VERSION)) WIFIBROADCAST_NG_LICENSE = GPL-3.0