logo elektroda
logo elektroda
X
logo elektroda

Inside a Tuya Doorbell: BK7252 Exploration and SPI Programming with Python/NeoProgrammer

divadiow 5358 33
ADVERTISEMENT
  • #31 21717022
    divadiow
    Level 36  
    yes. more GPIOs could be done probably but it's OK for now. it looks a bit messy inside. Hoping the enamel holds on these wires. there are no shorts (at the moment)
    PCB with jumper wires connected and visible electronic components Close-up of a PCB with thin soldered wires and various connectors
  • ADVERTISEMENT
  • #32 21738029
    akeilox
    Level 2  
    Stumbled on this thread during search, and delighted with the amount of tinkering.
    These doorbells are sold in two types: Kement or Tuya app compatible. Kement one being widely available and cheaper.
    My question is: can I change firmware from Kement to Tuya by OTA update?
  • ADVERTISEMENT
  • #34 21738175
    akeilox
    Level 2  
    >>21738166

    Thanks for the link! I did not expect they'd gone with different chip and board for the same product.
    I did not yet order it; I came across a listing of Kement type which was dramatically cheaper than Tuya version and thought firmware might be the only difference.
    It's also interesting how much detail can be found inside the APK file, like the JSON object used.
    I have a bunch of Tuya sensors, recently added Cat Feeder and plan to eventually go with ESPHome/HomeKit automation and thought this doorbell was cheap and hackable. It seems in very early stages now, as chips/board differ and extracting firmware has nuances between XR872 and BK725U.

Topic summary

The discussion centers on reverse engineering a low-cost Tuya doorbell featuring the BK7252 SoC. The device was physically inspected, revealing a QFN68 BK7252 chip and multiple test pads including UART interfaces for logging and firmware flashing. UART boot logs were captured, showing RT-Thread OS messages and missing partition tables on flash. SPI flash access was achieved using an LC Technology CH341A programmer in I2C mode, with test pads mapped to CH341A pins, and a Python script was used to enter SPI mode before employing NeoProgrammer for flash operations. The Tuya bootloader uses a dual partition (ping-pong) OTA scheme with a 4MB flash size and a 0x11000 offset for the bootloader. OpenBK7252 firmware support is partial, with some success reported using BK7231GUIFlashTool adapted for BK7252, though full cloud-free firmware replacements are not yet available. Firmware backups are recommended before experimentation. Additional resources include BK7252 SDKs, community projects, and detailed partition and bootloader information. Challenges remain in UART flashing reliability on this device, and efuse reading was queried but not resolved. The discussion includes links to firmware, SDKs, and flashing tools, as well as references to similar devices and ongoing development efforts.
Summary generated by the language model.
ADVERTISEMENT