logo elektroda
logo elektroda
X
logo elektroda

Aubess 16A Tuya switch EZB-WBZS1H16N-A_V1.0 BK7231N UART flashing

Hesham3mara 555 5
ADVERTISEMENT
  • Need PCB pinout and UART flash details

    #1 21908791
    Hesham3mara
    Level 2  
    Posts: 2
    I'm a noob at this. Sorry if I ask basic questions. I bought Aubess smart switch from this link. I just found this on AliExpress:
    16A Tuya Smart WiFi Switch,2-way Mini Light Switch Power Metering Breaker,For Alexa,Google Home,Yandex Alice,Smart Life Control
    https://a.aliexpress.com/_EGkkTDU
    The smart switch doesn't work now. The LED turns on when I apply 220 V, but there is no response from the switch. Pressing the button doesn't the state of the switch, and the device on Tuya app is offline. I measured voltage on the pins of the MCU in the picture
    Aubess 16A Tuya switch EZB-WBZS1H16N-A_V1.0 BK7231N UART flashing Phone screenshot of a table listing power pins and expected voltages (e.g., VBAT, VSYS, VCCPLL)

    And voltage was within range given by ChatGPT. I'm thinking either the MCU is dead or firmware crashed, so I want to reflash the MCU, but I don't know where I should connect USB-to-TTL UART uploader module pins on the PCB board. Also, do I need external 3.3 V, or can I use 3.3 V of UART module. This is a picture of PCB board
    Close-up of a green PCB with a push button, an IC, and multiple SMD components
    And do I need to do anything after flashing if flashing is successful, or is that it? And lastly, if I flash firmware, do I need some kind of authentication to be able to access Tuya cloud?
    Can you post the exact model/PCB version and the markings written on the main MCU and the WiFi module (if there is one)?
    This PCB version EZB-WBZS1H16N-A_V1.0 and this MCU WiFi module marking BK7231N
    Can you upload clear front/back PCB pictures or list the labels near the pads/pins, and say if you already checked things like relay voltage, button continuity, or any UART serial output when powering it on?
    I checked button continuity, power on capacitors and on LDO, and on pins of MCU.
  • ADVERTISEMENT
  • Helpful post

    Use 5V into AMS1117 for reliable 3.3V supply

    #2 21909295
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14743
    Help: 659
    Rate: 12839
    To flash BK7231, you need to find RX and TX pins. UART1 is used for flashing. Good information about Beken can be found on our Elektroda BK7231 datasheet topic:
    https://www.elektroda.com/rtvforum/topic3951016.html
    Here is the pinout:
    Aubess 16A Tuya switch EZB-WBZS1H16N-A_V1.0 BK7231N UART flashing
    So now, you can match pinout from the datasheet with your photo. You can use crystal position as reference:
    Aubess 16A Tuya switch EZB-WBZS1H16N-A_V1.0 BK7231N UART flashing
    This indicates that UART pins are P4 and P5. That's kinda suprising, because shouldn't they be marked as P10/P11? Anyway, that's where you solder UART...

    Ok, apart from UART, you need power supply. Ground and VDD - either connect 5V to input of AMS, or 3.3V to output:
    Aubess 16A Tuya switch EZB-WBZS1H16N-A_V1.0 BK7231N UART flashing

    Added after 5 [minutes]:

    Hesham3mara wrote:
    Also, do I need external 3.3 V, or can I use 3.3 V of UART module. .

    3.3 V directly from USB to UART converter will most likely not work, not enough current.

    That's why I usually solder 5V to the input of AMS1117 on the board, to get good 3.3V on WiFi chip.

    Hesham3mara wrote:

    And do I need to do anything after flashing if flashing is successful, or is that it?

    If you want to use OBK:




    Hesham3mara wrote:

    And lastly, if I flash firmware, do I need some kind of authentication to be able to access Tuya cloud?

    OpenBeken does not work with Tuya, it's for local control. So you need to decide yourself if that's what you want. If you need Tuya, then OBK won't help. If you really want to figure out why Tuya firmware is broken, you should rather take logs from UART2 pin (TX2) so we can investigate where it crashes. This is , however, also problematic - you should never do it with mains connected, so you would need to power device from 5 V...

    Hesham3mara wrote:

    I checked button continuity, power on capacitors and on LDO, and on pins of MCU.

    Or maybe capacitor is faulty? Is it bulked? That's a common fault there:
    https://www.elektroda.com/rtvforum/topic3898805.html


    Ok, so, to sum up - are we trying to flash OBK or first, do we try to rescue Tuya?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21909454
    Hesham3mara
    Level 2  
    Posts: 2
    >>21909295 I measured the 470 µF capacitors voltage is normal, giving right voltage to LDO and LDO gives right voltage to WiFi module. I want to rescue Tuya cause all my automation is on Tuya cloud.
  • ADVERTISEMENT
  • Suggest pairing, TX2 logs, and 5 V power test

    #4 21910398
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14743
    Help: 659
    Rate: 12839
    Well, if you want to use Tuya, then there isn't much options. I would still try:
    - put the device into pairing mode and pair it again - is it then seen by Tuya app?
    - check logs at TX2 (but first disconnect mains and power it in a safe manner from 5 V, because those power supplies are non-isolated so connecting it to PC when powered from mains is very dangerous and may damage both device and PC)
    - just to be sure, try powering it by connecting 5V to the input of the LDO (so WiFi module still gets 3.3V as expected). This is just to double check that's not power supply

    Also, still, try taking 2 MB flash backup.

    @divadiow I don't know how internal tuya keys are working, could he flash backup from second piece to this one and get it working? It would probably require transplant of tuya key/values section?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 21910443
    divadiow
    Level 38  
    Posts: 5195
    Help: 446
    Rate: 913
    p.kaczmarek2 wrote:
    could he flash backup from second piece to this one and get it working? It would probably require transplant of tuya key/values section?


    if the KV is OK then this should be possible. we probably have a backup of that mini switch firmware already. the test pad locations are familiar
  • #6 21912140
    Hesham3mara
    Level 2  
    Posts: 2
    >>21910443 I'm really sorry, but I'm really noob. Can u give me simplified steps how to flash firmware while still being able to connect to Tuya cloud. If I need to backup and retrieve Tuya key and the steps to do that thank you for your time.
ADVERTISEMENT