logo elektroda
logo elektroda
X
logo elektroda

Zmai-90 CBU Module Flash Reading Issue: Beken Writer 1.60 Error & Python Script Troubleshooting

peterwup 2073 13
ADVERTISEMENT
  • #1 20320477
    peterwup
    Level 1  
    Hello,

    Zmai-90 CBU Module Flash Reading Issue: Beken Writer 1.60 Error & Python Script Troubleshooting

    I tried to read out the flash of the module before I flash a new software.

    Zmai-90 CBU Module Flash Reading Issue: Beken Writer 1.60 Error & Python Script Troubleshooting

    I soldered Rx1/Tx1 /CEN + 3,3V and connected it to two different USB / serial adapter.
    Rx1 is connected to Tx and Tx1 is connected to Rx.

    Used "Beken Writer 1.60" with the following config:
    Zmai-90 CBU Module Flash Reading Issue: Beken Writer 1.60 Error & Python Script Troubleshooting
    Press on "Read flash" connect CEN to GND for a short period and wait.
    I can see that the display changes and the two LED on the board are changing (so rest works) but got only an error.

    Next step I have tried to read out the flash by python script with the following result :
    Zmai-90 CBU Module Flash Reading Issue: Beken Writer 1.60 Error & Python Script Troubleshooting
    - I have changed Rx and Tx with out any result
    - check several baud rates without andy result.

    Woud be great if someone has an idea. Thank you Peter
  • ADVERTISEMENT
  • #2 20320753
    p.kaczmarek2
    Moderator Smart Home
    Hello. Your device is most likely using some kind of UART protocol (if it's an older version of Zmai-90) or TuyaMCU protocol (if it'a a newer version). UART protocols are using the same pins that are used for programming - RXD1 and TXD1. TuyaMCU packets sent to WiFi module from the MCU may interfere with programming.

    In order for it to work, you basically need to disconnect Wifi's RXD1 and TXD1 from TuyaMCU. This is done in various ways, depending on the device, sometimes you have to desolder a chip, sometimes to cut the trace...
    In case of this switch, we had to desolder the buttons controller: https://youtu.be/JCqq-gn-X2c?t=190
    In case of this relay, we had to remove capacitor and cut the trace: https://youtu.be/0V0kaRVnk18?t=257
    but in case of this device...

    Can you take off the PCB with WiFi module, power it from your 3.3V power supply (something with a reliable LDO, AMS1117, because current capability is important) and try again?
    Helpful post? Buy me a coffee.
  • #3 20356175
    MariusU
    Level 2  
    Hello,
    I have the same module as you, the communication is switched to RX2 and TX2 pins, baud rate is 115200 and config is 8,N,1.
    Have fun on this serial.
  • #4 20356201
    p.kaczmarek2
    Moderator Smart Home
    Your Zmai-90 is using RXD2/TXD2 for TuyaMCU?

    TXD2 is a log output of Beken, not a TuyaMCU data port...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20356324
    MariusU
    Level 2  
    You might be right, all I saw was logs and debug data.
    I have just fried mine by shorting the GND and N line by mistake while it was plugged in mains.
    The game stops here for me, at least for now.
    Please do tell if you manage to flash via serial.
  • #6 20356337
    p.kaczmarek2
    Moderator Smart Home
    Ah okay, so false alarm. You saw just the debug log output of Tuya firmware. The baud rate also fits.

    Is your WiFi module also dead now? Maybe it survived, can you try desoldering it and reading it's flash?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #7 20378311
    lionboy
    Level 10  
    Same at my zmai, i can't read something on him i dont know if will work via wi fi.

    Thanks
  • #8 20391045
    djlukas
    Level 27  
    I replaced the system with ESP in my Zmai.
  • #9 20391748
    lionboy
    Level 10  
    Can you post what esp use? Because i dont find any esp with same pinout like cbu

    Thanks
  • #10 20391784
    p.kaczmarek2
    Moderator Smart Home
    If the UART lines are in use and you don't want to cut the traces to remove the interference, you can always use this method:



    Bk modules can be easily programmed outside circuit.
    Zmai-90 CBU Module Flash Reading Issue: Beken Writer 1.60 Error & Python Script Troubleshooting
    just adjust pinout to your need
    Helpful post? Buy me a coffee.
  • #11 20391969
    lionboy
    Level 10  
    I have this esp c05 but i think is not same pinout like cbu:

    Zmai-90 CBU Module Flash Reading Issue: Beken Writer 1.60 Error & Python Script Troubleshooting

    Yea is different because my chip have only 6 pins on left and right and cbu have 7 with 7.
  • #12 20396756
    djlukas
    Level 27  
    Actually different pin spacing. I thought every Zmai had the same one.
    Here's mine after disassembly
    Zmai-90 CBU Module Flash Reading Issue: Beken Writer 1.60 Error & Python Script Troubleshooting
  • ADVERTISEMENT
  • #14 20842801
    p.kaczmarek2
    Moderator Smart Home
    I have worked on new Zmai-90 recently, the one that is using RN8209C for power metering. It's almost supported by OBK, but still WIP. See more here:
    https://www.elektroda.com/rtvforum/topic4014818.html
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around troubleshooting flash reading issues with the Zmai-90 CBU module using Beken Writer 1.60 and a Python script. Users report difficulties in reading the flash memory, with suggestions indicating that the module may utilize UART or TuyaMCU protocols, which could interfere with programming. Recommendations include disconnecting the WiFi module's RXD1 and TXD1 pins, adjusting baud rates, and using alternative programming methods. Some users have experienced hardware failures, while others have successfully replaced components or modified their setups to achieve better results. The conversation also touches on the compatibility of different ESP modules and pin configurations.
Summary generated by the language model.
ADVERTISEMENT