Skip to content

Camera: Xiaomi Mijia1080p (SXJ02ZM)

Juan Carlos Ortiz edited this page Jan 25, 2025 · 4 revisions

Xiaomi Mijia 1080p Camera [SXJ02ZM]

This page outlines the necessary changes required to run the Thingino firmware on the Xiaomi Mijia 1080p camera, also known as the SXJ02ZM.

image

The camera specifications are as follows:

  • Processor: Ingenic T20L
  • SPI Flash: Windbond W25Q128JVSO
  • Audio Amp: Chipstar CS8122S
  • Wifi Chip: Realtek RTL8189FTV
  • CMOS Image Sensor: PS5250

Stock firmware bootlog

Getting the Firmware

You have several options to obtain a compiled binary for this camera:

  1. Precompiled release
  2. Compile your own firmware

Compiling the Firmware

It is recommended to use the LXC or Docker-based development environment prepared for compiling Thingino.
Once the environment is set up, run ./user_menu.sh and select the camera xiaomi_sxj02zm.
After several minutes, the firmware will be compiled, and you will get a file named thingino-xiaomi-sxj02zm.bin.

Flashing the firmware

1. Needed material

  1. CH341A Programmer
  2. Programmer Testing Clip for SOP8 packages
  3. Programmer Software like CH341Av1.29 or Colibri_CH341
  4. Soldering iron
  5. Solder Flux
  6. Phillips Screwdrivers (size PH00, or PH0)
  7. A piece of plastic foil (e.g. kapton tape) to isolate the vcc pin when programming the chip

image

2. Case disassembly

  • Remove the back of the camera, starting from the botton.

image

  • After the back has been losen, carefully remove the speaker/mic connector before removing the back.

image

  • Unscrew the 3 black screws to separate the board from the front cover. Leave the middle screws in there!

image

2. Desoldering

  • Desolder the VCC leg (Leg 8) of the SOP8 chip.

image image

  • Put a piece of plastic foil between the desoldered leg and the PCB. We do this to avoid powering-up the whole PCB through the chip+programmer, as the chip would net be flashable like this.

image

3. Conecting the SPI Flash to the programmer

  • Put the programmer clip tight on the SOP8 package, having in mind that the red cable is always for PIN1. Make sure it sits tight on the SOP8 package.

image

  • Connect the clip cable to the programmer as seen in here.

image

  • Plug in the programer to the computer and start the flashing process.

4. Flashing

It is recommended to make a backup of your data before flashing a new firmware. So please, make a read and save the bin file.

Then, you will be ready to flash a new firmware:

  1. Erase the flash
  2. Read to check if all values are 0xFF (Empty)
  3. Open the thingino-xiaomi-sxj02zm.bin file and press Write
  4. After flashing, it is recommended to make a Verify

4. Soldering and mounting the camera

After a succesfull flashing, you will have to solder the SOIC-8 leg again. Then, assemble the camera again and turn on.

Thanks to amricko0b who wrote the dissasembly instructions in openfang repo

Starting thingino

Thingino is ready to start. You will have to follow these instructions to configure WiFi Access.

Camera Debug

You can debug and access the Linux console of the camera in two ways:

  1. Via SSH. It is recommended to use a public/private key pair as explained here, although it is not mandatory.
  2. Via UART, directly on the camera.

UART Access

Using a USB UART-TTL cable, you can directly access the camera's console by connecting to the pins on the mainboard.
In order, the pins are labeled as Tx, RX, GND, GND, and N/A.

image

Camera Update

These are recommendations based on experience.

Partial Update

Before updating the camera, it is necessary to adjust the memory addressing and size values to ensure there is enough space for the update in the system. To do this, connect through SSH or UART and run the following command before updating:

fw_setenv osmem 40M@0x0; fw_setenv ispmem 8M@0x2800000; fw_setenv rmem 16M@0x3000000; reboot

This will allocate more space to the system memory, reducing the memory available to other parts of the system.

After rebooting, update the camera following the instructions here. Once the update is complete, restore the memory values to their default settings with the following command:

fw_setenv osmem 32M@0x0; fw_setenv ispmem 8M@0x2000000; fw_setenv rmem 24M@0x2800000; reboot

Full Update

  1. Download the correct bin file and rename to autoupdate-full.bin
  2. Place it into a microSD with FAT32 format
  3. Insert it into your camera and power on
  4. Wait until upgrade is done. Your camera will be accesible through WiFi AP called Thingino.
Clone this wiki locally