Add ssc378qe_apfpv_defconfig

This commit is contained in:
viktorxda
2025-08-05 00:42:25 +02:00
parent 3382186784
commit e05c0261be
13 changed files with 344 additions and 22 deletions
+56
View File
@@ -0,0 +1,56 @@
#!/bin/sh
set_config() {
cat << EOF > /tmp/wpa_supplicant.conf
network={
mode=2
frequency=$(fw_printenv -n wlanfreq || echo 2412)
ssid="$(fw_printenv -n wlanssid || echo OpenIPC)"
psk="$(fw_printenv -n wlanpass || echo 12345678)"
}
EOF
}
case "$1" in
setup)
for card in $(lsusb | awk '{print $6}' | uniq); do
case "$card" in
"0bda:8812" | "0bda:881a" | "0b05:17d2" | "2357:0101" | "2604:0012")
driver=8812au
;;
"0bda:a81a")
driver=8812eu
;;
"0bda:f72b" | "0bda:b733")
driver=8733bu
;;
esac
done
if [ -z "$driver" ]; then
echo "Wireless module not detected!"
exit 1
fi
echo "Detected driver: $driver"
modprobe "$driver" rtw_tx_pwr_by_rate=0 rtw_tx_pwr_lmt_enable=0
;;
start)
iw wlan0 set txpower fixed $(fw_printenv -n wlanpwr || echo 1500)
set_config
wpa_supplicant -B -i wlan0 -c /tmp/wpa_supplicant.conf
udhcpd -S
;;
stop)
killall -q udhcpd wpa_supplicant
;;
*)
echo "Usage: $0 {setup|start|stop}"
exit 1
;;
esac
@@ -0,0 +1,21 @@
#!/bin/sh
#
# Perform basic settings on a known IP camera
#
#
# Set custom upgrade url
#
fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/openipc.ssc378qe-nor-apfpv.tgz'
#
#
# Set custom majestic settings
#
cli -s .isp.exposure 15
cli -s .video0.fps 60
cli -s .video0.bitrate 12000
cli -s .video0.codec h265
cli -s .video0.rcMode avbr
cli -s .outgoing.enabled true
cli -s .outgoing.server udp://224.0.0.1:5600
cli -s .records.split 5
cli -s .records.notime true