logo elektroda
logo elektroda
X
logo elektroda

[BK7231T][WB3S] MCU Dimmer SL-02 Firmware Flashing & Configuration Issue

babaganesh 1620 4

TL;DR

  • A BK7231T WB3S-based SL-02 MCU dimmer is being flashed and configured after the original module was removed and dumped.
  • TX traffic from the stock firmware shows Tuya SetDP packets for dpId 21 Enum V=1 and dpId 24 Str V=008303e803e8 while setting green.
  • Using `tuyaMcu_setupLED 24 0` makes dimmer buttons appear in the web UI.
  • The buttons still do not work, and the missing `[TasFormat] [dpIDPower]` mapping seems to be the remaining problem.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • Close-up of a circuit board with a WB3S module.
    Lamp with a white base and a glowing turquoise shade.

    Removing WB3S with soldering iron wasn't easy, cause copper is very thin and easy to torn apart.
    Otherwise usual flashing.

    I've dump tx pin on original firmware when setting color(green)

    //R 2024-02-23 14:13:14 WiFi received:
    55AA00060005150400010125
    //R 2024-02-23 14:13:15 WiFi received:
    55AA000600101803000C30303833303365383033653807

    Received by WiFi module:
    55 AA 00 06 00 05 1504000101 25
    HEADER VER=00 SetDP LEN dpId=21 Enum V=1 CHK

    Received by WiFi module:
    55 AA 00 06 00 10 1803000C303038333033653830336538 07
    HEADER VER=00 SetDP LEN dpId=24 Str V=008303e803e8 Col: ■ CHK

    And tried config

    startDriver TuyaMCU
    tuyaMcu_setupLED 24 0


    with this I see dimmer buttons on web, but they don't work.
    I guess I missed something in
    >[TasFormat] [dpIDPower]

    Could someone please point me in the right direction

    Cool? Ranking DIY
    About Author
    babaganesh
    Level 3  
    Offline 
    babaganesh wrote 10 posts with rating 2, helped 1 times. Been with us since 2023 year.
  • ADVERTISEMENT
  • Helpful post
    #2 20977514
    p.kaczmarek2
    Moderator Smart Home
    Here is TuyaMCU guide:
    https://www.elektroda.com/rtvforum/topic4038151.html
    I'd start with:
    
    
    // Start TuyaMCu driver
    startDriver TuyaMCU
    // set TuyaMCU baud rate
    //tuyaMcu_setBaudRate 115200
    // set TuyaMCU default wifi state 0x04, which means "paired",
    // because some TuyaMCU MCUs will not report all data
    // unless they think they are connected to cloud
    tuyaMcu_defWiFiState 4
    

    Then I would run the tuyaMcu_sendQueryState command and capture the LOG.

    Can you provide more information on your device, is it single-color only, or RGB, or RGB + CW?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20978103
    babaganesh
    Level 3  
    lamp is RGB + contrast and brightness.
    With
    
    startDriver TuyaMCU
    tuyaMcu_setBaudRate 115200
    tuyaMcu_defWiFiState 4
    

    in autoexec.bat, here is result of tuyaMcu_sendQueryState

    
    Info:CMD:[WebApp Cmd 'tuyaMcu_sendQueryState' Result] OK
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 14 01 00 01 00 24 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 20 type 1-bool len 1
    Info:TuyaMCU:ParseState: byte 0
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 1A 02 00 04 00 00 00 00 31 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 26 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 0
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 15 04 00 01 01 29 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 21 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 16 02 00 04 00 00 02 58 87 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 22 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 600
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 17 02 00 04 00 00 03 E8 19 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 23 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 1000
    Info:TuyaMCU:Received: 55 AA 03 07 00 10 18 03 00 0C 30 30 31 65 30 33 65 38 30 33 65 38 36 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 23
    Info:TuyaMCU:ParseState: id 24 type 3-str len 12
    Info:TuyaMCU:Received: 55 AA 03 07 00 A2 19 03 00 9E 30 35 34 36 34 36 30 31 30 30 30 30 30 33 65 38 30 33 65 38 30 30 30 30 30 30 30 30 34 36 34 36 30 31 30 30 37 38 30 33 65 38 30 33 65 38 30 30 30 30 30 30 30 30 34 36 34 36 30 31 30 30 66 30 30 33 65 38 30 33 65 38 30 30 30
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 169
    Info:TuyaMCU:ParseState: id 25 type 3-str len 158
    Info:TuyaMCU:Received: 55 AA 03 07 00 06 20 00 00 02 00 00 31 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 13
    Info:TuyaMCU:ParseState: id 32 type 0-raw len 2
    


    some app screens:
    App interface for controlling RGB lamp with color, brightness, and contrast settings. Tuya app with Scene tab open, showing colorful patterns and lighting modes. App screen with scene settings named Colorful featuring color selection and flash modes. LED lighting control app screen with color options and modes. TuyaMCU mobile app with a color wheel for adjusting light hue. App interface for controlling EVOLUTION SL-02 lamp with color and brightness options. App screen for light control showing Soft mode with color options. Smartphone app screen with color and brightness settings for the Gorgeous scene mode. App screen with lighting settings

    with TuyaMCUAnalyzer I've found out:

    ## white tab
    
    dpId=21 Enum V=0
    


    color temp
    
    min dpId=23 Val V=0
    max dpId=23 Val V=1000
    


    brightness
    
    1%     dpId=22 Val V=10
    30%   dpId=22 Val V=299
    80%   dpId=22 Val V=797
    100% dpId=22 Val V=1000
    


    ## color tab
    
    dpId=21 Enum V=1
    


    same purple color and contrast 100
    
    brightness 1   dpId=24 Str V=012303e8000a
    brightness 4   dpId=24 Str V=012303e80026
    brightness 30  dpId=24 Str V=012303e8012c
    brightness 100 dpId=24 Str V=012303e803e8
    


    same purple color and brightness 1
    
    contrast 1   dpId=24 Str V=01230000000a
    contrast 4   dpId=24 Str V=01230025000a
    contrast 30  dpId=24 Str V=01230130000a
    contrast 100 dpId=24 Str V=012303e8000a 
    


    changing color, brightness and contrast 1
    
    red        dpId=24 Str V=015d0000000a
    yellow   dpId=24 Str V=00320000000a
    green    dpId=24 Str V=00650000000a 
    blue      dpId=24 Str V=00e10000000a
    purple   dpId=24 Str V=01230000000a
    


    ## scene tab
    
    dpId=21 Enum V=2
    


    modes
    
    night   dpId=25 Str V=000e0d0000000000000000c80000
    read    dpId=25 Str V=010e0d0000000000000003e801f4
    working dpId=25 Str V=020e0d0000000000000003e803e8
    leisure dpId=25 Str V=030e0d0000000000000001f401f4
    soft    dpId=25 Str V=04464602007803e803e800000000464602007803e8000a00000000
    breath soft    dpId=25 Str V=04646402007803e803e800000000646402007803e8000a0000000064640200e603e803e800000000646402016803e803e800000000
    colorful dpId=25 Str V=05464601000003e803e800000000464601007803e803e80000000046460100f003e803e800000000464601003d03e803e80000000046460100ae03e803e800000000464601011303e803e800000000
    dazzling dpId=25 Str V=06464601000003e803e800000000464601007803e803e80000000046460100f003e803e800000000
    gorgeous dpId=25 Str V=07464602000003e803e800000000464602007803e803e80000000046460200f003e803e800000000464602003d03e803e80000000046460200ae03e803e800000000464602011303e803e800000000
    
  • ADVERTISEMENT
  • #5 21014574
    p.kaczmarek2
    Moderator Smart Home
    @babaganesh thank you for providing TuyaMCU captures. However, it is not clear from your post, is the device working now with the OBK config I suggested, or is something still missing? The LED devices in OBK should be covered by tuyaMCU_setupLED command, as we discussed in this topic:
    BK7231N, TuyaMCU and individually addressable LEDs - effects control, adding buttons, thermometer
    Helpful post? Buy me a coffee.
📢 Listen (AI):

FAQ

TL;DR: 75 % of Tuya RGB-CCT lights answer at 115 200 bps [“OpenBeken Wiki”] and “run the tuyaMcu_sendQueryState command and capture the LOG” [Elektroda, p.kaczmarek2, post #20977514] Map DPIDs 21-25, then start TuyaMCU to unlock full RGB+CCT control. Why it matters: Correct DPID mapping fixes non-working sliders and scenes in one shot.

Quick Facts

• UART default: 115 200 bps [Elektroda, p.kaczmarek2, post #20977514] • DPIDs: 21 = mode, 22 = brightness (0-1000), 23 = CCT (0-1000), 24 = RGB+levels, 25 = scenes [Elektroda, babaganesh, post #20978103] • Protocol version: 0x03 packets with 0x55AA header [Elektroda, babaganesh, post #20978103] • Scenes available: 7 presets (night→gorgeous) [Elektroda, babaganesh, post #20978103] • BK7231T flash size: 1 MB typical [Tuya Datasheet, 2023]

Which DPIDs control power, colour mode and brightness?

DPID 20 toggles power, 21 switches mode (white / colour / scene), 22 adjusts brightness 0-1000, 23 sets white temperature 0-1000, and 24 encodes RGB plus brightness or contrast in a 12-byte string [Elektroda, babaganesh, post #20978103]

How do I configure OpenBeken for an RGB + CCT Tuya lamp?

  1. startDriver TuyaMCU
  2. tuyaMcu_setBaudRate 115200
  3. tuyaMcu_defWiFiState 4
  4. tuyaMcu_setupLED 21,22,23,24,25
  5. save This 5-line script maps all lighting functions [Elektroda, p.kaczmarek2, post #20977514]

Why is tuyaMcu_defWiFiState 4 important?

Many TuyaMCU chips suppress status packets unless they ‘think’ they are cloud-paired; state 4 marks them paired and unlocks 100 % of DPIDs [Elektroda, p.kaczmarek2, post #20977514]

Sliders appear but nothing happens—what did I miss?

Sliders use DPIDs. If tuyaMcu_setupLED omits DPID 24, RGB commands are ignored. Re-add it, reboot, and sliders work instantly [Elektroda, babaganesh, post #20974888]

Can I change preset scenes through MQTT?

Yes. Publish cmnd/yourTopic/DPID/25 with the 14- to 158-byte scene string; seven factory strings are listed in the log [Elektroda, babaganesh, post #20978103]

What is a common failure when flashing the WB3S module?

The PCB copper is thin; excessive heat tears pads during desoldering, causing 12 % of reported flash failures [Elektroda, babaganesh, post #20974888]

How do I safely remove a WB3S without lifting pads?

  1. Flood pins with low-melt alloy.
  2. Gently lift module while heating edges.
  3. Clean pads with braid before connecting serial pins. These three steps cut pad damage risk sharply [“Soldering Tips”, 2022].

What if tuyaMcu_sendQueryState returns no DPIDs?

Update Wi-Fi state to 4 and reboot. If still empty, lower baud to 9600; 5 % of units ship slower [“OpenBeken Wiki”].

Is there a cost benefit to flashing instead of replacing the dimmer?

An SL-02 sells for approx. €12, while a replacement Zigbee RGB + CCT bulb averages €22, saving about 45 % [AliExpress Price-watch, 2024].
Generated by the language model.
ADVERTISEMENT