logo elektroda
logo elektroda
X
logo elektroda

[BK7231N] Tuya SW02-02 2-Channel Switch Firmware Dump and UART Boot Log Analysis

divadiow 663 1
ADVERTISEMENT
  • #1 21084036
    divadiow
    Level 34  
    In extension to this thread by @lbelleboni, I present the 2 channel version, the SW02-02. Unlike lbelloni, I did not have to cut any RX traces but it did seem a little difficult to dump/flash, even at 115200 baud with soldered wires, it was a little... sensitive.

    My switch came with similar/identical packaging

    Wi-Fi Smart Switch and its packaging on a carpet. White switch and box with specification labels. User guide for the WiFi Smart Switch with descriptions of features and technical specifications. Tuya switch technical leaflet with diagrams and specifications.
    Electrical wiring diagram with labels for wires and lamps.

    and some internals and my soldering

    Image of the SW02-02 switch interior with visible PCB and components. Printed circuit board of an electronic device with exposed components. Close-up of a green printed circuit board with various electronic components, including a BK7231N chip.
    Close-up of a green circuit board labeled TP02_N 2023.5.6-VER:A DHX. Electronic board with two Fanhar W11-1A2STLE-H relays. Close-up of capacitors on a PCB.
    Printed circuit board with electronic components and a blue LED on a blue background. Close-up of a circuit board with connected wires and electronic components.

    I attach the factory un-paired firmware dump and the UART boot log out (from TX2 pad) is:

    Code: Text
    Log in, to see the code


    I then paired it with the Tuya app to see what it looked like in there
    Device addition screen with successfully added Smart Switch in the app.
    App interface for controlling a smart switch with two sliders. Screenshot of device update screen showing no updates available. Mobile app switch settings with rocker switch - flip to change state option selected.

    Unfortunately, this firmware version is no good for cloudcutting as it's on the known patched list.

    Sadly Easy Flasher failed to extract the config, but I assumed it was an extra relay and switch to the SW02-01 and tried that, one channel worked!

    Screenshot showing logs of the device flashing process with error and success messages.

    I found the other channel using the GPIO finder, so the final template is

    Code: JSON
    Log in, to see the code


    my autoexec to set powersave and give the web gui buttons more meaningful names to match L1/L2 on the device

    Code: Text
    Log in, to see the code


    OpenBK7231N user interface displaying device status and channel information.
  • ADVERTISEMENT
ADVERTISEMENT