Detailed guide on how to flash the new Tuya Beken Chips with OpenBK7231T

Not quite sure about this, since I’ve only dealt with switches with the wifi_led is usually for the wifi indicator & off led.

You might need to ask in elektroda forum.

You can backup the stock firmware, but not restoring back to tuya firmware for now (correct me if I’m wrong here)

Yes, there’s support for bl0942

https://www.elektroda.com/rtvforum/viewtopic.php?p=19984436#19984436

Have you tried the python tool?

Also, try disconnect & connect ADC pin until the flashing starts. Or ground the CEN to restart the chip

Thank you for the information.
Do you have a tutorial or some explanations on how to backup the stock firmware?
I want to be able to restore the stock firmware if I can not find a firmware suitable to my needs.

Use this tool to backup/read the firmware

cd to your folder

For N device
python uartprogram firmware_dump.bin -d com7 -r -u 0x0

For some reason, I keep getting crc errors so I use bk7231py tools
python bk7231tools.py read_flash -d com7 -s 0 -c 512 firmware_dump.bin --no-verify-checksum

Dissect the firmware dump and you should get these files,
python bk7231tools.py dissect_dump -e -O C:\Users\theba\Desktop\Openbkt\cbu firmware_dump.bin

image

Flash the app_1.00.bin
python uartprogram firmware.bin -d com7 -r -u -s 0x0

But I didn’t get mine working, you might have better luck with this

1 Like

Here, more or less the same steps as first post.

Also, check out tuya-cloudcutter if you intend to flash it ota.

1 Like

Hello, can someone tell me if this works with a wall thermostat? I have the Moes BHT-002 with a wb3s and want to go away from Tuya.

Im trying to flash an CB2S( BK7231N) using a Arduino Uno with the chip removed. Acts like a UART then. But BKwriter and the python tool wont flash.

In BK i get 2 blue bars, so its a sign its going, but then a red cross at the end of the bar.

Flash ID:0x00000000
Time:1.735s
Speed of Programm:115200bps
erasing flash:0x00011000…FAILED.

The python way says: Unprotect Failed.

Will try the Raspberry pi4 route to see if thats any better

EDIT: Pi4 works. With the python uartprogram.

I desolderd the chip because i thought that was the reason it didnt work with the Arduino, but that wasnt the case. I think i could have flashed it on the board.

So, I have successfully flashed the board inside the new FEIT Wall dimmer from Costco. Now, I am not sure of the steps to figure out what the configuration should be. It looks like I need to trace what pins go where or such.
Anyone have any insight on next steps? I have it connected to my wifi, can connect to it via the IP and web app and have it successfully connecting to my HA MQTT.

I think it’s better if you ask the developer on elektroda
Normally I would just do trial and error by setting up all pin as relays, and see whats lights up/relay clicks
However I’m not familiar if it’s using tuya mcu based on tasmota emplate page for feit dimmer

Hi, as a newbe i flashing my 3 gang switch with the latest bin file for BK7231N. The flashing doing well but mij question now is how i have to programming the GPIO’s. What i find from a other brand is like this.
Relay 1 : Gpio 8
Relay 2 : Gpio 26
Relay 3: Gpio 24
Button 1 : Gpio 14
Button 2 : Gpio 9
Button 3 : Gpio 10
Wifi led (wifiled_n) : Gpio 1
Is this for every 3 gang switch the same if you flashing with OpenBeken?

Might differ slightly depending on the manufacturer

Flashing the BK7132N is no problem. The BK7132T can’t Read or Flashing. So its not the programmer or the cable because then read or flashing the bk7132N can’t doing the same.

Hi, thanks for no help at all. :-1:

I am assuming you mean BK7231T not BK7132T!

Did you try the Python script? Also check that your soldering is not messing up your connections. I had a guy messaging me with the same problem. They then realised that two pins where shorted by his solder. He cleaned it and it worked.

Good day. Has anyone taking a stab at flashing OpenBK7231T on this presence sensor ?

I have a similar one, but haven’t flash it yet since i’m not sure about the configuration. Any guides?
Don’t see any radar device in blakadders template page

Thank you.
Blackadder has done a transplant on this device and produced the template.

See below

I have the same 3 gang switch, spent so long trying to flash it and finally succeeded using the LibreTuya python with esphome wizard.

Now I can’t seem to figure out the esphome config for these.
I see there’s the standard one on the esphome website, but don’t know how to change this config based on the LibreTuya pinouts etc. My board it s the WB3S

Would highly appreciate if someone can edit the following accordingly please


status_led:
  pin:
    number: GPIO0
    inverted: True

output:
  # 1st button
  - platform: gpio
    pin: GPIO5
    id: relay1

  # 2nd button
  - platform: gpio
    pin: GPIO14
    id: relay2

  # 3rd button
  - platform: gpio
    pin: GPIO12
    id: relay3

light:
  # 1st button
  - platform: binary
    name: "${friendly_name} 1st"
    output: relay1
    id: light1

  # 2nd button
  - platform: binary
    name: "${friendly_name} 2nd"
    output: relay2
    id: light2

  # 3rd button
  - platform: binary
    name: "${friendly_name} 3rd"
    output: relay3
    id: light3

# Buttons
binary_sensor:
  # 1st button
  - platform: gpio
    pin:
      number: GPIO16
      mode: INPUT
      inverted: True
    name: "${friendly_name} 1st Button"
    #toggle relay on push
    on_press:
      - light.toggle: light1

  # 2nd button
  - platform: gpio
    pin:
      number: GPIO4
      mode: INPUT_PULLUP
      inverted: True
    name: "${friendly_name} 2nd Button"
    #toggle relay on push
    on_press:
      - light.toggle: light2

  # 3rd button
  - platform: gpio
    pin:
      number: GPIO3
      mode: INPUT_PULLUP
      inverted: True
    name: "${friendly_name} 3rd Button"
    #toggle relay on push
    on_press:
      - light.toggle: light3

switch:
  - platform: restart
    name: "${friendly_name} REBOOT"

Do you know if doing it this way will allow it to be picked up by Aeotec Hub? I am about to receive the USB-to-Serial converter and will get started on my manu E27 RGB bulbs.

By the way, if anyone has experience disassembling bubls like my LSC bulb and knows how to pull the controller without having to break the connection with the power source, I would love to hear. Everything seems to be “kind of bolted” in place in the bulb (except of course, the cover)