Skip to content

sigmastar: infinity6c: load the SmartSens SC430AI (TP-Link Tapo C120) - #2445

Merged
openipc-ai merged 2 commits into
OpenIPC:masterfrom
nzzane:tapo-c120-sc430ai
Sep 19, 2026
Merged

openipc-ai merged 2 commits into
OpenIPC:masterfrom
nzzane:tapo-c120-sc430ai

Conversation

@nzzane

@nzzane nzzane commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Companion to OpenIPC/sensors#7 (the driver). Fixes the "no video" part of #1654 / #1766.

  • load_sigmastar: add sc430ai to the experimental sensor list.

The sensor's IQ file (/etc/sensors/sc430ai.bin) is not part of this PR: the only copy comes from the camera's stock firmware and there is no vendor SDK release or source for it, which the repo's binary policy rules out. The wiki page for the Tapo C120 will tell users where to take it from in their own stock dump.

Tested on a TP-Link Tapo C120 (SSC377, ssc377_lite) with the driver from sensors#7 and the stock load_sigmastar flow: sensor_config.ko + srcfg 0 1 0 0 0 0, ipcinfo -s → sc430ai, fw_setenv sensor; majestic runs at 2688x1520@30, RTSP/JPEG working.

Not in this PR (board-specific, for the wiki): the C120's Wi-Fi is an RTL8188FTV on USB whose power is gated by GPIO 42, and the ssc377 build currently has no 8188fu / cfg80211; WPA3 networks also need CONFIG_SAE in wpa_supplicant.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add SC430AI support for SigmaStar Infinity6C

✨ Enhancement 🕐 Less than 10 minutes

Grey Divider

AI Description

• Enables experimental SC430AI sensor module loading on SigmaStar Infinity6C.
• Adds stock IQ/API tuning data for TP-Link Tapo C120 cameras.
• Complements the external sensor driver to restore 2688×1520 video output.
Diagram

graph TD
  S["SC430AI Sensor"] --> D["Sensor Detection"] --> L["load_sigmastar"] --> M["SC430AI Module"] --> I["SigmaStar ISP"] --> V["Video Output"]
  C["SC430AI IQ File"] --> I
Loading
High-Level Assessment

The PR uses the established Infinity6C sensor integration path: add the sensor to the experimental loader case and package its matching IQ profile. Board-specific detection logic is unnecessary because the existing ipcinfo and srcfg flow already identifies SC430AI; keeping the kernel driver in the companion sensors repository also preserves current responsibility boundaries.

Files changed (2) +1 / -1 · 1 not counted

Enhancement (1) +1 / -1
load_sigmastarEnable experimental SC430AI module loading +1/-1

Enable experimental SC430AI module loading

• Adds sc430ai to the experimental sensor case so the standard loader inserts sensor_sc430ai_mipi.ko with the existing channel mapping.

general/package/sigmastar-osdrv-infinity6c/files/script/load_sigmastar

Other (1)
sc430ai.binPackage SC430AI ISP tuning data not counted

Package SC430AI ISP tuning data

• Adds the SigmaStar IQ/API profile sourced from the Tapo C120 stock firmware. The existing package installation wildcard places it under /etc/sensors for ISP use.

general/package/sigmastar-osdrv-infinity6c/files/sensor/configs/sc430ai.bin

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Image tuning cannot be rebuilt 🐞 Bug ⚙ Maintainability
Description
sc430ai.bin is an opaque tuning binary copied from stock camera firmware, while the package
exposes no vendor SDK release or buildable source that can produce it. When this sensor needs a fix
or compatibility update, maintainers can only preserve or replace the extracted artifact, which the
project explicitly treats as unsupported.
Code

general/package/sigmastar-osdrv-infinity6c/files/script/load_sigmastar[49]

+		gc8613ya|os03a10|os08a10|sc430ai|sc450ai|sc535hai|sc835hai|sp4329)
Evidence
The PR description identifies the added tuning file as coming from the camera's stock firmware,
while the package rule installs the selected local binary directly into the image. The repository's
documented hard gate states that factory-firmware binaries without a vendor SDK or buildable source
cannot be fixed or rebuilt and must not reach master.

