hilink: bake WFB management and low latency runtime
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
start() {
|
||||
echo "Starting network..."
|
||||
ifup lo
|
||||
modprobe 8812eu rtw_tx_pwr_by_rate=0 rtw_tx_pwr_lmt_enable=0
|
||||
}
|
||||
|
||||
stop() {
|
||||
ifdown lo
|
||||
ifdown -f wlan0
|
||||
ifdown -f eth0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop) "$1" ;;
|
||||
restart|reload) stop; start ;;
|
||||
*) echo "Usage: $0 {start|stop|restart|reload}"; exit 1 ;;
|
||||
esac
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
ifdown eth0 2>/dev/null || true
|
||||
ifup eth0
|
||||
sleep 5
|
||||
/usr/bin/mgmt-net --force
|
||||
|
||||
if [ -r /run/mgmt-netd.pid ] &&
|
||||
kill -0 "$(cat /run/mgmt-netd.pid)" 2>/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
(
|
||||
while :; do
|
||||
/usr/bin/mgmt-net
|
||||
sleep 2
|
||||
done
|
||||
) &
|
||||
echo $! >/run/mgmt-netd.pid
|
||||
;;
|
||||
|
||||
stop)
|
||||
[ -r /run/mgmt-netd.pid ] &&
|
||||
kill "$(cat /run/mgmt-netd.pid)" 2>/dev/null || true
|
||||
rm -f /run/mgmt-netd.pid /run/mgmt-net.state
|
||||
;;
|
||||
esac
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
pidof wfb_tx wfb_rx wfb_tun wifilink >/dev/null && exit 0
|
||||
pidof msposd >/dev/null && exit 0
|
||||
|
||||
size=$(curl -s localhost/api/v1/config.json | \
|
||||
jsonfilter -qe "@.video0.size")
|
||||
size="${size:-1280x720}"
|
||||
|
||||
msposd \
|
||||
-b 115200 \
|
||||
-c 8 \
|
||||
-c 6 \
|
||||
-p 500 \
|
||||
-w 1000 \
|
||||
-r 20 \
|
||||
-m /dev/ttyS2 \
|
||||
-o 127.0.0.1:14551 \
|
||||
-z "$size" \
|
||||
>/tmp/msposd-management.log 2>&1 &
|
||||
;;
|
||||
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting wifibroadcast..."
|
||||
wifibroadcast start
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping wifibroadcast..."
|
||||
wifibroadcast stop
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,81 @@
|
||||
system:
|
||||
webPort: 80
|
||||
httpsPort: 443
|
||||
logLevel: info
|
||||
isp:
|
||||
antiFlicker: disabled
|
||||
sensorConfig: /etc/sensors/imx415_fpv.bin
|
||||
exposure: 5
|
||||
iqServer: false
|
||||
image:
|
||||
mirror: false
|
||||
flip: false
|
||||
rotate: 0
|
||||
contrast: 50
|
||||
hue: 50
|
||||
saturation: 50
|
||||
luminance: 50
|
||||
video0:
|
||||
enabled: true
|
||||
codec: h264
|
||||
fps: 60
|
||||
bitrate: 4096
|
||||
rcMode: cbr
|
||||
gopSize: 0.2
|
||||
size: 1280x720
|
||||
profile: main
|
||||
sliceUnits: 0
|
||||
video1:
|
||||
enabled: false
|
||||
codec: h264
|
||||
size: 704x576
|
||||
fps: 15
|
||||
jpeg:
|
||||
enabled: true
|
||||
qfactor: 50
|
||||
fps: 5
|
||||
osd:
|
||||
enabled: false
|
||||
font: /usr/share/fonts/truetype/UbuntuMono-Regular.ttf
|
||||
template: '%d.%m.%Y %H:%M:%S'
|
||||
posX: 16
|
||||
posY: 16
|
||||
audio:
|
||||
enabled: false
|
||||
volume: 30
|
||||
srate: 8000
|
||||
codec: opus
|
||||
outputEnabled: false
|
||||
outputVolume: 30
|
||||
rtsp:
|
||||
enabled: false
|
||||
port: 554
|
||||
nightMode:
|
||||
colorToGray: true
|
||||
irCutSingleInvert: false
|
||||
lightMonitor: false
|
||||
lightSensorInvert: false
|
||||
motionDetect:
|
||||
enabled: false
|
||||
visualize: false
|
||||
debug: false
|
||||
records:
|
||||
enabled: false
|
||||
path: /mnt/mmcblk0p1/%F
|
||||
split: 1
|
||||
maxUsage: 95
|
||||
notime: true
|
||||
outgoing:
|
||||
enabled: true
|
||||
naluSize: 1400
|
||||
wfb: true
|
||||
server:
|
||||
substream: false
|
||||
watchdog:
|
||||
enabled: true
|
||||
timeout: 300
|
||||
hls:
|
||||
enabled: false
|
||||
fpv:
|
||||
enabled: true
|
||||
noiseLevel: 1
|
||||
@@ -0,0 +1,6 @@
|
||||
iface eth0 inet static
|
||||
hwaddress ether $(fw_printenv -n ethaddr || echo 00:00:23:34:45:66)
|
||||
address 192.168.0.10
|
||||
netmask 255.255.255.0
|
||||
gateway 192.168.0.1
|
||||
post-up echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
||||
@@ -0,0 +1,10 @@
|
||||
auto wlan0
|
||||
iface wlan0 inet static
|
||||
address 192.168.0.10
|
||||
netmask 255.255.255.0
|
||||
gateway 192.168.0.1
|
||||
pre-up wpa_passphrase "$(fw_printenv -n wlanssid)" "$(fw_printenv -n wlanpass)" > /tmp/wpa_supplicant.conf
|
||||
pre-up sed -i 's/#psk.*/scan_ssid=1/g' /tmp/wpa_supplicant.conf
|
||||
pre-up wpa_supplicant -B -i wlan0 -D nl80211,wext -c /tmp/wpa_supplicant.conf
|
||||
post-up echo "nameserver 1.1.1.1" > /etc/resolv.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
@@ -0,0 +1,17 @@
|
||||
wireless:
|
||||
txpower: 10
|
||||
channel: 161
|
||||
width: 20
|
||||
mlink: 1500
|
||||
broadcast:
|
||||
mcs_index: 2
|
||||
tun_index: 1
|
||||
fec_k: 8
|
||||
fec_n: 12
|
||||
stbc: 0
|
||||
ldpc: 0
|
||||
link_id: 7669206
|
||||
telemetry:
|
||||
router: msposd
|
||||
serial: ttyS2
|
||||
osd_fps: 20
|
||||
Reference in New Issue
Block a user