mirror of https://github.com/OpenIPC/firmware.git
[fpv] improvements (#710)
parent
9997b38e68
commit
fe6d470c74
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue