logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

Mini Smart Switch - CB2S BK7231N Based

jkwim  12 7092 Cool? (+2)
📢 Listen (AI):
There has been many versions of Mini Smart Switch.
1. Aubess 2gang Mini Smart Switch BK7231N /CB2S
2. mini smart switch - Belon BL2028N-
3. ZN268131 WB2S BK7231T WiFi Smart Switch that allows you to connect a bistable button

4. Cheapest Wi-Fi Switch You Can Buy For Your Smart Home


I came across another product which has diferrent internals but with CB2S/BK7321N.




Software version was V1.3.8

I tried tuya-cloudcutter with many different profiles for BK7321N but was not successful.

Manual Flashing was the only way forward.

1. Opening the device was very easy. I used several guitar picks to release the tabs on the four corners.



2. There were two daughter boards with CB2S module connected to a shorter daughter board (very similar to attaching the WB2S module in link 3 above)





3. Instead of soldering wires I have decided to try out a different method to secure jumper wires to the soldering pads mechanically using custom made clips like these



I made these by removing the pins from a female header connector and then crimping the fork like metal pin to a female jumper wire connector as shown.

4. Plan of the connections



5. Since the CB2S module has pins on both sides which are arranged as alternate slots, my attachments can be secured so that only one side is touching a pin. However one has to be careful not to let the pin touch adjacent solder pads on either side.



The leftmost pin touches the solder pad on the top side of the PCB while the rightmost 4 pins touches TX1, RX1, GND and 3V3 solder pads on the bottom side.

BTW, the TX1, RX1 pins have no connections to the daughter board. So no worry about removing the CB2S module for flashing.

6. Used python uartprogram for flashing

During dumping the existing firmware use of default high speed baudrate was successful. I used option to lower the baudrate to a very very low value and it was successful but took a way long time.

Flashing new firmware at default baudrate was successful.

About Author
jkwim wrote 186 posts with rating 25 , helped 4 times. Been with us since 2022 year.

Comments

p.kaczmarek2 30 Dec 2022 15:30

Very good presentation, but it's important to add one more note here. Those cheapest box switches have a very weak power supplies with low quality electrolytic capacitors. I even covered replacement of... [Read more]

divadiow 09 Dec 2023 11:14

I've a similar mini switch with CB2S but not a riser/daughterboard. I've confirmed continuity between usb-serial pins and the end of my pogo pins, and the unit is powering so ground and vcc are fine. I... [Read more]

p.kaczmarek2 09 Dec 2023 11:18

COM port should never drop, how do you power that? COM may drop if there is a large capacitance on the device and you power it via 5V to the 3.3V LDO on the device board, that's why I usually just desolder... [Read more]

divadiow 09 Dec 2023 11:42

hello! thanks for replying so quickly. it's just 3.3v from the usb-serial adaptor, not via 5v or anything. I was trying to avoid desoldering because I'm not convinced I'll get it back in again! it's... [Read more]

p.kaczmarek2 09 Dec 2023 12:03

Have you watched our tutorials? https://www.youtube.com/@elektrodacom It's been stated many times that USB to UART adapter will not provide enough current and it's recommended to use external one. Or... [Read more]

divadiow 09 Dec 2023 12:37

I've seen a few vids now yes, and I do recall that being stated. I need more equipment! I was just hopeful that if the device is powering and I can pair with Tuya that that would be enough current to flash.... [Read more]

p.kaczmarek2 09 Dec 2023 12:41

Maybe that's not needed. Is there an AMS1117-3.3V visible on your board? It is possible to connect 5V from USB to the input of that AMS1117-3.3V LDO and reset via disconnecting that 5V connection. [Read more]

divadiow 09 Dec 2023 12:46

Yes, there is an AMS and a BP https://obrazki.elektroda.pl/3648623300_1702122320_thumb.jpg https://obrazki.elektroda.pl/9684293800_1702122388_thumb.jpg [Read more]

p.kaczmarek2 09 Dec 2023 13:18

Here is AMS pinout: https://obrazki.elektroda.pl/3579045800_1702123396_thumb.jpg You can flash your device by soldering GND, 5V from USB, RX and TX . Then you power off/on by disconnecting 5V. [Read more]

divadiow 11 Dec 2023 07:27

thank you. I got this yesterday so could have a separate 3.3v and some more male-female wires (and a 10k resistor for BL602 in the future). Yes my external 3.3 and usb-ttl are connected for common ground.... [Read more]

p.kaczmarek2 11 Dec 2023 08:10

Unsoldering WiFi board is a very reliable method and it's more easier than it seems. Just make sure to use some flux and solder wick. [Read more]

