Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ TP-Link Tapo C110 v1 SSC335 SC3335 ATBM6032i_USB NOR_8M done
TP-Link Tapo C110 v1 SSC337 SC3335 SSW101B_USB NOR_8M done
TP-Link Tapo C110 v2 SSC333 SC3338 SSW101B_USB NOR_8M done
TP-Link Tapo C110 v26 SSC333 ? ? NOR_? done
TP-Link Tapo C120 SSC377 SC430AI RTL8188FU_USB NOR_16M testing
TP-Link Tapo C310 v1 SSC325 SC3335 RTL8192EU_USB NOR_8M in progress
TP-Link Tapo C310 v2.20 SSC335 SC3338 RTL8192EU_USB NOR_8M testing
TP-Link Tapo TC60 V5 T23N WQ9001_? NOR_8M **INIT** - frozen
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Architecture
BR2_arm=y
BR2_cortex_a35=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_ARM_INSTRUCTIONS_THUMB2=y

# Toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-musleabihf"
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_10=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y

# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_KERNEL).tar.gz"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/infinity6c-ssc027a.config"
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_XZ=y

# Filesystem
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL)/package/busybox/busybox.config"
BR2_PACKAGE_EXFATPROGS=y
BR2_PACKAGE_UBOOT_TOOLS=y
BR2_PACKAGE_ZLIB=y
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
# BR2_PACKAGE_WIREGUARD_LINUX_COMPAT is not set
BR2_PACKAGE_WIREGUARD_TOOLS=y
BR2_PACKAGE_WIRELESS_REGDB=y
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_WPA_SUPPLICANT_OPENIPC=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_SQUASHFS=y
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y

# OpenIPC
BR2_OPENIPC_SOC_VENDOR="sigmastar"
BR2_OPENIPC_SOC_MODEL="ssc377"
BR2_OPENIPC_SOC_FAMILY="infinity6c"
BR2_OPENIPC_VARIANT="lite"
BR2_OPENIPC_FLASH_SIZE="16"

# Packages
BR2_PACKAGE_DROPBEAR_OPENIPC=y
BR2_PACKAGE_EXFAT_OPENIPC=y
BR2_PACKAGE_IPCTOOL=y
BR2_PACKAGE_LIBCURL_OPENIPC=y
BR2_PACKAGE_LIBCURL_OPENIPC_CURL=y
# BR2_PACKAGE_LIBCURL_OPENIPC_PROXY_SUPPORT is not set
# BR2_PACKAGE_LIBCURL_OPENIPC_COOKIES_SUPPORT is not set
# BR2_PACKAGE_LIBCURL_OPENIPC_EXTRA_PROTOCOLS_FEATURES is not set
BR2_PACKAGE_LIBEVENT_OPENIPC=y
BR2_PACKAGE_LIBOGG_OPENIPC=y
BR2_PACKAGE_MAJESTIC_FONTS=y
BR2_PACKAGE_MAJESTIC_WEBUI=y
BR2_PACKAGE_MAJESTIC=y
BR2_PACKAGE_MBEDTLS_OPENIPC=y
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
BR2_PACKAGE_RTL8188FU_OPENIPC=y
BR2_PACKAGE_SIGMASTAR_OSDRV_INFINITY6C=y
BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh
# Tapo C120: majestic drives the IR-cut filter on GPIO 81 (1 = day, 0 = night) but has no
# IR-LED output in this build, so mirror the night state onto the IR LEDs (GPIO 12 + 13).
PID=/var/run/irled.pid
case "$1" in
start)
for p in 12 13; do
[ -d /sys/class/gpio/gpio$p ] || echo $p > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio$p/direction
done
(
last=
while :; do
v=$(cat /sys/class/gpio/gpio81/value 2>/dev/null)
if [ -n "$v" ] && [ "$v" != "$last" ]; then
for p in 12 13; do echo $((1 - v)) > /sys/class/gpio/gpio$p/value; done
last=$v
fi
sleep 3
done
) &
echo $! > $PID
Comment on lines +21 to +22

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

3. Repeated starts leave hidden workers 🐞 Bug ☼ Reliability

The start branch of S96irled always launches another infinite polling subshell and overwrites
the single PID file without checking for an existing worker. After multiple starts, stop
terminates only the newest PID while older loops continue polling and controlling both LED GPIOs.
Agent Prompt
## Issue description
Every `start` invocation creates another infinite IR LED polling worker, but only the newest process remains addressable through the PID file.

