Adding integration of three new devices on the T31N processor

This commit is contained in:
Ystinia Zalatova (from Futurae PC)
2025-08-24 21:26:08 +01:00
parent 4d418cfe4c
commit d508523872
25 changed files with 735 additions and 0 deletions
@@ -0,0 +1,37 @@
#!/bin/sh
if [ -e /usr/share/openipc/gpio.conf ]; then
. /usr/share/openipc/gpio.conf
fi
[ -z $button ] && echo "GPIO pin for resetd is not set" | logger -t resetd && exit
# Counter for button press until reset
count=0
# prepare the pin
if [ ! -d /sys/class/gpio/gpio${button} ]; then
echo "${button}" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio${button}/direction
fi
# continuously monitor current value of reset switch
while [ true ]; do
if [ "$(cat /sys/class/gpio/gpio${button}/value)" -eq 1 ]; then
count=0
else
count=$((count+1))
# 20 counts =~ 5 seconds @ 0.25 sleep intervals
if [ $count -eq 20 ]; then
#echo 'SET WIFI' | logger -t resetd
#fw_setenv wlanssid WIFI
#fw_setenv wlanpass 12345678
for a in $(seq 10) ; do (gpio toggle ${led1} ; sleep 0.3 ; gpio toggle ${led1} ; sleep 0.3) ; done >/dev/null 2>&1
echo 'RESETTING FIRMWARE' | logger -t resetd
firstboot
fi
fi
# This interval uses 1% CPU. Less sleep = more CPU
sleep 0.25
done
@@ -0,0 +1,51 @@
#!/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/t23_lite_lsc-3215672-nor.tgz'
#
#
# Set custom majestic settings
#
cli -s .video0.codec h264
cli -s .nightMode.irCutPin1 58
cli -s .nightMode.irCutPin2 57
cli -s .nightMode.backlightPin 61
cli -s .nightMode.monitorDelay 5
cli -s .nightMode.lightMonitor true
cli -s .nightMode.minThreshold 10
cli -s .nightMode.maxThreshold 100
cli -s .osd.enabled true
cli -s .osd.template "OpenIPC | %F %T %Z"
cli -s .audio.enabled true
cli -s .audio.codec aac
cli -s .audio.srate 48000
cli -s .audio.volume 95
cli -s .audio.gain 25
cli -s .audio.outputEnabled true
cli -s .audio.outputVolume 80
cli -s .audio.speakerPin 63
#
#
# Set wlan device and credentials if need
#
fw_setenv wlandev atbm601x-t23-lsc-3215672
#fw_setenv wlanssid Router
#fw_setenv wlanpass 12345678
#
#
# Set osmem and rmem
#
fw_setenv osmem 45M@0x0
fw_setenv rmem 19M@0x2D00000
#
#
#adduser viewer -s /bin/false -D -H ; echo viewer:123456 | chpasswd
#
(sleep 3 ; reboot -f) &
#
exit 0
@@ -0,0 +1,13 @@
alarm_in=-1
alarm_out=-1
button=6
ircut1=57
ircut2=58
led1=51
led2=-1
light_ir=61
light_wl=-1
light_sensor=-1
mmc_pwr=-1
speaker=63
usb=62
@@ -0,0 +1,4 @@
#!/bin/sh
### set leds to off ###
gpio set 51