Skip to content

gk7201v200_lite_xm-7201v2-02m10-sp2308-rtl8733bu-16mb: add the XM 7201V2_02M10 board - #267

Merged
openipc-ai merged 2 commits into
masterfrom
gk7201v200-xm-7201v2-02m10
Nov 21, 2026
Merged

openipc-ai merged 2 commits into
masterfrom
gk7201v200-xm-7201v2-02m10

Conversation

@openipc-ai

@openipc-ai openipc-ai commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Adds a profile for the XM72010200 board from #248. It's a GK7201V200 board with an SP2308 sensor (sold as OS02M10), RTL8733BU USB Wi-Fi and 16 MB NOR. The PCB silkscreen reads 7201V2_02M10_1.0, and the camera is sold as JN-107AR-D-WIFI.

It is copied from gk7201v200_lite_xm-7205-rtl8733bu-16mb, which has the same SoC, Wi-Fi and flash. What differs:

  • Sensor: fw_setenv sensor sp2308 with /etc/sensors/sp2308_i2c_1080p.ini. Firmware has shipped that file for this SoC since gk7201v200: SP2308 sensor (OS02M10, chip ID 0x5302) firmware#2864.
  • Wi-Fi: unchanged from the sibling's rtl8733bu-gk7201v200-xm profile, which pulls GPIO9 low and then loads the driver built from source. GPIO9 was confirmed active-low on this board. The sibling's S95wifi-tune script is not copied: it's generic RTL8733BU tuning, nobody on this board reported needing it, and the driver's power saving is already off from /etc/wireless/usb.
  • IR-cut pad (S71irmux): pad register 0x120c0014 defaults to 0x1e00 (JTAG_TCK), and the vendor xm_sysconfig module leaves it that way. Value 0x1e02 turns the pad into GPIO13, the day coil. The script runs after S70vendor, the same point at which the stock firmware writes it. GPIO13 and GPIO15 are held low first, so neither coil is driven while the pad changes function. muxes.sh won't do here: S30customizer runs it before the vendor modules load.
  • IR-cut pins: irCutPin1 15 (night) and irCutPin2 13 (day). That's the order owners verified by ear on three units. The IR LEDs are switched by the board's own light sensor, and no SoC pin reads that sensor, so day and night are decided from the picture (lightMonitor, colorToGray).
  • Audio: microphone on at 8 kHz A-law with gain 20, as tested. Speaker output is off: GPIO12 toggles during playback, but no sound came out and nobody has confirmed a speaker is fitted.
  • README: a row for the board.

Testing. Two owners verified the IR-cut pins and pad value, GPIO9 Wi-Fi power and the microphone on three units of this board. They were running their own builds, not this profile. The automatic day/night switching and the profile image itself have not run on a camera yet. ci-matrix.py --self-test passes.

…1V2_02M10 board