## Fix Focus Areas
- devices/ssc377_lite_tp-link-tapo-c120/general/overlay/etc/init.d/S96irled[11-22]
- devices/ssc377_lite_tp-link-tapo-c120/general/overlay/etc/init.d/S96irled[24-25]

## Recommended Fix
Before launching, validate the PID file with `kill -0` and treat an existing live worker as already started; remove stale PID files before creating a new worker. Alternatively, move the loop into an executable managed by `start-stop-daemon` with a PID file.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

;;
stop)
[ -f $PID ] && kill "$(cat $PID)" 2>/dev/null; rm -f $PID
Comment on lines +24 to +25

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Stopping leaves ir illuminators on 🐞 Bug ☼ Reliability

The stop branch of S96irled kills the polling process without driving GPIOs 12 and 13 low or
releasing them. If the service is stopped while night mode is active, both illuminator banks retain
their last asserted output after the service has supposedly stopped.
Agent Prompt
## Issue description
Stopping the IR LED service leaves GPIOs 12 and 13 at their previous values, which can keep both illuminator banks enabled.

## Fix Focus Areas
- devices/ssc377_lite_tp-link-tapo-c120/general/overlay/etc/init.d/S96irled[7-10]
- devices/ssc377_lite_tp-link-tapo-c120/general/overlay/etc/init.d/S96irled[24-25]

## Recommended Fix
After terminating the worker, explicitly drive GPIOs 12 and 13 low and unexport the lines owned by this service so stopping establishes a safe off state.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

;;
restart)
$0 stop; $0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"; exit 1
;;
esac
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

set_gpio() {
[ "$2" -eq 1 ] && gpio set $1 || gpio clear $1
sleep 1
}

# The RTL8188FTV sits on a USB daughterboard whose power is gated by GPIO 42
if [ "$1" = "rtl8188fu-tapo-c120" ]; then
set_gpio 42 1
sleep 2
modprobe 8188fu
exit 0
Comment on lines +12 to +13

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Wi-fi failures are reported as success 🐞 Bug ☼ Reliability

The wireless USB script runs modprobe 8188fu and then unconditionally returns zero instead of
preserving the command's status. When the module is missing or cannot load, wireless initialization
receives a successful result even though no interface was created.
Agent Prompt
## Issue description
The C120 wireless profile returns success even when `modprobe 8188fu` fails, masking a failed Wi-Fi initialization.

## Fix Focus Areas
- devices/ssc377_lite_tp-link-tapo-c120/general/overlay/etc/wireless/usb[12-13]

## Recommended Fix
Replace the `modprobe` followed by unconditional `exit 0` with `exec modprobe 8188fu`, or explicitly capture and return the command's exit status.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

fi

exit 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/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/ssc377_lite_tp-link-tapo-c120-nor.tgz'
#
#
# Set custom majestic settings
#
cli -s .nightMode.irCutPin1 81
cli -s .nightMode.irCutSingleInvert true
cli -s .nightMode.backlightPin 14
cli -s .nightMode.colorToGray true
cli -s .audio.codec opus
#
#
# Set wlan device and credentials if need
#
fw_setenv wlandev rtl8188fu-tapo-c120
fw_setenv sensor sc430ai
#fw_setenv wlanssid Router
#fw_setenv wlanpass 12345678

exit 0
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/etc/sensors/gc4653.bin
/etc/sensors/imx335.bin
/etc/sensors/imx415.bin
/etc/sensors/os04a10.bin
/etc/sensors/sc401ai.bin
/etc/sensors/sc830ai.bin
#
/lib/modules/5.10.61/sigmastar/sensor_gc4653_mipi.ko
/lib/modules/5.10.61/sigmastar/sensor_imx335_mipi.ko
/lib/modules/5.10.61/sigmastar/sensor_imx415_mipi.ko
/lib/modules/5.10.61/sigmastar/sensor_os04a10_mipi.ko
/lib/modules/5.10.61/sigmastar/sensor_sc401ai_mipi.ko
/lib/modules/5.10.61/sigmastar/sensor_sc4336p_mipi.ko
/lib/modules/5.10.61/sigmastar/sensor_sc450ai_mipi.ko
/lib/modules/5.10.61/sigmastar/sensor_sc501ai_mipi.ko
/lib/modules/5.10.61/sigmastar/sensor_sc830ai_mipi.ko
/lib/modules/5.10.61/sigmastar/sensor_sc850sl_mipi.ko
Loading