general/package/sigmastar-osdrv-infinity6c/files/script/load_sigmastar[49-51]
general/package/sigmastar-osdrv-infinity6c/sigmastar-osdrv-infinity6c.mk[18-20]
best_practices.md[159-171]
best_practices.md[454-461]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The newly enabled sensor depends on an image-tuning binary extracted from stock camera firmware. The repository requires added binaries to trace to a vendor SDK release or a buildable source tree; documenting that no source exists does not satisfy this requirement.
## Fix Focus Areas
- general/package/sigmastar-osdrv-infinity6c/files/script/load_sigmastar[49-51]
- general/package/sigmastar-osdrv-infinity6c/sigmastar-osdrv-infinity6c.mk[18-20]
## Recommended Fix
Replace the extracted tuning binary with an artifact obtained from a documented vendor SDK release or generated from a buildable source tree, and record that reproducible source in the package metadata. If no such source is available, remove the SC430AI activation and binary until a supportable artifact can be supplied.

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


Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Load sensor_sc430ai_mipi.ko (OpenIPC/sensors#7). Detection needs nothing
new: ipcinfo -s already reports sc430ai and the default srcfg works on the
Tapo C120. The IQ file is not included (no vendor SDK release carries it);
users take /etc/sensors/sc430ai.bin from their camera's stock firmware.
@nzzane nzzane changed the title sigmastar: infinity6c: support the SmartSens SC430AI (TP-Link Tapo C120) sigmastar: infinity6c: load the SmartSens SC430AI (TP-Link Tapo C120) Sep 18, 2026
@nzzane

nzzane commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Dropped sc430ai.bin from the PR — it was extracted from the stock firmware and no vendor SDK release carries it, so it does not meet the binary policy. The load script change stands on its own; the IQ file will be documented on the wiki as something users copy from their own stock dump.

@openipc-ai openipc-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The one-liner is right: additive, alphabetically placed, no shared default repointed. Two notes and a suggestion.

The Qodo finding above is stale. It flags sc430ai.bin as an unbuildable binary, but you already dropped that from the PR — what's left is the case-arm entry alone. Nobody should bounce this for the .bin.

Merge order. Sensor modules come from sigmastar-osdrv-sensors, which builds openipc/sensors at HEAD, so this needs OpenIPC/sensors#7 in first or insmod sensor_sc430ai_mipi.ko hits a file that isn't there. (For what it's worth the arm already names six sensors with no driver in that repo at all — gc8613ya, os03a10, os08a10, sc535hai, sc835hai, sp4329 — so you're in good company, but yours will actually load.)

Marking this changes-requested purely to hold the ordering, not because anything in the diff is wrong.

A trap that will waste your afternoon. SIGMASTAR_OSDRV_SENSORS_VERSION = HEAD produces a tarball named sensors-HEAD.tar.gz, and Buildroot's dl cache keys on the filename, so it keeps the first copy forever. The Makefile's prepare target expires the majestic tarballs and nothing else. After #7 merges, a local rebuild will quietly keep building the old sensor set until you rm -rf output-*/buildroot-*/dl/sigmastar-osdrv-sensors. CI is unaffected because it downloads into an empty cache.

The suggestion. Looking at all four of your PRs together — this, sensors#7, wiki#549 and #2449 — you are one PR short of a clean landing, and it is the one nobody has asked you for: a device in OpenIPC/builder.

Everything C120-specific currently has nowhere to go, so it is being spread across the generic tree and the wiki: #2449 flips ssc377_lite for a board that ships no Wi-Fi driver, and the wiki page prescribes a 16 MB flash layout, a CONFIG_CFG80211=y kernel and a hand-copied IQ file that no defconfig in this tree produces. A ssc377_lite_tp-link-tapo-c120 device under devices/ holds all of that in one place — the layout, the kernel config, BR2_PACKAGE_RTL8188FU_OPENIPC=y, BR2_PACKAGE_WPA_SUPPLICANT_OPENIPC=y. The precedent already exists: ssc377qe_fpv_ccdcam-im50q01-tipoman is an ssc377 device there at FLASH_SIZE="16".

With that in place, this PR and sensors#7 merge into the generic tree as-is because they genuinely are generic, #2449 drops its defconfig hunk, and the wiki page points at a device instead of being a build-it-yourself recipe.

nzzane added a commit to nzzane/builder that referenced this pull request Sep 19, 2026
SSC377, SmartSens SC430AI, 16 MB NOR, RTL8188FTV on USB. The generic
ssc377_lite defconfig with the 16 MB layout, the rtl8188fu driver and the
SAE-capable wpa_supplicant-openipc; the Wi-Fi module's power gate (GPIO 42)
in the wireless/usb entry; IR-cut, backlight and IR LED pins; the SC430AI
IQ file.

Depends on OpenIPC/sensors#7 (driver), OpenIPC/firmware#2445 (loader entry)
and OpenIPC/firmware#2449 (supplicant package).
@nzzane

nzzane commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

Nothing to change in the diff; holding for OpenIPC/sensors#7 is right, and thanks for the sensors-HEAD.tar.gz cache note — that is exactly what happened here on the first local rebuild.

Taking the builder suggestion: OpenIPC/builder#162 adds ssc377_lite_tp-link-tapo-c120 with the 16 MB layout, BR2_PACKAGE_RTL8188FU_OPENIPC=y, BR2_PACKAGE_WPA_SUPPLICANT_OPENIPC=y (from #2449), the IQ file, the wireless/usb entry and the IR-cut/LED pins. It uses the stock infinity6c-ssc027a.config unchanged: cfg80211 as a module works with 8188fu (cfg80211 184320 1 8188fu on the camera), so the 3 MB-kernel claim on the wiki page was wrong and is being corrected there. #2449 drops its ssc377_lite hunk accordingly.

@openipc-ai openipc-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The ordering hold is satisfied — OpenIPC/sensors#7 is merged (0294a00), so sensor_sc430ai_mipi.ko now exists for the insmod this adds.

CI was green on 64a7060 (all six infinity6c boards, every gate). Updating the branch for master and merging once it comes back.

@openipc-ai
openipc-ai merged commit e155691 into OpenIPC:master Sep 19, 2026
26 checks passed
openipc-ai pushed a commit to OpenIPC/builder that referenced this pull request Sep 19, 2026
SSC377, SmartSens SC430AI, 16 MB NOR, RTL8188FTV on USB. The generic
ssc377_lite defconfig with the 16 MB layout, the rtl8188fu driver and the
SAE-capable wpa_supplicant-openipc; the Wi-Fi module's power gate (GPIO 42)
in the wireless/usb entry; IR-cut, backlight and IR LED pins; the SC430AI
IQ file.

Depends on OpenIPC/sensors#7 (driver), OpenIPC/firmware#2445 (loader entry)
and OpenIPC/firmware#2449 (supplicant package).

Co-authored-by: nzzane <12163646+nzzane@users.noreply.github.com>
johnchia pushed a commit to johnchia/firmware that referenced this pull request Sep 23, 2026
…OpenIPC#2445)

Co-authored-by: nzzane <12163646+nzzane@users.noreply.github.com>
Co-authored-by: OpenIPC AI team <ai@openipc.org>
(cherry picked from commit e155691)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants