logo elektroda
logo elektroda
X
logo elektroda

BL602 tuya mini smart switch relay (model ELC MNEW 01) without power meter

magic81 597 15
ADVERTISEMENT
  • #1 21825111
    magic81
    Level 3  
    Posts: 7
    Rate: 1
    "chip": "BL602", maximum flash baud rate (using CH340 USB TTL converter): 460800

    Code: JSON
    Log in, to see the code

    Most similar devices have TglChanOnTgl on pin 2.

    Maybe I will add functions for double-press or long-press.


    Mini Smart Switch with wires connected, next to blue product box
    Electronic module with jumper wires connected to labeled pins Small green PCB with integrated circuit labeled SM-028_V1.3 Two electronic modules on a table, one lying flat, the other standing upright

    Added after 1 [hours] 56 [minutes]:

    changed "14": "LED_n;1", to LED_Wifi_n and
    added start script:
    addEventHandler OnHold 20 SafeMode
    , so there is led identification if the device is connected to the wifi, if not (because you changed ssid or another problem), you can easily create access point and aproach it and reconfigure it, so you don't have to restart device 5 times to boot in safe mode.
  • ADVERTISEMENT
  • #2 21825345
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14395
    Help: 650
    Rate: 12319
    Another SM-028-V1.3 device, nice.

    By the way, don't solder wires like that, this method has a high risk of ripping off the pads. I usually try to trim the wires first.

    Do you have factory 2MB backup? Did you flash with our Easy Flasher?
    https://github.com/openshwprojects/BK7231GUIFlashTool
    Helpful post? Buy me a coffee.
  • #3 21825355
    magic81
    Level 3  
    Posts: 7
    Rate: 1
    I know about imperfect solder method, but it is only temporary and I am very careful. I realize there is a big leverage :)

    Yes, I flashed with your tool. Works well.

    I had a problem after setting Wi-Fi SSID and SSID2 that device didn't connect to SSID 1 and did not switch to second one. So I tried to read serial monitor to get some feedback, but I didn't know the proper baud rate so I got only nonsense characters. And I had to reflash it.

    I have original firmware, yes, do you want me to upload it?
  • ADVERTISEMENT
  • #4 21825361
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14395
    Help: 650
    Rate: 12319
    Imperfect soldering is okay as long as it works, it's just that I did the same in the past and I tore off pads that way, haha.

    We are collecting flash backups with @divadiow for research, you can share yours as long as the device was NOT paired with your WiFi (otherwise it may contain your SSID).
    https://github.com/openshwprojects/FlashDumps
    Helpful post? Buy me a coffee.
  • #5 21825410
    divadiow
    Level 38  
    Posts: 4839
    Help: 420
    Rate: 852
    p.kaczmarek2 wrote:
    this method has a high risk of ripping off the pads. I usually try to trim the wires first


    totally. took me ages to work this out for some reason. now all my wires have short copper ends. much more flexible.
  • #6 21825679
    magic81
    Level 3  
    Posts: 7
    Rate: 1
    There you go ;) readResult...-18-54.bin (2 MB)You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #8 21825713
    magic81
    Level 3  
    Posts: 7
    Rate: 1
    Can you read something interesting from it? :)
  • #9 21825717
    divadiow
    Level 38  
    Posts: 4839
    Help: 420
    Rate: 852
    from the log? hmm, not so much maybe. SDK version used, name and version of firmware, build date.
  • #10 21825722
    magic81
    Level 3  
    Posts: 7
    Rate: 1
    And how do you read pin configuration and internal logic? I flashed another chip (power meter) before, and there was config JSON and translation.
  • #11 21825740
    divadiow
    Level 38  
    Posts: 4839
    Help: 420
    Rate: 852
    ah yes, I forget about that work-in-progress BL602 config extractor. This is what one of my scripts outputs.

    Code: Text
    Log in, to see the code


    which aligns with your findings. I have a few versions...

    it should be noted that the above is the script interpreting findings. some of it might be wrong/irrelevant
  • #12 21825743
    magic81
    Level 3  
    Posts: 7
    Rate: 1
    How does it work? How do you extract that configuration? :)
  • #14 21825854
    divadiow
    Level 38  
    Posts: 4839
    Help: 420
    Rate: 852
    magic81 wrote:
    I flashed another chip (power meter) before and there was config json and translation


    Unless I misunderstand what you mean. What config JSON and translation? Can you show me where?
  • ADVERTISEMENT
  • #15 21827012
    magic81
    Level 3  
    Posts: 7
    Rate: 1
    >>21825854

    It was this:
    Screenshot showing buttons “Backup and flash new” and “Firmware backup”


    Screenshot of Tuya Config Quick Viewer showing GPIO configuration in JSON format

    So I just wondered why pin configuration was extracted on that chip, but not on BL602, that's all :)
  • #16 21827062
    divadiow
    Level 38  
    Posts: 4839
    Help: 420
    Rate: 852
    oh, I see. Easy Flasher only decrypts and extracts config info from Tuya KV. Your device is eWeLink.

Topic summary

✨ The discussion centers on the BL602-based Tuya mini smart switch relay (model ELC MNEW 01) without a power meter, focusing on pin assignments and firmware customization. The user notes an unusual pin mapping with TglChanOnTgl on pin 3 instead of the common pin 2 and plans to add double-press and long-press functions. Firmware modifications include renaming pin 14 from LED_n to LED_Wifi_n and adding a start script with an OnHold event handler on pin 20 to enable safe mode and LED identification for Wi-Fi connection status. The conversation also covers flashing the device using the Easy Flasher tool with a CH340 USB TTL converter at 460800 baud rate, soldering techniques to avoid pad damage, and issues with Wi-Fi SSID failover. Sharing factory 2MB flash backups is encouraged for research, provided the device is not paired to a Wi-Fi network to avoid exposing SSIDs. The SM-028-V1.3 device is mentioned as similar hardware.
Generated by the language model.

FAQ

TL;DR: BL602-based ELC-MNEW-01 flashes reliably at 460,800 baud, and “Maybe I will add functions for double-press or long-press.” [Elektroda, magic81, post #21825111] Why it matters: This FAQ helps tinkerers flash, wire, and recover the Tuya/eWeLink mini relay safely and fast, with working pin maps and recovery tips.

Quick Facts

What board is this exactly—does ELC MNEW 01 match SM-028-V1.3?

Yes. A contributor identified it as another SM-028‑V1.3 unit in this family. This ties it to the same PCB revision and helps reuse known templates. [Elektroda, p.kaczmarek2, post #21825345]

What are the working GPIO assignments for relay, LED, and buttons?

High‑confidence mapping from the extracted DT data: GPIO14=WifiLED;0, GPIO21=Rel;1, GPIO20=Btn;1, GPIO3=Btn;2. The script labels originate from /config_gpio entries in the firmware. [Elektroda, divadiow, post #21825740]

What baud rate should I use for flashing and for serial logs?

Flashing worked up to 460,800 baud with a CH340 adapter. The BL602 firmware boot log shows uart0 configured at 2,000,000 baud for runtime logs. [Elektroda, divadiow, post #21825692]

Why didn’t SSID2 failover work after I set SSID and SSID2?

One user reported the device failed to connect to SSID1 and did not switch to SSID2, requiring a reflash for recovery. To avoid getting stuck, add a SafeMode long‑press handler. [Elektroda, magic81, post #21825355]

How do I add a SafeMode recovery so I don’t power‑cycle five times?

Use the start script to tie a long hold on the button to SafeMode and use LED_Wifi_n for status. How‑To: 1. Set LED to LED_Wifi_n on GPIO14. 2. Add: addEventHandler OnHold 20 SafeMode. 3. Reboot and test long‑press recovery. [Elektroda, magic81, post #21825111]

Can this firmware support long‑press or double‑press actions?

Yes. The author plans long‑press/double‑press, and the extracted config shows a button node with multipress mode, confirming support in firmware. “Maybe I will add functions for double-press or long-press.” [Elektroda, divadiow, post #21825740]

What useful info can we read from the boot log?

You can see SDK version, firmware name and version, and build date/time. This helps confirm images and debug mismatches after flashing. [Elektroda, divadiow, post #21825717]

How do you extract BL602 pin configuration from the firmware?

A work‑in‑progress script scans the BL602 image for a device tree blob and maps /config_gpio entries to human‑readable pins, then emits an OpenBeken‑style template. [Elektroda, divadiow, post #21825740]

Where should I upload my untouched factory 2 MB backup?

Share clean, unpaired dumps to the community FlashDumps repository. Avoid Wi‑Fi‑paired images to prevent leaking SSIDs. [Elektroda, p.kaczmarek2, post #21825361]

Why did Easy Flasher not extract JSON pin config like on some Tuya devices?

Because Easy Flasher only decrypts and extracts Tuya KV. This unit is eWeLink, so that Tuya‑specific config path doesn’t apply. [Elektroda, divadiow, post #21827062]

Any soldering advice to avoid lifting pads on this tiny board?

Trim wire ends short before soldering; long, stiff leads add leverage and can rip pads during handling or rework. [Elektroda, p.kaczmarek2, post #21825345]

What exact firmware build was observed on the dump?

Boot log shows FWSW‑WHBL602‑SWITCH‑BL602L_v1.2.0, built May 22, 2024, with release_bl_iot_sdk_1.6.34‑82. This correlates with the SM‑028‑V1.3 hardware. [Elektroda, divadiow, post #21825692]

What size is the stock image for this device?

The analyzed binary was exactly 2,097,152 bytes (2 MB). This aligns with common BL602 flash sizes used in these minis. [Elektroda, divadiow, post #21825740]

What if my UART output is garbage characters?

You are likely using the wrong baud. The observed boot log uses 2,000,000 baud; set your terminal accordingly to read clean output. [Elektroda, divadiow, post #21825692]

Is there a ready OpenBeken template from the dump?

Yes. The extractor produced a template with the GPIO map, suitable for importing into OpenBeken‑style workflows. Review and validate on hardware before deployment. [Elektroda, divadiow, post #21825740]

Can I use Easy Flasher for this BL602 and is it confirmed working?

Yes. A user successfully flashed this device with the community tool and reported it works well on this hardware. [Elektroda, magic81, post #21825355]
Generated by the language model.
ADVERTISEMENT