fix name format

This commit is contained in:
cronyx
2025-02-16 21:08:07 +03:00
parent 011f954925
commit e43425ac0b
10 changed files with 2 additions and 2 deletions
@@ -0,0 +1,26 @@
#!/bin/sh
gpio=10 # RED COLOR LED
n=0
gpio clear ${gpio} | logger -t gpio
while true ; do
if [ "$n" -ge 30 ]; then
logger -t qrscan "Recognition timeout exceeded, reboot camera and try again..."
gpio set ${gpio} | logger -t gpio
exit 1
fi
timeout 1 wget -q -O /tmp/image.jpg http://127.0.0.1/image.jpg
data=$(qrscan -p /tmp/image.jpg)
if [[ -n "$data" ]] && $(echo "$data" | grep -q wlan); then
fw_setenv $(echo $data | cut -d " " -f 1 | sed 's/=/ /')
fw_setenv $(echo $data | cut -d " " -f 2 | sed 's/=/ /')
logger -t qrscan "Recognition successfully, wlanssid and wlanpass is writed to env. Reboot required."
curl --data-binary @/usr/lib/sounds/ready_48k.pcm http://localhost/play_audio
sleep 3
reboot -f
fi
sleep 1
n=$((n + 1))
done
@@ -0,0 +1,40 @@
#!/bin/sh
#
# Perform basic settings on a known IP camera
#
#
# Set osmem & sensor
#
fw_setenv osmem 64M
fw_setenv sensor sp2305
#
# Set custom upgrade url
#
fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/hi3516ev300_ultimate_rostelecom-ipc8232swc-we-nor.tgz'
#
#
# Set custom majestic settings
#
cli -s .video0.codec h264
cli -s .nightMode.irCutPin1 63
cli -s .nightMode.irCutPin2 67
cli -s .nightMode.backlightPin 72
cli -s .nightMode.colorToGray true
cli -s .nightMode.lightMonitor false
cli -s .nightMode.monitorDelay 5
cli -s .nightMode.minThreshold 1500
cli -s .nightMode.maxThreshold 20000
cli -s .audio.enabled true
cli -s .audio.outputEnabled true
cli -s .audio.outputVolume 80
cli -s .audio.speakerPin 28
cli -s .audio.srate 48000
#
#
# Set wlan device and credentials if need
#
fw_setenv wlandev rtl8188fu-generic
#fw_setenv wlanssid Router
#fw_setenv wlanpass 12345678
exit 0