logo elektroda
logo elektroda
X
logo elektroda

Smart Power Plug LCS Action Shop 2578685 970766 firmware upload

The_Wrecker 
Hi,

new time user here, but just wanted to let you know my experience with flashing to OpenBKT7231. First of all thank you for the work done on the firmware and the investigation.

I bought a couple (5 of them) "Smart Plugs" from the Action in the Netherlands:
Brand: LSC (Smart Connect)
Product: Smart Power Plug
Art. No. 2578685
Art. No. 970766
Both Art. No. (as listed above) were on the box, right below each other, I believe the bottom might be the more typical known in the Tuya brand, the first might be from the LSC brand (but I am not 100% sure).

On the plug itself:
970766 Max 16A 3680W μ T35
220-240V~ 50/60Hz
AL M21167 Made in P.R.C.

Basically Tuya rebranded. The Tuya app saw the plugs.

I used the Python script https://github.com/OpenBekenIOT/hid_download_py (under Ubuntu 22.04) to upload the firmware with a ftdi TTL 3v3 cable. Soldered some jumper wires to the TX, RX and GND. With a bit of timing, got the flashing started (this took a couple of tries to get the timing down), trick was to start the python command right before the plug got power.
I was confident about my method here, but dealing with 230v this way, might not be the best for everyone. Plus, I kept my hand away from the plug itself (used a separate switch). Caution advised when dealing with mains.

All 5 bought plugs have been successfully flashed. So, a 100% success rate (very nice!).

I used to the template included in the firmware version 1.12.66 to get started:
[BK7231N][CB2S] LSC Smart Connect Plug
P6 LED 1 <- blue
P7 Btn 1
P8 LED 0 <- red (WIFILED_N)
P26 Rel 1

But, after some investigation, it was not 100% correct. The button worked, and you could trigger the relay, but something was off when playing with the channel and LED control. Perhaps another model? I was not sure if P8 was in the template, it might not be there.

I traced the PCB a bit and got to the following config (which is working great up till now):
P6 - Rel 1
p7 - Btn 1
P8 - Wifiled_N 0
P26 - LED 1

P26 == Blue LED
P8 == Red LED

Wifi LED (P8) just blinks when starting up searching for the network. Because it is negated, It'll be off by default. You can just set it to LED, to have it on all the time. I just left it like this, since I'd rather have it off by default. As you can see, the config is very similar to the template that was already in the firmware.

Hope this helps someone.

Br,

The Wrecker

Some pics:

About Author
The_Wrecker wrote 2 posts with rating 7 . Been with us since 2022 year.

Comments

p.kaczmarek2 03 Oct 2022 14:56

Thank you for your feedback. Your opinion is very valuable, we have separated your post into a standalone topic. Tuya tends to change device internals without changing the device model number, so it's... [Read more]

The_Wrecker 03 Oct 2022 22:23

Hi, p.kczmarek2, I was not aware of the change of internals under the same model, but it is indeed plausible. I think the brand of caps might've been different on some as well, but that should not be... [Read more]

p.kaczmarek2 04 Oct 2022 04:18

They can change device internals very much. I have seen cases of ESP8266 module to Beken swap without device model change. For example Zmai 90. My Zmai 90 has WB3S. I also saw WB2S to CB2S and BL0937... [Read more]

blowagie 14 Dec 2022 10:37

Hi, I also bought the LSC Power Plug but with Art. nr 2578677. I flashed it succesfully with OpenBK7231N_QIO_1.15.180 using Beken Writer v1.60. But when powering on, there is no Wifi (2.4GHz)/no... [Read more]

p.kaczmarek2 14 Dec 2022 11:13

You have flashed the firmware to offset 0x11000, which is incorrect in case of BK7231N. You have used settings for BK7231T. For BK7231N, you should flash the QIO image to the offset 0, so use: ... [Read more]

blowagie 14 Dec 2022 12:17

Thank you for your quick reply. I used python now but I'm facing another problem now.. The FW was flashing but I received Read CRC Failed after flashing. Plug seems to be dead now. Retrying to flash... [Read more]

p.kaczmarek2 14 Dec 2022 12:43

The command below (with unprotect): python uartprogram ./OpenBK7231N_QIO_1.15.140.bin --unprotect -d com15 -w --startaddr 0x0 pause Is 100% correct, I flashed many devices that way. You might... [Read more]

blowagie 14 Dec 2022 12:47

There is no AP. Ok I'll check the bootloader. FUN hahaha. I'll come back to it. Thanks a lot. [Read more]

p.kaczmarek2 14 Dec 2022 13:19

Are you 100% sure that device does not respond any more? I'd also, just to be sure, redo all connections and check again. [Read more]

blowagie 14 Dec 2022 17:27

No, Is there a way to have a console output? Are that RX2 & TX2? I've started reading the SPI flash method, that will be tough. Bart [Read more]

p.kaczmarek2 14 Dec 2022 17:32

How good are your soldering skills? Maybe if you desolder whole CB2S out of the board.... it's easy if you know soldering, just some flux, solder wire... TX2 is a debug console output. You can read... [Read more]

blowagie 14 Dec 2022 22:07

Hi, I was able to desolder the board. I took a close pic ture of the board. To my suprise I see the chip is BK7231TQN32 Bart https://obrazki.elektroda.pl/4312155300_1671052055_thumb.jpg [Read more]

nielspiersma 17 Dec 2022 19:33

@blowagie , You're not alone :). I have 20 of these babies, now all updated. It seems that Tuya is shipping incorrectly labeled PCB's. https://github.com/tuya-cloudcutter/tuya-cloudcutter/issues/210 You... [Read more]

blowagie 17 Dec 2022 20:27

Thank you for this information. In mean time I could recover the flash using SPI. I could connect to Wifi AP. In the web interface I configured my Wifi settings SSID & PWD. But now the chip is in a... [Read more]

p.kaczmarek2 17 Dec 2022 20:44

Which firmware version? [Read more]

blowagie 17 Dec 2022 20:57

I think it was OpenBK7231T_QIO_1.15.197.bin with SPI [Read more]

blowagie 18 Dec 2022 11:02

Could it be a problem with the bootloader? Other FW also don't work (UART, not SPI). [Read more]

btsimonh 18 Dec 2022 11:11

in user_main.c, comment out extended_app_waiting_for_launch() as a test, and try. (your log never sees bk_printf("\r\nMain_Init_Delay done\r\n") - so it never gets there....) seems maybe something... [Read more]

p.kaczmarek2 18 Dec 2022 12:50

@blowagie did you just restore bootloader and still have further partitions overwritten with bk7231N data, or have you restored everything from factory backup, including RF partition? [Read more]