XM72010200 (GK7201V200) board with an SP2308 sensor (sold as OS02M10),
RTL8733BU USB Wi-Fi and 16 MB NOR, sold as JN-107AR-D-WIFI (#248). A copy
of gk7201v200_lite_xm-7205-rtl8733bu-16mb, the same SoC, Wi-Fi and flash:

- sensor sp2308 with /etc/sensors/sp2308_i2c_1080p.ini, which firmware
  ships for this SoC since OpenIPC/firmware#2864;
- Wi-Fi through the sibling's rtl8733bu-gk7201v200-xm profile, GPIO9 low
  then the driver built from source, as confirmed on this board;
- S71irmux: pad 0x120c0014 to 0x1e02 (GPIO13) after S70vendor, since
  xm_sysconfig leaves it as JTAG_TCK, with GPIO13 and GPIO15 held low;
- IR-cut on GPIO15 (night) and GPIO13 (day), day and night from the
  picture (the IR LEDs follow the board's own light sensor);
- microphone on at 8 kHz A-law, speaker output off.

The IR-cut pins and mux, Wi-Fi power and microphone were verified by
two owners on three units of this board running their own builds; this
profile itself has not run on one yet.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Add XM 7201V2_02M10 SP2308 camera profile

✨ Enhancement ⚙️ Configuration changes 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Add a 16 MB GK7201V200 profile for the XM 7201V2_02M10 camera.
Merge Risk 🟡 Medium

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • Audio and ONVIF are two delivery surfaces of the same board camera integration: the customizer enables the microphone and ONVIF service in the camera runtime.
  • They share the board-specific provisioning scope and do not affect unrelated devices.
Behavioral complexity 🟡 Medium 🧩 Coordinated invariants

  • Before, the pad is described as remaining in JTAG mode; after, the script first drives both coil GPIOs low and then changes pad mux state.
  • The new correctness condition is that the coil outputs remain inactive while the pad function changes and that the resulting GPIO numbers match Majestic's configured IR-cut pins.
  • This is a small but real ordering invariant, not merely routine GPIO setup.
Potential damage 🟡 Medium 🩹 Temporary loss

  • A wrong codec, rate, disabled output setting, or ONVIF setting can make microphone streaming or discovery unavailable.
  • The settings are recoverable by rerunning the customizer or changing the runtime configuration; reverting code alone does not necessarily undo values already written on a provisioned device.
  • Manual configuration or reprovisioning is supported in principle; an automatic repair worker or retry path is not shown.
Assessed commit c77d031
Diagram

graph TD
  Builder["Device builder"] --> Profile["Board profile"] --> Image["Firmware image"] --> Customizer["Board customizer"] --> Majestic["Majestic settings"]
  Image --> Init["Init scripts"] --> IRCut["IR-cut coils"]
  Init --> WiFi["USB Wi-Fi"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Share the sibling board's common overlay
  • ➕ Avoids duplicating RTL8733BU scripts and shared build settings.
  • ➖ Requires shared-overlay composition or builder changes and couples otherwise independent device profiles.

Recommendation: Keep the independent profile for this board: it follows the builder's per-device layout and isolates the sensor and IR-cut differences. Consider shared overlays if more boards repeat the same Wi-Fi configuration.

Files changed (7) +226 / -0

Enhancement (2) +74 / -0
S71irmuxPrepare the IR-cut GPIOs after vendor initialization +27/-0

Prepare the IR-cut GPIOs after vendor initialization

• Holds GPIO13 and GPIO15 low before changing pad 0x120c0014 from JTAG to GPIO13. Its S71 startup position places the change after the vendor module loads.

devices/gk7201v200_lite_xm-7201v2-02m10-sp2308-rtl8733bu-16mb/general/overlay/etc/init.d/S71irmux

S95wifi-tuneAdd RTL8733BU connection tuning +47/-0

Add RTL8733BU connection tuning

• Waits for wlan0, disables Turbo-EDCA retuning when available, and disables interface power management after association. Logs the resulting settings.

devices/gk7201v200_lite_xm-7201v2-02m10-sp2308-rtl8733bu-16mb/general/overlay/etc/init.d/S95wifi-tune

Documentation (1) +1 / -0
README.mdList the XM 7201V2_02M10 camera +1/-0

List the XM 7201V2_02M10 camera

• Adds the board, SoC, SP2308 sensor, RTL8733BU USB Wi-Fi, and 16 MB NOR flash to the device table. Marks the camera as testing and records its retail name.

README.md

Other (4) +151 / -0
gk7201v200_lite_xm-7201v2-02m10-sp2308-rtl8733bu-16mb_defconfigDefine the GK7201V200 lite build +73/-0

Define the GK7201V200 lite build

• Adds the board's ARM, kernel, toolchain, filesystem, and 16 MB flash settings. Selects the RTL8733BU driver and OpenIPC application packages.

devices/gk7201v200_lite_xm-7201v2-02m10-sp2308-rtl8733bu-16mb/br-ext-chip-goke/configs/gk7201v200_lite_xm-7201v2-02m10-sp2308-rtl8733bu-16mb_defconfig

usbPower and load the board's USB Wi-Fi +14/-0

Power and load the board's USB Wi-Fi

• Adds the sibling profile's RTL8733BU startup path: pull GPIO9 low, then load the 8733bu module with power-saving options disabled.

devices/gk7201v200_lite_xm-7201v2-02m10-sp2308-rtl8733bu-16mb/general/overlay/etc/wireless/usb

customizer.shSet board-specific sensor, IR-cut, and audio defaults +35/-0

Set board-specific sensor, IR-cut, and audio defaults

• Sets the SP2308 sensor profile, memory allocation, Wi-Fi device, and upgrade URL. Configures image-based day/night switching and IR-cut pins, enables 8 kHz A-law microphone input, and disables unconfirmed speaker output.

devices/gk7201v200_lite_xm-7201v2-02m10-sp2308-rtl8733bu-16mb/general/overlay/usr/share/openipc/customizer.sh

gk7201v200_lite.listExclude unused files from the lite image +29/-0

Exclude unused files from the lite image

• Adds an image exclusion list for unrelated sensor configurations, sensor libraries, and SCSI modules. This limits files included in the board's 16 MB flash image.

devices/gk7201v200_lite_xm-7201v2-02m10-sp2308-rtl8733bu-16mb/general/scripts/excludes/gk7201v200_lite.list

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

qodo-free-for-open-source-projects Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Generic Wi-Fi script sits in one device ⊘ Outdated
Description
S95wifi-tune is generic RTL8733BU tuning that reads /proc/net/rtl8733bu/wlan0 and disables
Turbo-EDCA and interface power management, with nothing specific to this board, yet it is added only
under this device's overlay and is absent from the PR description's change list. Any other RTL8733BU
device would need its own copy to get the same behaviour, duplicating a reusable firmware component
locally.

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Review of #267. S95wifi-tune came with the copy of the 7205 sibling: generic
RTL8733BU tuning (Turbo-EDCA off, WEXT power management off), nothing in it
about this board, and nobody on this board reported needing it -- the
owners' Wi-Fi ran without it. The driver's power saving is already off from
/etc/wireless/usb (rtw_power_mgnt=0 rtw_ips_mode=0), so the overlay keeps
only what this board needs.
@openipc-ai

Copy link
Copy Markdown
Contributor Author

Response to the Qodo review: S95wifi-tune is dropped in c77d031. It came with the copy of the 7205 sibling. It is generic RTL8733BU tuning with nothing specific to this board, nobody on this board reported needing it, and the driver's power saving is already turned off by /etc/wireless/usb (rtw_power_mgnt=0 rtw_ips_mode=0). The description now says so.

@openipc-ai
openipc-ai merged commit 25c1565 into master Nov 21, 2026
7 checks passed
@openipc-ai
openipc-ai deleted the gk7201v200-xm-7201v2-02m10 branch November 21, 2026 17:47
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.

1 participant