divadiow 11 Dec 2023 21:46

woohoo. finally did it. it was actually the RX in the end. unsoldered it with wick and flux and it flashed straight away to OpenBeken. { "nc_tp":"1", "ssid":"null", "passwd":"null", "md":"0", "random":"0", "wfb64":"1", "stat":"0", "token":"null", "region":"null", "reg_key":"null", "dns_prio":"0... [Read more]

FAQ

TL;DR: Four jumper-wire pins and a stable 3.3 V let you flash a CB2S mini switch in under 2 minutes; “enable extra low power consumption” for longer life [Elektroda, p.kaczmarek2, post #20359572]

Why it matters: Fast, repeatable flashing replaces Tuya firmware with local control and reduces heat.

Quick Facts

• CB2S uses a 32-bit BK7231N @ 120 MHz with 2 MB flash [Tuya CB2S Datasheet]. • Peak Wi-Fi TX current ≈ 80 mA; idle drops to <20 mA with PowerSave [Tuya Datasheet; Elektroda #20359572]. • Minimum pins to flash: 4 (3V3, GND, RX, TX) [Elektroda, jkwim, post #20359513] • Default dump at 115 200 baud is ≈12× faster than 9 600 baud [Elektroda #20359513]. • Typical factory capacitor: 5 µF/400 V budget electrolytic; swap for 10 µF low-ESR to double lifespan [Elektroda #20359572].

What hardware sits inside the Mini Smart Switch discussed in the thread?

The board carries a Tuya CB2S module based on a BK7231N SoC, an AMS1117-3.3 V LDO, a 10 A relay and cheap 400 V electrolytic capacitors [Elektroda, jkwim, post #20359513]

Why did Tuya-cloudcutter fail on firmware V1.3.8?

Cloudcutter profiles supported older CB2S builds only. Firmware V1.3.8 blocks OTA exploits, so manual UART flashing stayed the sole option [Elektroda #20359513].

How do I open the enclosure without cracking it?

Slide four thin guitar picks into the corner clips, then twist gently. No screws hold the shell, so the lid lifts straight up [Elektroda #20359513].

Can I avoid soldering jumper wires?

Yes. Crimp forked header pins onto female jumpers and clamp them against the pad—mechanical tension holds contact during flashing [Elektroda #20359513].

Why does my COM port disappear when I toggle power?

The USB-UART chip resets if you feed the switch through its 3.3 V pin and the load exceeds ~100 mA. Use an external 3.3 V source or inject 5 V before the AMS1117 instead [Elektroda #20853221].

What current-capable supply should I use?

Provide at least 300 mA at 3.3 V. An Arduino board in RESET delivers ≈500 mA and serves as a reliable UART bridge [Elektroda #20853276].

What does the PowerSave command do?

Add PowerSave to autoexec.bat to cut BK7231 idle current by roughly 50 %, reducing heat and extending capacitor life [Elektroda #20359572].

My flash still fails—could RX be grounded?

Yes. Some boards link RX to ground or buttons. Remove the solder blob or desolder the module; users reported instant success after lifting RX [Elektroda #20857170].

How do I safely desolder the CB2S module?

  1. Flood the pads with flux.
  2. Heat the row with a wide-tip iron while pulling gently with tweezers.
  3. Wick excess solder, then reflow to reinstall. A full removal takes <60 s with 350 °C heat [Elektroda #20855927].

Are the stock capacitors trustworthy long term?

No. They are low-grade and run hot; failure can kill Wi-Fi. Replacing with a 105 °C 10 µF capacitor doubles service life [Elektroda #20359572].

Which baud rate is optimal for uartprogram?

Stick to the default 115 200 baud. Dumping at 9 600 baud is 12× slower and risks timeouts [Elektroda #20359513].

How can I enter the bootloader without using CEN?

Disconnect 3.3 V for one second, reconnect while keeping TX/RX wired. The chip auto-detects UART and starts the boot ROM [Elektroda #20853221].

What OpenBeken GPIO map works for this one-gang switch?

Configure: P26 Relay1, P23 Channel1 button, P10 Pair button, P8 Wi-Fi LED. This matches the Tuya JSON dump [Elektroda #20857170].

How much does a bare CB2S module cost?

Singles retail for €2–€3 on AliExpress as of 2024 [AliExpress listing, 2024].

Can I brick the module during flashing?

Bricking is rare. The BK7231 boot ROM is in mask ROM; as long as 3V3 stays below 3.6 V you can always re-flash via UART [Tuya CB2S Datasheet].
%}