logo elektroda
logo elektroda
X
logo elektroda

Flashing Issues with LSC Light Bulbs Model 2578539.2 Using BK7231 UART Flasher

mattistiret1 4575 35
Best answers

How can I flash an LSC light bulb model 2578539.2 with BK7231 Easy UART Flasher when it returns "bus failed"?

The fix is usually wrong wiring/pinout, not a dead chip: use the correct UART pins and do not feed 3.3 V from the adapter while flashing, because one user got this bulb working only after unplugging the 3.3 V lead during programming [#21297674] For the 2578539.2 bulb, the working OpenBeken setup used a BP5758D LED driver on pins 7 (DAT) and 8 (CLK), not the BK7231tools-detected SM2235 on 9/24 [#21431966][#21432264] The working config also used `BP5758D_Current 10 5` and `BP5758D_Map 0 1 2 3 4` [#21431966] Also, the BP57xx/I2C-style driver will not light the bulb just by setting pins HIGH; it needs a proper driver transaction, and you should reboot after each config change [#21426794]
Generated by the language model.
ADVERTISEMENT
  • #31 21431975
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14580
    Help: 654
    Rate: 12604
    So your Tuya config contains:
    Code: JSON
    Log in, to see the code

    but your device is using pins 7 and 8 in reality?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 21432264
    gehaxelt
    Level 6  
    Posts: 14
    Help: 1
    Rate: 2
    Yes, exactly! Bktool's dissect_dumps outputs pins 9/24 with the SM2235 driver, but in reality I got the bulb to work pin 7/8 with the BP5758D driver.
  • ADVERTISEMENT
  • #33 21432275
    divadiow
    Level 38  
    Posts: 5028
    Help: 438
    Rate: 891
    glad you found the right pins. There are currently 8 other devices in the devicelist with the same
  • ADVERTISEMENT
  • #34 21432855
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14580
    Help: 654
    Rate: 12604
    This is very strange. Can you do pin extraction on your device again and share created file, so we can just double-check that it has incorrect pins?
    https://www.youtube.com/watch?v=VDbaLR_0YWs
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #35 21434152
    gehaxelt
    Level 6  
    Posts: 14
    Help: 1
    Rate: 2
    Hi again,

    sure, let's debug this! The original dump can be found in >>21425425. Here are the commands I used for extraction of the config/template:

    
    $> pacman -Qi bk7231tools 
    Name            : bk7231tools
    Version         : 2.0.2-1
    
    $> bktools dissect_dump -O output -e --rbl --storage lcs-led-rgbw-lb2.img 
    RBL containers:
    	0x10f9a: bootloader - [encoding_algorithm=NONE, size=0xea20]
    		extracted to output
    	0x129f0a: app - [encoding_algorithm=NONE, size=0xec1a0]
    		extracted to output
    Storage partition:
    	0x1ee000: 28 KiB - 3 keys
    	- 'gw_bi'
    	- 'tuya_seed'
    	- 'gw_di'
    WARNING:root:Block by ID 2 does not exist, returning empty
    		extracted all keys to output/lcs-led-rgbw-lb2_storage.json
    WARNING:root:Block by ID 2 does not exist, returning empty
    		extracted 'gw_bi' to output/lcs-led-rgbw-lb2_storage_gw_bi.bin
    		extracted 'tuya_seed' to output/lcs-led-rgbw-lb2_storage_tuya_seed.bin
    		extracted 'gw_di' to output/lcs-led-rgbw-lb2_storage_gw_di.bin
    App code `user_param_key`:
    	- found! Extracted to output/lcs-led-rgbw-lb2_user_param_key.json
    	
    $> cat output/lcs-led-rgbw-lb2_user_param_key.json
    {
    	"2235ccur": 14,
    	"2235wcur": 6,
    	"Jsonver": "1.1.9",
    	"brightmax": 100,
    	"brightmin": 5,
    	"cagt": 20,
    	"category": "0505",
    	"cmod": "rgbcw",
    	"colormax": 100,
    	"colormin": 10,
    	"colorpfun": 1,
    	"crc": 72,
    	"cwmaxp": 100,
    	"cwtype": 0,
    	"defbright": 100,
    	"defcolor": "c",
    	"deftemp": 100,
    	"dmod": 8,
    	"gmkb": 60,
    	"gmkg": 60,
    	"gmkr": 80,
    	"gmwb": 75,
    	"gmwg": 70,
    	"gmwr": 100,
    	"iicb": 0,
    	"iicc": 4,
    	"iicg": 1,
    	"iicr": 2,
    	"iicscl": 24,
    	"iicsda": 9,
    	"iicw": 3,
    	"module": "CBU",
    	"notdisturb": 0,
    	"onoffmode": 1,
    	"pairt": 600,
    	"pmemory": 1,
    	"prodagain": 0,
    	"remdmode": 1,
    	"rgbt": 15,
    	"rstbr": 50,
    	"rstcor": "c",
    	"rstnum": 5,
    	"rsttemp": 100,
    	"title20": 1,
    	"wfcfg": "spcl",
    	"wfct": 10,
    	"wt": 20
    }
    	
    => Pin 24 (scl) and 9 (sda) was extracted in combination with the SM2235 driver.
    


    I've attached the "Tuya GPIO Config" obtained from the flashed OBK bulb. Trying to import that file in BK7231Flasher.exe (run with mono on Linux) throws an exception:

    
    Sorry, exception occured: System.ArgumentNullException: Buffer cannot be null.
    Parameter name: buffer
      at System.IO.MemoryStream..ctor (System.Byte[] buffer, System.Boolean writable) [0x00009] in <296872a6734f443990477e3abd954b57>:0 
      at System.IO.MemoryStream..ctor (System.Byte[] buffer) [0x00000] in <296872a6734f443990477e3abd954b57>:0 
      at (wrapper remoting-invoke-with-check) System.IO.MemoryStream..ctor(byte[])
      at BK7231Flasher.TuyaConfig.fromBytes (System.Byte[] data) [0x0013f] in <0c14a74d79404cf69fc2e40bca5b14d7>:0 
      at BK7231Flasher.TuyaConfig.fromFile (System.String fname) [0x00024] in <0c14a74d79404cf69fc2e40bca5b14d7>:0 
      at BK7231Flasher.FormMain.importTuyaConfig (System.String file) [0x00008] in <0c14a74d79404cf69fc2e40bca5b14d7>:0 
    


    But then again, the lamp works with the following configuration:

    
      "pins": {
        "7": "BP5758D_DAT;0",
        "8": "BP5758D_CLK;0"
      },
    


    Does that help?
    Attachments:
    • BK7231N_TuyaConfig_oblb6.bin (72 KB) You must be logged in to download this attachment.
  • #36 21434397
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14580
    Help: 654
    Rate: 12604
    That's interesting, it really looks like a previous version left over in the Tuya keys partition. There are no mentions of pin "8" at all. Maybe they had to change their batch at factory internally and used hardcoded pins for BP5758D while not removing old config?

    Unless we have some kind of JSON extraction bug, I don't know, maybe config partition can have it's own previous version stored as well as in the fragments...
    Helpful post? Buy me a coffee.

Topic summary

✨ The discussion addresses flashing issues with LSC Light Bulbs model 2578539.2 using the BK7231 UART flasher, where users encountered "bus failed" errors and suspected incorrect UART pin connections or lack of power to the chip. Initial attempts to flash using default pinouts (e.g., pins 9 and 24 for I²C) failed. Investigation revealed the bulb uses a BP5768 LED driver chip, differing from the BP5758 driver supported by existing esphome libraries. Successful flashing was achieved by identifying the correct UART and I²C pins (notably pins 7 and 8 for BP5758D data and clock lines) through oscilloscope measurements and pin extraction from a working bulb. Users shared configurations and importable OBK (OpenBeken) driver settings, emphasizing the need to stop old drivers, clear GPIO roles, and assign correct pin roles for BP5758D. Firmware dumps and Tuya configuration extractions showed discrepancies between documented and actual pin assignments, suggesting factory changes or legacy config remnants. Attempts to flash back original firmware using OpenBeken were discussed, with advice to reboot after config changes and verify driver operation via web UI. The community noted that some firmware versions (e.g., 1.5.2) are patched, preventing cloudcutter profile creation. Overall, the solution involved manual pin discovery, correct driver selection (BP5758D for BP5768 chip), and proper OBK configuration to enable flashing and control of the LSC 2578539.2 bulbs.
Generated by the language model.

FAQ

TL;DR: On this bulb, 2 pins mattered most: "it works like a charm" only after OpenBeken used the BP5758D driver on pins 7/8, not the extracted 9/24. This FAQ helps LSC 2578539.2 owners fix UART flashing, wrong GPIO templates, and patched-firmware roadblocks. [#21431966]

Why it matters: This thread shows that a successful flash can still fail in practice if wiring, power injection, and extracted Tuya GPIO data do not match the real hardware.

Approach What the thread found Practical result
BK7231 UART flashing Works when wiring is corrected and the adapter's 3.3V lead is removed Successful flashing reported
Tuya config extraction only Reported iicscl 24 and iicsda 9 with SM2235 Wrong for this bulb batch
OpenBeken with verified pins BP5758D, pins 7/8, map 0 1 2 3 4 Bulb worked
Tuya CloudCutter Firmware 1.5.2 / 3.3.42 listed as patched Not suitable for profile-based cloud flashing

Key insight: The biggest failure point was not the flasher itself. The real fix was verifying the live LED-driver pins on the PCB and ignoring a misleading Tuya extraction result.

Quick Facts

  • The original report involved model 2578539.2 on firmware 1.5.32, where BK7231 Easy UART Flasher returned "bus failed" during serial flashing. [#21244045]
  • One successful flashing method required disconnecting the UART adapter's 3.3V wire and not powering the bulb from the adapter at all. [#21297674]
  • A full dump analyzed with bktools dissect_dump showed a 2MB flash image, a 28 KiB storage partition, and extracted iicscl 24 / iicsda 9 from user_param_key. [#21434152]
  • The working OpenBeken template for this bulb used BK7231N/CBU, BP5758D_DAT on pin 7, BP5758D_CLK on pin 8, and BP5758D_Map 0 1 2 3 4. [#21431966]
  • Firmware 1.5.2 / 3.3.42 with build string 2023_09_05_15_44_43 was described in-thread as patched, so a Tuya CloudCutter profile was not feasible. [#21426598]

Why does the BK7231 Easy UART Flasher show a "bus failed" error when flashing an LSC Light Bulb 2578539.2 with firmware 1.5.32?

The error usually came from incorrect serial hookup rather than a dead chip. The thread started with model 2578539.2 on firmware 1.5.32 showing "bus failed," and later replies focused on wrong UART pads and power wiring as the likely cause. The final success came after correcting wiring and changing the power method, not by replacing the flasher. [#21244045]

How do I correctly wire and power an LSC 2578539.2 bulb for BK7231 UART flashing if applying 3.3V from the adapter prevents flashing?

Do not power this bulb from the UART adapter's 3.3V line if that blocks communication. One working setup kept the serial wiring but unplugged the 3.3V cable entirely, and the bulb then flashed "like a charm." That suggests the bulb's own power path was sufficient while the adapter's 3.3V injection interfered with flashing. [#21297674]

Which UART TX/RX pads are the correct ones on the LSC Smart Connect bulb model 2578539.2, and how can PCB traces help confirm them?

The first suspected UART pad was not the right one, so visual trace checking mattered. A reply pointed out that the likely TX point was U1_TX on the PCB, and the next troubleshooting step was to inspect the board's other side and follow traces to confirm which pads really reached UART1. On this bulb, trace inspection was used to challenge an incorrect initial assumption. [#21244235]

What OpenBeken configuration finally worked for the LSC Smart Connect LED bulb 2578539.2 with BK7231N and BP5768D?

The working OpenBeken setup used the BP5758D driver on pins 7 and 8, not the extracted 9 and 24. The successful command set was startDriver BP5758D, setPinRole 7 BP5758D_DAT, setPinRole 8 BP5758D_CLK, BP5758D_Current 10 5, and BP5758D_Map 0 1 2 3 4. The same post also shared an importable template for BK7231N on a CBU module. [#21431966]

How can I find the real LED driver pins on an LSC 2578539.2 bulb when Tuya config extraction reports the wrong GPIOs?

Measure the live communication lines instead of trusting the extracted JSON alone. In this thread, the extracted config reported pins 24 and 9, but a DSO138 oscilloscope showed the original firmware actually toggling pins 7 and 8. After switching OpenBeken to 7/8, the bulb worked. A continuity check can help with trace mapping, but live signal probing found the decisive answer here. [#21431966]

What's the difference between BP5758D and BP5768D LED drivers, and why does the BP5758D driver appear to work on a BP5768D bulb?

The thread did not establish a protocol difference, and that is why the BP5758D driver remained usable. One user confirmed the LED chip was BP5768D, noted that ESPHome support had been written for BP5758, and added that they "did not find the difference in i²c protocols." Later testing showed the bulb ran with OpenBeken's BP5758D driver once the real pins were found. [#21298130]

When Tuya firmware extraction shows iicscl 24 and iicsda 9, why might the bulb actually work only with pins 7 and 8 in OpenBeken?

Because the stored Tuya keys can reflect stale or misleading data for a specific hardware batch. After rechecking the dump, the thread confirmed iicscl: 24 and iicsda: 9 were extracted, yet the bulb only worked with OpenBeken on pins 7 and 8. A follow-up suggested the keys partition may have contained an older configuration that no longer matched the factory-wired board. [#21434397]

How do I use bk7231tools dissect_dump to extract Tuya user_param_key data from a full flash dump of an LSC light bulb?

Use bktools on the full dump and read the extracted user_param_key.json.
  1. Run bktools dissect_dump -O output -e --rbl --storage <dumpfile>.
  2. Check the extracted storage and user_param_key files in the output directory.
  3. Open the JSON and read fields such as module, iicscl, iicsda, and current values.
In the thread, this process parsed a 2MB image, found a 28 KiB storage partition, and produced iicscl 24 plus iicsda 9. [#21434152]

What is OpenBeken, and how is it used on BK7231N-based smart bulbs like the LSC 2578539.2?

OpenBeken is custom firmware that replaces the stock Tuya application on BK7231 devices, exposing pin roles, LED-driver selection, startup commands, and a web UI for configuration. In this thread, it was flashed onto a BK7231N bulb, then used to assign BP5758D data and clock pins, set the LED map, reboot, and test whether the RGB+CCT channels responded correctly. [#21431966]

What is Tuya CloudCutter, and why is firmware 1.5.2 / 3.3.42 considered patched and unusable for profile-based cloud flashing?

Tuya CloudCutter is a profile-based flashing method aimed at replacing certain Tuya firmwares without direct serial wiring, using known device-specific profiles and vulnerabilities. In this thread, firmware 1.5.2 / 3.3.42 BUILD AT:2023_09_05_15_44_43 was explicitly described as being on the known patched list, so a CloudCutter profile was considered impossible for that bulb. [#21426598]

How should I set up BP5758D_Map and BP5758D_Current for an LSC RGB+CCT bulb so the color channels and white channels work correctly?

Use the map that matches the actual channel order on this bulb, then reduce current if heat matters. The working setup used BP5758D_Map 0 1 2 3 4. The extracted current suggestion was 14 6, but the confirmed working post chose 10 5 for lower heat. That combination restored correct operation on the LSC RGB+CCT bulb. [#21431966]

UART flashing vs Tuya CloudCutter for LSC BK7231 bulbs — which approach makes sense when the installed firmware is patched?

UART flashing makes more sense when the installed firmware is patched. This thread explicitly states that firmware 1.5.2 / 3.3.42 is on the known patched list, so CloudCutter profile flashing was ruled out. By contrast, direct UART flashing was the path that actually produced working OpenBeken installs on this bulb family. [#21426598]

Why doesn't setting all GPIO pins HIGH in the OpenBeken web UI light up a bulb that uses an I2C-style LED driver such as BP5758D or BP5768D?

Because these drivers do not behave like simple PWM outputs. One reply states that the so-called I2C drivers will not light the LED if you set all pins HIGH, because they require a transaction that follows a specific protocol. That is why random GPIO toggling in the OpenBeken web UI did nothing, even when the bulb hardware was healthy. [#21426794]

What tools can I use to verify LED driver communication pins on a smart bulb PCB — multimeter continuity checking, a simple oscilloscope like DSO138, or something else?

Use continuity checking first, then use a simple oscilloscope if the stored config looks wrong. The thread recommended multimeter continuity testing along traces, and the final breakthrough came from a DSO138 oscilloscope that revealed the original firmware activity on pins 7 and 8. That combination was enough to beat a misleading GPIO extraction result. [#21431966]

How do I restore the original Tuya firmware to a BK7231N bulb after flashing OpenBeken, and what should I do if the chip seems to boot straight back into OBK?

Retry normal flashing entry and reboot from OpenBeken before you start. When one user thought the chip always booted straight back into OBK, the reply was that it "should just work as usual" and that a reboot can be triggered even without CEN by using the OBK restart button. In this thread, that was the recommended recovery step before reflashing the original dump. [#21428585]
Generated by the language model.
ADVERTISEMENT