logo elektroda
logo elektroda
X
logo elektroda

[Solved] Issues Flashing OpenBK7231N Firmware on TH01Y-CBS3 V1.6 Sensor

carlig833 1230 4
ADVERTISEMENT
  • #1 21086351
    carlig833
    Level 7  

    Hello forum,

    I own a TH01Y-CBS3 V1.6 Tuya humidity and temperature sensor.
    I was able to connect the probes onto the chip and use the BK7231 UART Programmer for Windows to backup the original firmware.
    The problem is that I cannot write the firmware OpenBK7231N_QIO_1.17.587.bin.

    No matter how many times I try, which baud-rate I use, I either get an error in the middle of the erasing process,
    or I get an error while writing the firmware.

    The typical error looks like this:

    ! Erasing sector 1163264... ok! Erasing sector 1167360... ok! Erasing sector 1171456... ok! Erasing sector 1175552... ok! Erasing sector 1179648... ok! Erasing sector 1183744... ok! Erasing sector 1187840... ok! Erasing sector 1191936... ok! Erasing sector 1196032... ok! Erasing sector 1200128... ok! Erasing sector 1204224... ok! Erasing sector 1208320... ok! Erasing sector 1212416... ok! Erasing sector 1216512... ok! 
    All selected sectors erased!
    Writing sector 0x00... ok! Writing sector 0x1000... ok! Writing sector 0x2000... ok! Writing sector 0x3000... ok! Writing sector 0x4000... ok! Writing sector 0x5000... ok! Writing sector 0x6000... ok! Writing sector 0x7000... ok! Writing sector 0x8000... ok! Writing sector 0x9000... ok! failed with serial.BytesToRead 0 (expected 15)
    The beginning of buffer in UART contains  data.
    Writing sector 0xA000... Writing sector 40960 failed!
    Writing file data to chip failed.


    but it doesn't always end at the same sector.

    What could be the reason for this behavior? Wrong soldering of the probes?

    Humidity and temperature sensor TH01Y-CBS3 V1.6 connected with wires to a UART programmer.

    Gerardo
  • ADVERTISEMENT
  • Helpful post
    #2 21086440
    p.kaczmarek2
    Moderator Smart Home
    The solution is very simple and was said on the forum multiple times - it's TuyaMCU device, you need to cut RX/TX traces or desolder MCU (alternatively you can put MCU in RESET if you are able to). Or desolder WiFI module itself, if you can.

    Longer explanation: This is TuyaMCU device, it has MCU and WiFi module. MCU controls power of WiFi module and uses the same UART port for communication as you use for the programming... and it interferes with the flashing process
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • Helpful post
    #3 21086478
    spin55
    Level 17  
    Or you can try it by long pressing the pairing button first. If this does not give satisfactory results, follow the advice of @p.kaczmarek2.
  • ADVERTISEMENT
  • #4 21086822
    carlig833
    Level 7  
    Thanks both,

    Periodically pushing the reset button allowed me to complete the firmware installation. It is sufficient to push it once every two seconds until the firmware installation completes. This probably is effective in keeping the MCU "silent" so that it does not interfere on the UART.

    Having said that I still have several doubts with the configuration. I'm going to read and possibly ask in the dedicated thread.
  • #5 21086824
    carlig833
    Level 7  

    Read my previous post for the solution that worked for me.
ADVERTISEMENT