logo elektroda
logo elektroda
X
logo elektroda

Exploring BK7231N Chip in Mini Smart Switch: Firmware Version 1.3.10 Flashing Experience

mistikdonbass  3 5001 Cool? (+4)
📢 Listen (AI):
I came across a seemingly ordinary smart switch.
Photo of a mini smart switch with technical specifications.
But inside there is some kind of simplified version with a BK7231N chip.
Side view of an electronic board with a connector, resistor, capacitor, and inductor. Close-up of the inside of a smart switch with electronics and components. Close-up of the internal part of a smart switch with a BK7231N chip.
The image shows a circuit board of a smart switch with markings for GND, VCC, TX, RX, and CEN.

At first I decided to flash it with Tuya-Convert, but the version of the native firmware was 1.3.10 and it did not allow flashing wirelessly.
After calling the contacts, I decided to flash it in the usual way.
I did not need the CEN contact for the firmware.
Everything went well.
Image of a circuit board with connected wires. Close-up of a USB to TTL adapter with connected wires.

{
	"rl1_lv":"1",
	"on_off_cnt":"10",
	"onoff_rst_m":"1",
	"onoff_clear_t":"10",
	"rand_dpid":"42",
	"net_trig":"2",
	"onoff_n":"3",
	"netled1_lv":"1",
	"jv":"102",
	"onoff_rst_type":"2",
	"total_bt_pin":"23",
	"nety_led":"2",
	"total_stat":"2",
	"reset_t":"5",
	"netled1_pin":"26",
	"remote_add_dp":"49",
	"remote_list_dp":"50",
	"net_type":"0",
	"inch_dp":"44",
	"module":"CB2S",
	"ch_cddpid1":"9",
	"onoff1":"6",
	"clean_t":"5",
	"init_conf":"38",
	"zero_select":"0",
	"onoff_type":"0",
	"series_ctrl":"0",
	"total_bt_lv":"0",
	"cyc_dpid":"43",
	"remote_select":"0",
	"ch_num":"1",
	"rl1_pin":"7",
	"netn_led":"2",
	"ch_dpid1":"1",
	"crc":"6",
	"}PPAgw_di{abi":"0",
	"id":"null",
	"swv":"1.3.10",
	"bv":"40.00",
	"pv":"2.2",
	"lpv":"3.4",
	"pk":"keyjnuy4s3kre7m7",
	"firmk":"keyjnuy4s3kre7m7",
	"cadv":"1.0.5",
	"cdv":"1.0.0",
	"dev_swv":"1.3.10",
	"s_id":"null",
	"dtp":"0",
	"sync":"0",
	"attr_num":"1",
	"mst_tp_0":"9",
	"mst_ver_0":"1.3.10",
	"mst_md5_0":"null",
	"mst_tp_1":"0",
	"mst_ver_1":"null",
	"mst_md5_1":"null",
	"mst_tp_2":"0",
	"mst_ver_2":"null",
	"mst_md5_2":"null",
	"mst_tp_3":"0",
	"mst_ver_3":"null",
	"mst_md5_3":"null }xAinch_time_key{ch0",
	"ssid":"dnRydXN0LWZsYXNo",
	"passwd":"null",
	"md":"1",
	"random":"0",
	"wfb64":"1",
	"stat":"0",
	"token":"00000000",
	"region":"US",
	"reg_key":"0101",
	"dns_prio":"0 "
}


Device configuration, as extracted from Tuya: 
- Pair/Toggle All Button on P23
- WiFi LED on P26
- TglChannelToggle (channel 1) on P6
- Relay (channel 1) on P7
Device seems to be using CB2S module, which is using BK7231N.
And the Tuya section starts, as usual, at 2023424

About Author
mistikdonbass wrote 13 posts with rating 4 , helped 1 times. Been with us since 2023 year.

Comments

BH337 02 Dec 2023 16:15

Hi - I found your posting about the Mini Smart switch and I wanted to flash new firmware on my device too. I just purchased a device that looks looks just like the one that you posted. It has a BK7231N... [Read more]

