The next photo shows how to program the WB2S.
3.3V, GND, RX and 1RX have to be connected to the UART programmer.
Program a new firmware with the BkWrite tool.
At beginning of programming, connect CEN to GND for 1 sec to reset the BK7231T.
Important: To program the WB2S, the switch on the PCB connected to the 1RX pin of the WB2S module needs to be disconnected (because it has a pull up resistor which disturbs the programming). This can be done easily: Just "remove" the solder from the 1RX pin which connects the two PCBs so that the two PCBs are no longer connected on the 1RX pin.
Thanks, this will certainly be useful for beginners and new OBK users.
As per CEN - I usually don't do CEN, just reboot with power off/on cycle. I also usually desolder whole WB2S for that and power it from 3.3V LDO.
Regarding pull up resistor - it happens from time to time, for example, in case of that Relay, we had to remove both pull up resistor and a capacitor (used to debounce button by Tuya):
Thanks for this post! I am new to this, and used this info to get OpenBK on a similar but smaller plug. Mine is a generic 16A UK LSPA7, but the internals are similar -- WB2S and BL0937. It opened easily with a craft knife, and I had to desolder the AC power pins to remove the main board. The WB2S would not accept programming when attached to the main board, so I desoldered it altogether. I also found that 'uartprogram' failed, first with an error 'cannot set baud rate', and then (at a lower baud rate) a write error. I tried bk7231tools with an offset of 0x11000, which worked fine. The OpenBK configuration settings seem to work correctly for this device -- the LEDs, relay and power measurement all seem to be working. Thanks again!
Edit: The chip was reported as a "BK7231S_1.0.6" but I used the BK7231T firmware.