-
Notifications
You must be signed in to change notification settings - Fork 74
Camera: Xiaomi Mijia1080p (SXJ02ZM)
This page outlines the necessary changes required to run the Thingino firmware on the Xiaomi Mijia 1080p camera, also known as the SXJ02ZM.
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
You have several options to obtain a compiled binary for this camera:
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
.
- CH341A Programmer
- Programmer Testing Clip for SOP8 packages
- Programmer Software like CH341Av1.29 or Colibri_CH341
- Soldering iron
- Solder Flux
- Phillips Screwdrivers (size PH00, or PH0)
- A piece of plastic foil (e.g. kapton tape) to isolate the vcc pin when programming the chip
- Remove the back of the camera, starting from the botton.
- After the back has been losen, carefully remove the speaker/mic connector before removing the back.
- Unscrew the 3 black screws to separate the board from the front cover. Leave the middle screws in there!
- Desolder the VCC leg (Leg 8) of the SOP8 chip.
- 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.
- 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.
- Connect the clip cable to the programmer as seen in here.
- Plug in the programer to the computer and start the flashing process.
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:
-
Erase
the flash -
Read
to check if all values are 0xFF (Empty) - Open the
thingino-xiaomi-sxj02zm.bin
file and pressWrite
- After flashing, it is recommended to make a
Verify
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
Thingino is ready to start. You will have to follow these instructions to configure WiFi Access.
You can debug and access the Linux console of the camera in two ways:
- Via SSH. It is recommended to use a public/private key pair as explained here, although it is not mandatory.
- Via UART, directly on the camera.
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.
These are recommendations based on experience.
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
- Download the correct bin file and rename to
autoupdate-full.bin
- Place it into a microSD with FAT32 format
- Insert it into your camera and power on
- Wait until upgrade is done. Your camera will be accesible through WiFi AP called Thingino.