Skip to content

Commit 256e361

Browse files
committed
update uniview-c1l-2wn-g
1 parent 9270a6a commit 256e361

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
case "$1" in
4+
start)
5+
qrscan.sh >/dev/null 2>&1 &
6+
;;
7+
esac
Binary file not shown.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
3+
gpio=64 # RED COLOR LED, BLUE = 65
4+
n=0
5+
6+
gpio set 64
7+
gpio set 65
8+
9+
gpio clear ${gpio} | logger -t gpio
10+
11+
while true ; do
12+
if [ "$n" -ge 30 ]; then
13+
logger -t qrscan "Recognition timeout exceeded, reboot camera and try again..."
14+
gpio set ${gpio} | logger -t gpio
15+
exit 1
16+
fi
17+
timeout 1 wget -q -O /tmp/image.jpg http://127.0.0.1/image.jpg
18+
data=$(qrscan -p /tmp/image.jpg)
19+
if [[ -n "$data" ]] && $(echo "$data" | grep -q wlan); then
20+
fw_setenv $(echo $data | cut -d " " -f 1 | sed 's/=/ /')
21+
fw_setenv $(echo $data | cut -d " " -f 2 | sed 's/=/ /')
22+
logger -t qrscan "Recognition successfully, wlanssid and wlanpass is writed to env. Reboot required."
23+
curl --data-binary @/usr/lib/sounds/ready_48k.pcm http://localhost/play_audio
24+
sleep 3
25+
reboot -f
26+
fi
27+
sleep 1
28+
n=$((n + 1))
29+
done

devices/ssc335de_lite_uniview-c1l-2wn-g/general/overlay/usr/share/openipc/customizer.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/s
1010
#
1111
# Set custom majestic settings
1212
#
13-
cli -s .system.staticDir /var/www/majestic
1413
cli -s .image.mirror true
1514
cli -s .image.flip true
1615
cli -s .nightMode.irCutPin1 61
1716
cli -s .nightMode.irCutPin2 79
1817
cli -s .nightMode.backlightPin 4
1918
cli -s .nightMode.colorToGray true
19+
cli -s .video0.fps 25
20+
cli -s .audio.enabled true
21+
cli -s .audio.outputEnabled true
22+
cli -s .audio.outputVolume 80
2023
cli -s .audio.speakerPin 0
2124
cli -s .video0.codec h264
2225
#

0 commit comments

Comments
 (0)