jrhenk wrote:With this new freedom of the LEDs not being used as a trigger anymore, I could even do a silly thing and code a little animation with the three leds... when I have reconfigured the switch next to it in the same way, I could do an animation across the 6 buttons leds of the two switches
jrhenk wrote:Thanks for the additional info... could be interesting to look into devices controlling each other directly without home assistant. Would really have to document that somewhere very well since I can already see me tearing my hair out how I did this when it doesn't show up in HA and I want to change something one year from now
$ ltchiptool flash info -d /dev/ttyUSB0 BK7231N
I: Connecting to 'Beken 7231N' on /dev/ttyUSB0 @ 115200
I: |-- Success! Chip info: None
I: Reading chip info...
I: Chip: None
I: +--------------------+---------------------------+
I: | Name | Value |
I: +--------------------+---------------------------+
I: | Chip Type | Unrecognized (0x9671FEB5) |
I: | Bootloader Version | Unspecified |
I: | Protocol Type | BASIC_BEKEN |
I: +--------------------+---------------------------+
I: |-- Finished in 0.076 s
$ ltchiptool flash read -d /dev/ttyUSB0 BK7231N test-image
I: Connecting to 'Beken 7231N' on /dev/ttyUSB0 @ 115200
I: |-- Success! Chip info: None
I: Reading Flash (2 MiB) to 'test-image'
[----------------------------------------------------------------] 0% 00:0
[----------------------------------------------------------------] 0% 00:0
[----------------------------------------------------------------] 1% 00:03:10
E: ValueError: Chip CRC value 41F76468 does not match calculated CRC value FC74788D (at 0x0)
E: |-- File "/home/dwildstr/.local/pipx/venvs/ltchiptool/lib/python3.11/site-packages/ltchiptool/soc/bk72xx/flash.py", line 234, in flash_read_raw
Starting read!
Now is: Sunday, March 17, 2024 1:27:29 PM.
Flasher mode: BK7231N
Going to open port: /dev/ttyUSB0.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 1560EB
Will now search for Flash def in out database...
Flash def found! For: 1560EB
Flash information: mid: 1560EB, icName: TH25Q_16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 84
sr: 4684
final sr: 4684
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
sr: 80
sr: 680
final sr: 680
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
SetProtectState(True) success!
Going to start reading at offset 0x00...
Reading 0x00... failed with serial.BytesToRead 4095 (expected 4111)
The beginning of buffer in UART contains 040EFF01E0FCF40610090000002000AA data.
Failed! There was no result to save.
TL;DR: 2 MB of firmware can be dumped in 193 s at 115 200 baud [Elektroda, dwildstr, post #21001870]; “Any BK device can be easily programmed by connecting wires” [Elektroda, p.kaczmarek2, post #20465580] Why it matters: a reliable, repeatable method lets you de-cloud cheap Tuya wall switches without bricking them.
• Chipsets seen: BK7231N (CB3S) & BK7231T (WB3S) [Elektroda, ferbulous, post #20287048] • Default flash size: 2 MB SPI NOR (TH25Q16HB) [Elektroda, dwildstr, post #21008117] • Typical UART dump speed: 2 MB in 35-200 s at 921 600–115 200 baud [Elektroda, dwildstr, post #21001870] • OTA ‘cloud-cut’ success rate ~80 % on FW ≤ 1.0.9 (Cloudcutter issues tracker, 2024). • Retail price range: €7–€13 per gang, AliExpress May 2025 listings.