logo elektroda
logo elektroda
X
logo elektroda

Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231T

Eltaistos 14544 33
ADVERTISEMENT
  • Helpful post
    #1 20975600
    Eltaistos
    Level 6  
    Hello everyone,

    I am making this post because I made a guide on how to flash WB2S tuya board with BK7231T MCU from the new Action SmartPlug.

    # Introduction
    This guide provides instructions for flashing the Action LSC Smart Power Monitoring Plug with the WB2S Tuya board, featuring the [BK7231T MCU](https://developer.tuya.com/en/docs/iot/wb2s-module-datasheet?id=K9ghecl7kc479).

    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tlsc_smart..ug.png Download(72.24 kB)
    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tlsc_smart_...ug_box.png Download(335.88 kB)

    find the readme here : https://github.com/FlorianSoler/OpenBeken-Act...lsc-smartplug-with-monitoring-guide/tree/main

    ## Requirements:
    * USB to TTL or UART reader
    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tusb_ttl_ua...t_back.png Download(167.21 kB)
    * Soldering iron
    * Dupont cable or any wire for soldering
    * [OpenBeken flasher software](https://openbekeniot.github.io/webapp/devicesList.html) or any other tool for flashing firmware.

    # Step One

    Begin by opening the smart plug case with a flat screwdriver.

    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Toppened_..g.png Download(591.67 kB)

    After opening, you should have access to the board.

    # Step Two

    Locate the Tuya board number on the back of the blue board:
    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tboard_nu..r.png Download(183.54 kB)
    Google the board name, find Tuya documentation, and confirm the MCU (in this case, the board is a WB2S with [BK7231T MCU](https://developer.tuya.com/en/docs/iot/wb2s-module-datasheet?id=K9ghecl7kc479)). The manufacturer provides all the required data for flashing:

    | Pin No. | Symbol | I/O type | Function |
    |---------|--------|----------|--------------------------------------------------------|
    | 1 | VBAT | P | Power supply pin (3.3 V), connected to VBAT on IC |
    | 2 | PWM2 | I/O | Common GPIO, connected to P8 on IC |
    | 3 | GND | P | Power supply reference ground pin |
    | 4 | PWM1 | I/O | Common GPIO, connected to P7 on IC |
    | 5 | 1RX | I/O | UART1_RXD, used as user-side serial interface, connected to P10 on IC |
    | 6 | PWM0 | I/O | Common GPIO, connected to P6 on IC |
    | 7 | 1TX | I/O | UART1_TXD, used as user-side serial interface, connected to P11 on IC |
    | 8 | AD | AI | ADC pin, connected to P23 on IC |
    | 9 | PWM4 | I/O | Common GPIO, connected to P24 on IC |
    | 10 | CEN | I | Low-level reset, high-level active, Docking IC-CEN (internally pulled high) |
    | 11 | PWM5 | I/O | Common GPIO, connected to P26 on IC |

    # Step Three

    Solder wires on the GROUND, VBAT, RX, and TX pins. Highlighted pinout:

    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tboard_w...png Download(243.42 kB)

    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tsoldered_..re.png Download(326.01 kB)

    Connect pinout wires to the USB to UART adapter (ensure the MCU supports only 3.3V), and check Tuya RX is on the TTL board's TX and vice versa.
    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tusb_ttl_co...nected.png Download(297.42 kB)
    # Step Four

    Plug the UART reader into your computer and launch [OpenBeken flasher software](https://openbekeniot.github.io/webapp/devicesList.html).
    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Teasy_uart_...lasher.png Download(41.85 kB)
    Start by making a firmware dump (backup) by clicking **Do firmware backup (read) only**.
    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tfirmware_B..kup.png Download(74.96 kB)
    After making the backup, obtain the firmware pinout configuration in JSON, and save it.
    Locate the corresponding firmware and select the right one for your MCU, using the **_UA.bin** file, and click flash.

    # Step Five

    Unsolder all wires, put the board back in its enclosure, and plug it into an outlet. You should be able to see a WiFi hotspot:
    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Twifi_hot..t.png Download(28.38 kB)
    Go to the WiFi properties, enter the gateway IP in a web browser:
    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Twifi_gat..y.png Download(28.56 kB)
    # Step Six
    Configure the power plug by inserting the JSON obtained in Step Four. Go to **launch web app** and into **import**, paste the JSON, and click **clear OBK and apply new script**.
    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231TCapture d’...184658.png Download(170.19 kB)

    here my json obtained by reading the dump firmware :
    Code: JSON
    Log in, to see the code



    Action_LSC...toring.rar Download(457 bytes)

    # Congrat ! you have flash your action smart plug !
    ### Refer to [Tasmota Getting-Started](https://tasmota.github.io/docs/Getting-Started/#__tabbed_2_2) or [OpenBeken website](https://openbekeniot.github.io/webapp/devicesList.html) guide for connecting this to you wifi and for using **MQTT**.
  • ADVERTISEMENT
  • #2 20975906
    p.kaczmarek2
    Moderator Smart Home
    Thanks for sharing, I always use the same USB to UART converter as you. By the way, can you also share the model number of that Action plug? Futhermore, I also need OBK JSON format template for our devices list: https://openbekeniot.github.io/webapp/devicesList.html You can copy it from Web App main panel. Also fill the "wiki" and "image" URLs
    Helpful post? Buy me a coffee.
  • Helpful post
    #3 20976420
    Eltaistos
    Level 6  
    Hello,
    Thanks for replying. The model is 3202087, the smart plug board number is WP02GE from 2023-09-05. I think this in a new version because they have changed the MCU from the last one.
    For the OBK JSON, I have provided the JSON in the .rar archive, and I have referenced the picture and wiki link from this post.
    Moderated By p.kaczmarek2:


    This is actually 3202088 , as can be seen on the photo. Please do not confuse model numbers



    Here the json in the archive :

    
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Action LSC SmartPlug with power monitoring",
      "model": "LSC SmartPlug with power monitoring",
      "chip": "BK7231T",
      "board": "WB2S",
      "flags": "1024",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "6": "Rel;1",
        "7": "Btn;1",
        "8": "LED;1",
        "10": "WifiLED_n;0",
        "11": "BL0937SEL;0",
        "24": "BL0937CF1;0",
        "26": "BL0937CF;0"
      },
      "command": "",
      "image": "https://static.elektroda.pl/attach/lsc_smart_plug_1266846.png",
      "wiki": "https://www.elektroda.com/rtvforum/topic4038087.html"
    }
    


    Here is the picture that I used to retrieve the given information.

    Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tboard_ref_..._back1.png Download(300.67 kB) Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tboard_ref_..._front.png Download(434.31 kB) Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tboard_ref_..._back2.png Download(330.41 kB) Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Tbox_in..png Download(448.96 kB) Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231Ttuya_board..for.png Download(231.88 kB) Flashing Guide for WB2S Tuya Action SmartPlug Power monitoring with BK7231TPlug_case..fo.png Download(347.87 kB)
  • ADVERTISEMENT
  • #4 21027114
    fletr
    Level 1  
    Hello, the model is 3202088 as seen on the pictures, not 3202087.
    I was just about to submit a new device teardown, not necessary as correct device model will now appear on the search.
  • #6 21030307
    p.kaczmarek2
    Moderator Smart Home
    That's a good point, I will make the correction. I will add this template with 3202088 name so it shows up on:
    https://openbekeniot.github.io/webapp/devicesList.html

    Added:
    https://github.com/OpenBekenIOT/webapp/commit/b778f0c124bc40500ba7bc67bf5d7dc12046c42a
    Helpful post? Buy me a coffee.
  • #7 21083062
    nissa33
    Level 4  

    Hello,
    Systematic error from the backup.
    Getting bus failed, will try again - 1/100!
    I checked my 4 solders, reversed TX and RX
    However, the LED lights up as soon as the backup is started.
    My model is the same of this tuto, 3202088
    Thank you for this tutorial.
    Nissa33
  • #8 21083508
    p.kaczmarek2
    Moderator Smart Home
    Did you desolder WiFi module from the circuit?
    Helpful post? Buy me a coffee.
  • #9 21083679
    nissa33
    Level 4  

    No, I've soldered directly without desoldering the module
  • #10 21083703
    p.kaczmarek2
    Moderator Smart Home
    well the first step is always to try desoldering WB2S/CB2S. You can check out one of our videos to see how we do it:
    [youtube]https://www.youtube.com/watch?v=YQdR7r6lXRY [/youtube]
    Helpful post? Buy me a coffee.
  • #12 21083721
    p.kaczmarek2
    Moderator Smart Home
    Let me know if it works for you, if not, we will try to think about some better solution
    Helpful post? Buy me a coffee.
  • #14 21086346
    nissa33
    Level 4  

    Hi p.kaczmarek2
    I've desoldered the module, but no chance, ever same error.
  • #15 21086439
    p.kaczmarek2
    Moderator Smart Home
    Please provide a detailed photos of your setup
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #16 21086513
    nissa33
    Level 4  

    Too late, I put everything away.
    But I'm thinking of one thing, shouldn't we put the flashing mode first?
  • #17 21086520
    p.kaczmarek2
    Moderator Smart Home
    It's not ESP8266, it just waits for reboot to flash.

    I have another idea what could have been wrong.

    There are CB2S/WB2S modules with wrong silkscreen marking.
    You need to follow silkscreen from documentation:
    Diagram of a module with pin designations and dimensions.
    The one on image is correct. The physical module may have swapped (incorrect) markings.

    Futhermore, check out our whole flashing guides list:
    https://www.youtube.com/watch?v=L6d42IMGhHw&list=PLzbXEc2ebpH0CZDbczAXT94BuSGrd_GoM&pp=iAQB
    We have flashed quite a lot of BK7231 so far...
    Helpful post? Buy me a coffee.
  • #18 21086537
    nissa33
    Level 4  

    Maybe my module is defective.
    I'll buy another one and try again.
    I'll keep you informed
  • #19 21086709
    p.kaczmarek2
    Moderator Smart Home
    Try different USB to UART converter. There is very, very low chance that the module is defective. I've flashed hundreds of Bekens and none of them were damaged. You can check out many of my teardowns on our Elektroda teardowns list:
    https://openbekeniot.github.io/webapp/devicesList.html
    Helpful post? Buy me a coffee.
  • #20 21131184
    kirfiiurhannurula
    Level 1  
    Hi, I also have a few ledvance plugs and one of them defected recently so I opened and fixed it and now I want to reflash it but I am on a MacOS system and can't run the flash tool so is there any alternative or something for macos?
  • #21 21131204
    p.kaczmarek2
    Moderator Smart Home
    https://github.com/OpenBekenIOT/hid_download_py
    See readme for guide.

    BK7231N hid_download_py guide:


    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #22 21252494
    nicleroux35
    Level 1  
    >>21086513

    Hello!

    I noticed that several people encountered the same issue as me: "Error Getting bus failed, will try again - 1/100!" when trying to perform a firmware backup.

    Screenshot of the BK7231 Easy UART Flasher application showing an error message.


    To solve the issue on model 3202088:
    "Getting bus failed, will try again - 1/100!"

    You need to solder a second wire to the "GND" pin of your USB to UART adapter. And with this new wire connected to your GND pin, simply touch the CEN pin when performing the backup and also the flashing.

    WB2S module board with labeled pins and description.

    Plug in your USB, set the correct COM port in the application.
    Click on "Do Firmware backup (read only)" to back up the original firmware.
    As soon as the message "Serial port open! Getting bus... (now, please do reboot by CEN or by power off/on)" appears, touch the GND wire to the "CEN" pin, and the backup will proceed.

    Repeat the same process when writing the new firmware.

    Screenshot of BK7231 Easy UART Flasher software with successful write.
  • #23 21451854
    geoffreymoga
    Level 3  
    Bonjour, j'ai bien flashé mes prises avec tuya cloudcutter, mais pour une j'ai mal renseigné les paramètres ip de ma prise, du coup je la vois sur mon routeur mais je n'arrive plus à accéder à la page des paramètres.
    Y a-t-il un moyen ou une technique pour la réinitialiser ?

    Merci d'avance
  • #24 21451892
    p.kaczmarek2
    Moderator Smart Home
    Helpful post? Buy me a coffee.
  • #26 21452554
    p.kaczmarek2
    Moderator Smart Home
    No problem, let me know if you need anything else, we're here to help.
    Helpful post? Buy me a coffee.
  • #27 21460501
    scrumpydude
    Level 1  
    Just came to say thank you to the OP for the guide. My smart plug is flashed and working fine.
    I'll upload details of the plug later (not that I would recommend it).
  • #28 21462049
    p.kaczmarek2
    Moderator Smart Home
    You're welcome, don't forget to turn on PowerSave 1 so the device can last longer. You never know with those cheap power supplies...
    Helpful post? Buy me a coffee.
  • #29 21625227
    guycaluwaerts
    Level 3  
    Eltaistos wrote:
    After making the backup, obtain the firmware pinout configuration in JSON, and save it.
    Locate the corresponding firmware and select the right one for your MCU, using the **_UA.bin** file, and click flash.

    I'm new here. I have some powerplugs from LSC, Hombi and Tuya and also some Chinese mini smart switches.
    I want to control them without using the Tuya cloud.
    My first test is with a mini smart switch, which has a CB2S controller.
    After taking out the CB2S and connecting it to the USB-TTL converter I could do everything until the first part or step 4.
    The last part of step 4 I don't understand. How to start JSON? Where to find the bin file I need?
    Many thanks for your support
  • #30 21625232
    p.kaczmarek2
    Moderator Smart Home
    Do a 2MB flash read, if you are lucky, the pinout will be extracted and shown on screen. Does it work for you?

    The bin file for flashing (OBK binary) can be downloaded automatically from Easy Flasher

    What your flasher shows now, do you have 2mb backup?
    Helpful post? Buy me a coffee.

Topic summary

The discussion centers on a detailed flashing guide for the WB2S Tuya board with BK7231T MCU found in the Action LSC SmartPlug with power monitoring. The guide includes hardware requirements such as a USB to TTL/UART adapter, soldering tools, and the OpenBeken flasher software. Users clarified the correct model number as 3202088 (not 3202087) and shared a JSON template for device integration into the OpenBeken devices list. Common issues during flashing include "Getting bus failed" errors, often resolved by adding a second ground wire to the USB-UART adapter and manually grounding the CEN pin during backup and flashing. Desoldering the WB2S/CB2S module is recommended for reliable flashing, as direct soldering sometimes causes communication failures. The discussion also covers alternative flashing tools for macOS users, such as the hid_download_py utility. Additional tips include verifying correct silkscreen pin markings on the module, enabling PowerSave mode post-flashing for power efficiency, and recovery methods for misconfigured devices using OpenBK7231T App FAQs. The community provides links to teardown resources, flashing guides, and firmware backup procedures to assist users in successful firmware modification of these smart plugs.
Summary generated by the language model.
ADVERTISEMENT