diff --git a/br-ext-chip-goke/board/gk7205v200/kernel/gk7205v300.generic.config b/br-ext-chip-goke/board/gk7205v200/kernel/gk7205v300.generic.config index 6c6d09c3..f92e39f9 100644 --- a/br-ext-chip-goke/board/gk7205v200/kernel/gk7205v300.generic.config +++ b/br-ext-chip-goke/board/gk7205v200/kernel/gk7205v300.generic.config @@ -733,7 +733,7 @@ CONFIG_CFG80211=m CONFIG_CFG80211_DEFAULT_PS=y # CONFIG_CFG80211_INTERNAL_REGDB is not set CONFIG_CFG80211_CRDA_SUPPORT=y -CONFIG_CFG80211_WEXT=n +CONFIG_CFG80211_WEXT=y # CONFIG_LIB80211 is not set CONFIG_MAC80211=m CONFIG_MAC80211_HAS_RC=y diff --git a/general/package/mavfwd/Config.in b/general/package/mavfwd/Config.in index 4564958e..d29ca286 100644 --- a/general/package/mavfwd/Config.in +++ b/general/package/mavfwd/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_MAVFWD bool "mavfwd" default n select BR2_PACKAGE_LIBEVENT_OPENIPC + select BR2_PACKAGE_DATALINK help mavfwd - Cool and awesome mavlink forwader for FPV diff --git a/general/package/mavlink-router/Config.in b/general/package/mavlink-router/Config.in index 666743fd..01810db4 100644 --- a/general/package/mavlink-router/Config.in +++ b/general/package/mavlink-router/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_MAVLINK_ROUTER bool "mavlink-router" + select BR2_PACKAGE_DATALINK help MAVLink Router is an application to distribute MAVLink messages between multiple endpoints (connections). It distributes packets to a single port or multiple endpoints depending on the target address. Connections can be made via UART, UDP or TCP. diff --git a/general/package/mavlink-router/files/S97mavlink b/general/package/mavlink-router/files/S97mavlink index b29dc972..66254d7d 100755 --- a/general/package/mavlink-router/files/S97mavlink +++ b/general/package/mavlink-router/files/S97mavlink @@ -5,11 +5,11 @@ case "$1" in start) - if grep -q telemetry=true /etc/wfb.conf; then + if grep -q telemetry=true /etc/datalink.conf; then echo "Starting mavlink router daemon..." /usr/bin/mavlink-routerd & else - echo "Telemetry service disabled in wfb.conf..." + echo "Telemetry service disabled in datalink.conf..." fi ;; stop) diff --git a/general/package/wifibroadcast/files/htc_9271-1.4.0.fw b/general/package/wifibroadcast/files/htc_9271-1.4.0.fw deleted file mode 100644 index 79ae6068..00000000 Binary files a/general/package/wifibroadcast/files/htc_9271-1.4.0.fw and /dev/null differ diff --git a/general/package/wifibroadcast/files/htc_9271.fw.1 b/general/package/wifibroadcast/files/htc_9271.fw.1 new file mode 100644 index 00000000..5554f71d Binary files /dev/null and b/general/package/wifibroadcast/files/htc_9271.fw.1 differ diff --git a/general/package/wifibroadcast/files/htc_9271.fw.3 b/general/package/wifibroadcast/files/htc_9271.fw.3 new file mode 100644 index 00000000..565626cd Binary files /dev/null and b/general/package/wifibroadcast/files/htc_9271.fw.3 differ diff --git a/general/package/wifibroadcast/files/setmcs b/general/package/wifibroadcast/files/setmcs new file mode 100755 index 00000000..534a5090 --- /dev/null +++ b/general/package/wifibroadcast/files/setmcs @@ -0,0 +1,24 @@ +#!/bin/sh +# +# Change Atheros MCS +# Author: Tipo Man + +case "$1" in + "1") + echo '1-1' > /sys/bus/usb/drivers/usb/unbind + rm /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw + ln -s /lib/firmware/ath9k_htc/htc_9271.fw.1 /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw + echo '1-1' > /sys/bus/usb/drivers/usb/bind + echo "Loaded firmware with MCS"$1 + ;; + "3") + echo '1-1' > /sys/bus/usb/drivers/usb/unbind + rm /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw + ln -s /lib/firmware/ath9k_htc/htc_9271.fw.3 /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw + echo '1-1' > /sys/bus/usb/drivers/usb/bind + echo "Loaded firmware with MCS"$1 + ;; + *) + echo "Only MCS 1 or 3 supported!" + ;; +esac diff --git a/general/package/wifibroadcast/files/wfb.conf b/general/package/wifibroadcast/files/wfb.conf index 5fe266d8..20f0e995 100644 --- a/general/package/wifibroadcast/files/wfb.conf +++ b/general/package/wifibroadcast/files/wfb.conf @@ -1,6 +1,8 @@ wlan=wlan0 region=BO +# By default used channel number, but, you may set freq instead. For ex: 2387M channel=14 +frequency= txpower=20 driver_txpower_override=20 bandwidth=20 diff --git a/general/package/wifibroadcast/files/wifibroadcast b/general/package/wifibroadcast/files/wifibroadcast index 3380d57e..9767e081 100755 --- a/general/package/wifibroadcast/files/wifibroadcast +++ b/general/package/wifibroadcast/files/wifibroadcast @@ -11,6 +11,19 @@ chip=$(ipcinfo -c) driver="" +set_mcs() { + mcs=$(ls -l /lib/firmware/ath9k_htc | grep "htc_9271-1.4.0.fw" | cut -d "." -f6) + if [ -z "${mcs}" ]; then + setmcs ${mcs_index} + fi + if [ ${mcs_index} -eq 1 ] || [ ${mcs_index} -eq 3 ]; then + if [ ! ${mcs_index} -eq ${mcs} ]; then + setmcs ${mcs_index} + sleep 3 + fi + fi +} + # "0bda:8813" -> (8814) -> 8814au # "0846:9052" -> (8811) -> 8821au @@ -24,18 +37,13 @@ detect_wifi_card() { driver="realtek" modprobe 88XXau rtw_tx_pwr_idx_override=${driver_txpower_override} ;; - "0cf3:9271") + "0cf3:9271" | "040d:3801") driver="atheros" + set_mcs modprobe mac80211 modprobe ath9k_htc ;; - "148f:3070") - driver="ralink" - modprobe mac80211 - modprobe rt2x00usb - modprobe rt2800usb - ;; - esac + esac done if [ -z "${driver}" ]; then @@ -68,13 +76,19 @@ load_interface() { if [ ${driver} = "realtek" ]; then ifconfig ${wlan} up iwconfig ${wlan} mode monitor - elif [ ${driver} = "atheros" ] || [ ${driver} = "ralink" ]; then + elif [ ${driver} = "atheros" ]; then iwconfig ${wlan} mode monitor ifconfig ${wlan} up fi iw reg set ${region} - iwconfig ${wlan} channel ${channel} + + if [ ! -z "${frequency}" ]; then + iwconfig ${wlan} freq ${frequency} + else + iwconfig ${wlan} channel ${channel} + fi + iw dev ${wlan} set txpower fixed $((${txpower} * 100)) } diff --git a/general/package/wifibroadcast/wifibroadcast.mk b/general/package/wifibroadcast/wifibroadcast.mk index 66dc725f..554a2069 100644 --- a/general/package/wifibroadcast/wifibroadcast.mk +++ b/general/package/wifibroadcast/wifibroadcast.mk @@ -28,8 +28,13 @@ define WIFIBROADCAST_INSTALL_TARGET_CMDS $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin cp ../general/package/wifibroadcast/files/wifibroadcast $(TARGET_DIR)/usr/bin + $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin + cp ../general/package/wifibroadcast/files/setmcs $(TARGET_DIR)/usr/bin + $(INSTALL) -m 755 -d $(TARGET_DIR)/lib/firmware/ath9k_htc - cp ../general/package/wifibroadcast/files/htc_9271-1.4.0.fw $(TARGET_DIR)/lib/firmware/ath9k_htc + cp ../general/package/wifibroadcast/files/htc_9271.fw.1 $(TARGET_DIR)/lib/firmware/ath9k_htc + $(INSTALL) -m 755 -d $(TARGET_DIR)/lib/firmware/ath9k_htc + cp ../general/package/wifibroadcast/files/htc_9271.fw.3 $(TARGET_DIR)/lib/firmware/ath9k_htc endef $(eval $(generic-package))