mistikdonbass 02 Dec 2023 17:12

Hello, I flashed the OpenBK firmware, this is an alternative to tasmot. Everything is written in great detail on github. There's nothing complicated there. https://github.com/openshwprojects/OpenBK... [Read more]

BH337 06 Dec 2023 04:40

Thanks - I succeeded. It was a bit more involved than Tasmota on a Sonoff, but I followed the instructions and got it done. Perhaps there was a bit too much information provided and I had to figure out... [Read more]

FAQ

TL;DR: If your Mini Smart Switch uses a BK7231N and Tuya firmware 1.3.10, "Everything went well" after switching from wireless Tuya-Convert to serial flashing with OpenBK. This FAQ is for owners of this exact board who need the pin map, module ID, and safer flashing path when OTA fails. [#20809133]

Why it matters: This thread turns a vague BK7231N relay board into a documented, flashable device with a usable firmware path and concrete GPIO mapping.

Option Hardware/firmware in thread Result Effort level
Tuya-Convert Native Tuya firmware 1.3.10 on BK7231N board Wireless flashing did not work Low, but blocked
OpenBK via serial BK7231N / CB2S board with wired contacts Flashing succeeded More involved
Tasmota + Tasmotizer Sonoff ESP8285 devices Worked easily for the poster's older devices Easier on ESP8285

Key insight: Firmware version 1.3.10 was the blocker, not the board itself. Once the owner switched to direct serial flashing, OpenBK worked on this BK7231N smart switch without using the CEN contact.

Quick Facts

  • The extracted configuration identifies the module as CB2S, which the post says uses a BK7231N chip. [#20809133]
  • GPIO mapping from the dump is explicit: button on P23, WiFi LED on P26, toggle input on P6, and relay on P7 for channel 1. [#20809133]
  • The Tuya data block reportedly starts at firmware offset 2,023,424 bytes, giving a concrete anchor for this device's dump layout. [#20809133]
  • The JSON-like config exposes useful timing values for setup: reset_t = 5 s, clean_t = 5 s, and on_off_cnt = 10. [#20809133]
  • One successful setup used a modified FTDI adapter with a dedicated 3.3 V regulator to provide more stable power to the BEKEN chip during flashing. [#20848543]

How do you flash OpenBK firmware onto a Mini Smart Switch with a BK7231N chip when Tuya-Convert fails on firmware version 1.3.10?

Use serial flashing instead of Tuya-Convert. The successful path in the thread was: 1. open the switch and access the programming contacts, 2. wire the board and flash it "in the usual way," 3. load OpenBK after Tuya-Convert fails on native firmware 1.3.10. The poster states the flash completed successfully and did not require the CEN contact on this board revision. [#20809133]

Why does Tuya-Convert not allow wireless flashing on some Tuya devices running native firmware 1.3.10?

Because this specific device's native Tuya firmware 1.3.10 blocked the wireless path used by Tuya-Convert. The thread gives one clear fact: the owner first tried Tuya-Convert, but firmware version 1.3.10 "did not allow flashing wirelessly," so they switched to direct serial flashing instead. It does not provide a deeper protocol-level explanation. [#20809133]

What firmware was used on this BK7231N-based Mini Smart Switch, and where can I download it?

The switch was flashed with OpenBK firmware. The follow-up reply names the project as OpenBK and points directly to the OpenBK7231T_App GitHub repository as the download source for the firmware and instructions used on this BK7231N device. [#20843179]

What is OpenBK7231T_App, and how does it serve as an alternative to Tasmota on BK7231N devices?

OpenBK7231T_App is the OpenBK firmware project used here for a BK7231N smart switch. In the thread, it is described as "an alternative to tasmot," meaning it fills the Tasmota-like role on BK7231N hardware where the user did not expect standard Tasmota support to apply. [#20843179]

What is the CB2S module in a smart switch, and how is it related to the BK7231N chip?

"CB2S" is a Wi-Fi module used inside the smart switch that carries the BK7231N chip, linking the board-level module name to the actual BEKEN SoC used for flashing and GPIO mapping. In the extracted configuration, the module field is "CB2S," and the post explicitly says CB2S uses BK7231N. [#20809133]

Which pins on this Tuya Mini Smart Switch control the button, WiFi LED, toggle input, and relay after extracting the device configuration?

The extracted pin map is button on P23, WiFi LED on P26, toggle input on P6, and relay on P7. The same extracted note also states that the toggle input and relay are both for channel 1, which matches the single-channel relay layout shown in the post. [#20809133]

How can I identify the Tuya section start address in a BK7231N firmware dump, such as the 2023424 offset mentioned in the thread?

In this case, you identify it from the extracted Tuya configuration report, which explicitly states where the Tuya block begins. The post says, "the Tuya section starts, as usual, at 2023424," so the usable answer for this device is the reported offset of 2,023,424 bytes. [#20809133]

What is the CEN contact on a BK7231N board, and why might flashing work without using it?

On this board, the CEN contact was not needed for a successful flash. The owner says they "did not need the CEN contact for the firmware," yet the serial procedure still completed normally, so this specific Mini Smart Switch revision can be programmed without using that pad. [#20809133]

How does flashing a BK7231N smart switch with OpenBK compare with flashing a Sonoff ESP8285 device with Tasmota and Tasmotizer?

OpenBK on this BK7231N switch was more involved than Tasmota on the user's Sonoff ESP8285 devices. The user says Tasmotizer plus an FTDI adapter worked easily on Sonoff ESP8285 hardware, while the BK7231N process required following separate OpenBK instructions and extra setup work. [#20848543]

What method should I use to program a BK7231N smart switch with an FTDI adapter, and what differs from the usual Tasmotizer workflow?

Use an FTDI-based serial method, not the usual Tasmotizer workflow used for Sonoff ESP devices. The successful approach in the thread was: 1. modify the FTDI setup for stable 3.3 V power, 2. follow the OpenBK GitHub instructions, 3. flash the BK7231N board directly over wired contacts. The user notes this was more involved than flashing ESP8285 Sonoff hardware. [#20848543]

Why might a modified FTDI module with a dedicated 3.3V regulator help when flashing a BEKEN BK7231N chip?

It can help by giving the BEKEN chip more stable 3.3 V power during programming. The user modified an FTDI module to add a 3.3 V regulator specifically for that reason, then reported that the BK7231N flash worked on the first attempt, even though they were unsure the change was strictly necessary. [#20848543]

What are the main troubleshooting steps if a BK7231N smart switch does not enter flash mode or fails during serial flashing?

Start with the failure already proven in the thread: if Tuya-Convert fails on firmware 1.3.10, stop chasing OTA and switch to wired flashing. Then verify the exact pin map from the extracted config, and keep the wiring minimal because this board flashed without CEN. Those two facts solved the documented case. [#20809133]

How can I safely open and wire a mains-powered Mini Smart Switch for firmware flashing without damaging the board or risking electric shock?

The thread does not give a full electrical safety procedure. It only shows that the switch was opened, contacts were accessed, and flashing was done by wiring those contacts directly on the board; it does not document any live-mains handling sequence, insulation method, or enclosure reassembly checklist. [#20809133]

What settings in the extracted Tuya JSON-like configuration are most useful for mapping GPIOs when setting up OpenBK on a single-channel relay switch?

The most useful fields are the direct pin assignments and channel markers. In this dump, the practical mapping data are total_bt_pin = 23, netled1_pin = 26, onoff1 = 6, rl1_pin = 7, ch_num = 1, and module = CB2S. The timing values reset_t = 5 and clean_t = 5 also help interpret button behavior. [#20809133]

Which alternative firmware options are available for Tuya-based BK7231N smart switches, and how do they differ in features and setup complexity?

This thread names OpenBK as the working alternative firmware for the BK7231N switch, and it contrasts that with Tasmota on Sonoff ESP8285 hardware. OpenBK worked on the CB2S/BK7231N board after serial flashing, while Tasmota plus Tasmotizer was described as easier on ESP8285 devices rather than on this BK7231N design. [#20843179]
Generated by the language model.
%}