RutgerWillemsIf you're not sure, call me Will
Resources

XiaoFang 1S Thingino flashing guide

How to flash Thingino open-source firmware onto a Xiaomi XiaoFang 1S (iSC5) over USB. Covers the backup, the flash, first setup, and the fixes you’ll need afterwards.

Tested on: 2 units, 2026-11, macOS (Apple Silicon), thingino-dfu 1.5.43, Thingino image built 2026-11-05 (“ciao”).

Hardware

PartValue
SoCIngenic T20L (T20-Lite), 64 MB RAM. The chip may be printed just “T20”.
SensorJXF23 (both units). JXF22 variants exist.
FlashGigaDevice GD25Q127C (16 MB SPI NOR, SOIC-8)
Wi-FiRTL8189FTV (SDIO, 2.4 GHz only)
PortsMicro-USB = power only. Full-size USB-A = SoC USB data.
Imagethingino-xiaomi_xiaofang_t20l_jxf23_rtl8189ftv.bin (camera page)

The board is a clone of the Wyze Cam V2 (thingino #728). The Wyze V2 SD-card installer does not work on this camera: its installer kernel is built for 128 MB of RAM (T20X).

You need

  • A USB-A to USB-A cable (or USB-A to USB-C) with data lines.
  • Tweezers or a fine piece of wire.
  • A Phillips screwdriver.
  • thingino-dfu (CLI), or webflash.thingino.com (Chrome/Edge only).

1. Get into USB boot mode (tested)

  1. Remove the 2 screws and pull the housing apart, so the speaker backplate comes out and the board is exposed.
  2. Find the 8-pin flash chip next to the SoC. Pins are numbered counter-clockwise from the pin-1 dot. Pins 5 and 6 are the two pins at the corner diagonally opposite the dot (USB Boot Mode wiki, SOIC-8 pinout). Short pins on the flash chip only, never on the SoC.
  3. Connect the A-to-A cable to the camera’s USB-A port. Don’t connect micro-USB power: the camera must be powered only from the computer.
  4. Short pins 5 and 6, plug the cable into the computer while holding the short, then hold for about 5 s and release.
  5. Check the result:
    • LED off and a USB device a108:c309 (“Ingenic USB Boot Device”) appears: it worked.
    • LED blinking: the stock firmware booted, so the short missed. Unplug and retry.
    • Nothing appears at all: you’re on the micro-USB port, or the cable is charge-only.

Check the device appeared:

  • macOS: ioreg -p IOUSB -l | grep -A3 41224 (41224 is 0xa108 in decimal).
  • Linux: lsusb | grep a108

2. Back up the stock firmware, then flash (tested)

On macOS, first clear the download quarantine flag: xattr -dr com.apple.quarantine <thingino-dfu dir>. Then:

./thingino-dfu -l                        # should list SoC t20l, stage bootrom
./thingino-dfu -r stock-1.bin            # full 16 MB read (~1 min)
./thingino-dfu -r stock-2.bin
shasum -a 256 stock-*.bin                # the two hashes must match
./thingino-dfu -w thingino-xiaomi_xiaofang_t20l_jxf23_rtl8189ftv.bin --verify
  • Check the image’s checksum against the .sha256sum file published next to it on the releases page before writing.
  • You want to see Verify OK.
  • Each backup only works on the camera it came from. Keep it if you might ever want to go back to stock.

3. First boot

  1. Unplug the camera and power it from the micro-USB port.
  2. Join the camera’s THINGINO-xxxx hotspot. A setup page opens; if not, go to http://172.16.0.1.
  3. Fill in:
    • Hostname
    • Root password
    • Your SSH public key (recommended)
    • A 2.4 GHz SSID and its password
    • Leave Act as AP off.

If you typed the Wi-Fi details wrong (tested), you don’t need to reflash:

  1. Put a FAT32 SD card in the camera with a uenv.txt in its root folder:
    wlan_ssid=Your Network
    wlan_pass=your-password
    No quotes, Unix line endings. Don’t create it in TextEdit or other rich-text editors.
  2. Power-cycle the camera. It reads the file on every boot (S38wpa_supplicant).
  3. Once it’s on Wi-Fi, delete the file, because it holds your password in plain text: rm /mnt/mmcblk0p1/uenv.txt.

Reflashing also works: the full image overwrites the saved settings.

4. Fix: 1080p stream gives no video (tested, needed on both units)

Symptom: RTSP ch0 connects but never delivers frames. logread shows:

  • IMP_FrameSource_EnableChn(0) ... failed (DMA exhausted?)
  • repeated Encoder ch0: 10 consecutive polling timeouts

Cause: the default memory split (ispmem=15M, rmem=15M) leaves too little reserved memory for 1080p frame buffers.

Fix: use the same layout as the stock Xiaomi firmware (ISP 8 MB, rmem 22 MB). The kernel’s own 34 MB stays as it is.

ssh root@<camera-ip>
fw_setenv ispmem 8M@0x2200000
fw_setenv rmem 22M@0x2A00000
reboot

Undo: fw_setenv ispmem 15M@0x2200000; fw_setenv rmem 15M@0x3100000; reboot.

After the fix, both units streamed 1920×1080 over RTSP.

5. Streams and defaults

WhatValue
Main stream (1080p)rtsp://thingino:thingino@<ip>/ch0
Sub stream (768×432)rtsp://thingino:thingino@<ip>/ch1
MJPEG / APIport 8080. Stream user thingino with password thingino: change it.
Web UI and SSHroot with the password you set during setup
Snapshot/x/ch0.jpg (needs a web session or API key)

Quick check that video works: ffmpeg -rtsp_transport tcp -i rtsp://thingino:thingino@<ip>/ch0 -frames:v 1 test.jpg