logo elektroda
logo elektroda
X
logo elektroda

LN882H TNCE RGBCW WiFi LED bulb - LN882HKI flashing tutorial, UART to USB, pinout

p.kaczmarek2 1668 25
ADVERTISEMENT
  • Close-up of LED PCB with yellow diodes and markings.
    Here's step by step guide for the LN882 (LN882HKI by Lightning Semi) TY-BK-A60 LED bulb firmware change. This will let you to run the device cloud free and pair with Home Assistant. Device will be flashed with our Tasmota/Esphome inspired firmare, OpenLN882H. A simple USB to UART converted will be used for that. The programming process shown here will be fairly simple and will not require full bulb disassembly. The bulb was bought on Ali for few $, it can be sometimes even bought for as low as 1$. Let's look at the packaging:
    Packaging of the TNCE Smart E27 bulb - TCDPA601WL265 with visible product labels.
    Package of TNCE Smart E27 bulb showing product parameters.
    Packaging of the Tuya Smart LED Bulb TY-BK-A60 with product information.
    Box of TNCE Smart E27 bulb with certification labels
    TNCE Smart E27 Bulb Packaging
    TNCE Smart E27 Bulb - TCDPA601WL265
    Model: TY-BK-A60
    Manufactured: September 10, 2024
    There is also a manual inside, but we don't need it as we're going to change the firmware:
    Brochure with instructions for WiFi smart bulbs in various languages.
    and the bulb itself:
    TNCE Smart E27 LED bulb lying on technical documentation.

    Bulb teardown
    Top dome can be easily removed with some force. I managed to do it with my bare hands:
    Close-up of LED PCB with yellow diodes and markings.
    Then I had to remove the LED board. I had to pry it with screw driver, it was a bit problematic. I broke the part of the bulb edge:
    View of the interior of a TNCE Smart E27 LED bulb with the dome and LED board removed, against a background of the user manual.
    Finally, as you can see, we're getting access to the WiFi MCU:
    Interior of an opened LED bulb showing the circuit board.
    It's not a Beken chip this time, but a LN882H:
    Close-up of Lightning LN882HKI chip on a circuit board.
    LIGHTNING LN882HKI, to be precise.
    You can also see five transistors nearby, so probably bulb uses raw PWMs. No I2C LED controller there.
    Interior view of an LED bulb with a visible PCB and electronic components.
    It is also possible to glance at the power supply circuit in the back:
    Close-up of a circuit board with electronic components.
    It's a step down converter based on BP2525, just like usual. It's a very common solution in these products.
    I can also see a KP2120 (KP2120SG?) in the background, so the LED circuit might have a separate supply than a WiFi SoC.
    There are also flashing pads on the bottom of the board:
    View of the interior of a LED bulb showing the PCB and solder pads.
    P21 may sounds like a Beken pin. I think it's a left over from previous device version which might have used BK7231.



    Firmware change
    P21 is actually a LN882H boot pin. The programming UART is in the background, U0-TX and U0-RX. First add some flux and Pb solder to the pads:
    View inside an LED bulb showing a circuit board and solder pad labels.
    Then solder wires:
    Inside view of a light bulb with visible circuit board and wires.
    Follow LN882H flashing tutorial:
    https://www.elektroda.com/rtvforum/topic4028087.html
    https://www.elektroda.pl/rtvforum/topic4028087.html
    Here's my full circuit:
    Dismantled TNCE Smart E27 LED bulb with a breadboard and USB to UART adapter.
    Of course, I've also took a backup of original firmware first. It's not full 2MB because I had to interrupt read early, but it seems that data past 1MB mark is just full of 0xFF:
    https://github.com/openshwprojects/FlashDumps/commit/5e7d1bf6dac8c79dc68b34dfd6e781d435bfce42

    Initial setup
    Just like with Tasmota - disconnect boot pin, do power off/on, connect to LN822H access point:
    Notification for connecting to OpenLN882H network.
    Configure your WiFi:
    Screenshot of WiFi setup interface for OpenLN882H
    Get new device IP from DHCP:
    DHCP client list showing LN882H_STA device with assigned IP address.
    Then you need to figure out the GPIO roles. We don't have yet GPIO extraction for this platform, so I used the GPIO Doctor tool from the Web App.
    GPIO Doctor Pins interface
    Once you guess the pins with Doctor, you can set them to PWMs in Configure Module menu:
    Screenshot of GPIO settings, showing PWM configuration for A1 and A4.
    At first I got CW working:
    This is how CW controls look like:
    Screenshot of OpenLN882H interface with LED brightness and temperature slider.
    CW seems to work good:
    Illuminated TNCE Smart E27 - TCDPA601WL265 bulb lying on a wooden surface.
    Lit LED bulb placed on a wooden surface.
    Later I found RGB pins, so RGBCW is fully working now.
    LED bulb emitting purple light
    LED bulb glowing blue.
    RGBCW configuration:
    Code: JSON
    Log in, to see the code


    Summary
    Flashing process was easy and didn't require full disassembly of the bulb. I have managed to reach the pads with my soldering iron and I didn't have to remove the thread. I also guessed the meaning of pad markings - U0 is used for flashing and P21 is infact the LN882 boot pin. I also managed to guess the GPIO roles with GPIO Doctor, so full RGBCW is working now.
    Device can be now paired with Home Assistant, just like in our tutorial.
    Let us know if you have also encountered any LN882H devices already. We can help you with flashing and HA setup.
    PS: Special thanks to @divadiow for helping me to get this bulb. I've ordered another already, this time E14 thread, we will see if it will be also LN-based...

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 11793 posts with rating 9913, helped 563 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21447286
    John Yossarian
    Level 10  
    And would it go via OTA, Tuya-convert + tasmot?
  • #3 21447295
    p.kaczmarek2
    Moderator Smart Home
    Unfortunately no. It only goes on devices with ESP and, in addition, most new devices are protected.

    The LN882HKI is a completely different MCU. We specifically wrote HAL for it to port firmware to it. OpenLN882H (OpenBK port) is in the style of Tasmota and supports some of the Tasmota commands, but it is a completely different code, although the idea is the same.

    You'll either have to work with cables as shown in the topic, or alternatively, you can communicate somehow on PW, I sometimes upload batch to devices on request to users.
    Helpful post? Buy me a coffee.
  • #4 21447319
    John Yossarian
    Level 10  
    >>21447295 Thanks for the reply. I haven't tried flashing yet, for now I'm gathering info:) I have a couple of these toys, but they are in daily use. Just planning to buy something to play with, with different BK circuits, esp. Well, but this tutorial for LN looks really encouraging:) .
    Thanks, pzdr
  • #5 21447336
    p.kaczmarek2
    Moderator Smart Home
    Well, two comments I have.
    First, you're not sure if you're going to get something on LN882H, or BK7231, or BL602, or W800, so don't assume that in advance. But anyway, OpenBK/OpenLN supports most of the now popular platforms from Aliexpress so no problem....
    Secondly, you also have flashing tutorials here, also for the BL602: https://www.youtube.com/playlist?list=PLzbXEc2ebpH0CZDbczAXT94BuSGrd_GoM

    Just order some product you're interested in, don't set your mind to what SoC will be inside, and then make a topic on the forum and we'll help you step by step to reflash. As if I missed the topic, send me the link to the topic on PW. Only please don't ask me questions on PW - we provide help on the forum.
    Helpful post? Buy me a coffee.
  • #6 21447351
    John Yossarian
    Level 10  
    >>21447336 Well, yes, that's true. I don't have the certainty. Once I have something to play with, I'll only wonder. And I will report back on the successes:) .
  • ADVERTISEMENT
  • #7 21450387
    p.kaczmarek2
    Moderator Smart Home
    I've just ordered more leds myself for testing, we'll see what arrives:
    Advertisement for a smart LED Tuya bulb with Wi-Fi and voice assistant support. .
    I am now awaiting the three packs:
    A list of orders for three smart LED bulbs from different online stores. .
    Helpful post? Buy me a coffee.
  • #8 21456397
    p.kaczmarek2
    Moderator Smart Home
    A package has arrived with this one:
    Image of Ewelink E14 WiFi Zigbee smart LED bulb with color-changing feature. .
    It turned out to be based on the BL602 - BW2L module . I am working on it. It is possible to upload OpenBL602.

    I have ordered another one:
    Image of a GU10 LED Tuya WiFi smart bulb with intelligent control features. .
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #9 21457908
    p.kaczmarek2
    Moderator Smart Home
    It came with:
    ZigBee Tuya WiFi LED bulb with a smartphone app. .
    CB2L.
    Close-up of an LED bulb with an integrated circuit labeled CB2L, with a product packaging label for TY-A60-18W-220V in the background. .

    Added after 10 [minutes]: .

    Ordering another one:
    Ad for Tuya Smart WiFi LED bulbs with RGB color-changing feature. https://www.aliexpress.com/item/1005007254996218.html
    Helpful post? Buy me a coffee.
  • #11 21459590
    p.kaczmarek2
    Moderator Smart Home
    Zigbee it will run right away, no need to flash, but as if you want to experiment it is also possible to dump and upload the memory:
    How to read and back up the flash memory of a BL602/BL702/etc device using BLDevCube? .

    In the meantime I have completed the eWeLink E14 with BW2L and BL602, it is flashable but I had to desolder the module because the programming pads are on the bottom of the BW2L.
    Helpful post? Buy me a coffee.
  • #12 21461233
    p.kaczmarek2
    Moderator Smart Home
    I flashed this (18W version):
    Image depicting the purchase and programming of a ZigBee Tuya WiFi 18W smart bulb and a CB2L electronic board. .
    Unfortunately the CB2L programming pad is on the bottom. I had to solder it out. Problematic copy.

    I ordered one today:
    Advertisement for COOLO EWeLink WiFi Zigbee smart LED light bulbs, 15W and 18W. .
    15W eWeLink WiFi COOLO.
    Helpful post? Buy me a coffee.
  • #13 21463754
    p.kaczmarek2
    Moderator Smart Home
    The E14 led mentioned earlier in this topic from eWeLink turned out to use BL602. Today I also ordered an E14, but not from eWeLink, but from Tuya, to see if it would also be a BL602 or perhaps further BK7231.
    Colorful E14 Tuya LED bulb with WiFi and Zigbee features. .
    Helpful post? Buy me a coffee.
  • #14 21468442
    p.kaczmarek2
    Moderator Smart Home
    p.kaczmarek2 wrote:
    .
    Received - 2025.03.06 There is an LN882H with BP5758 inside (not PWM!). KA0600152-ibbd
    Helpful post? Buy me a coffee.
  • #15 21468963
    divadiow
    Level 34  
    p.kaczmarek2 wrote:
    The E14 led mentioned earlier in this topic from eWeLink turned out to use BL602

    Assuming eWeLink-C3009-EW-E14-BWL2-bulb-20250225.bin is from this bulb:

    Code: Text
    Log in, to see the code


    In eWeLink app:
    FW Name: CK-BL602-5PWM-01
    Screenshot showing device information with the name Light and current firmware version 1.1.1, offering an update to 1.5.0.

    Offers update to 1.5.0
    eWeLink firmware update screen with instructions.

    which is downloaded from http://52.57.99.135:8088/ota/rom/UOqtau8qtAt8...1024.new.2.bin?deviceid=xxxxxxxxxxxxxxxxxxxxx
    (deviceID removed)

    After update the boot log is more verbose. Recently built.

    Code: Text
    Log in, to see the code
  • #16 21469247
    p.kaczmarek2
    Moderator Smart Home
    @divadiow the Matter bulb also arrived:
    Smart LED bulb packaging with Matter technology.
    LED board with ESP8266 module.
    Close-up of an electronic board with an ESP8266-WROOM-05 module and LED lights.
    Image of an LED bulb held in hands with a QR code and serial number.
    ESP8684-WROOM-05, I didn't research it yet. I hope it's not flash-protected?

    Added after 44 [seconds]:

    Found this: ESP8684 is the new nomenclature for ESP32-C3 based modules
    Helpful post? Buy me a coffee.
  • #17 21469251
    divadiow
    Level 34  
    ooh. I hope it isn't too, but I have a small pile of ESP Matter devices that are :(
  • ADVERTISEMENT
  • #18 21469307
    p.kaczmarek2
    Moderator Smart Home
    Do you know the debug log output baud rate for this module?
    Helpful post? Buy me a coffee.
  • #20 21469327
    p.kaczmarek2
    Moderator Smart Home
    Normal mode:
    
    ESP-ROM:esp8684-api2-20220127
    Build:Jan 27 2022
    rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
    SPIWP:0xee
    mode:DIO, clock div:1
    Valid secure boot key blocks: 0
    ECDSA ESP-ROM:esp8684-api2-20220127
    Build:Jan 27 2022
    rst:0xf (BROWNOUT_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
    SPIWP:0xee
    mode:DIO, clock div:1
    Valid secure boot key blocks: 0
    ECDSA secure boot verification succeeded
    load:0x3fcd5d78,len:0x203c
    load:0x403acb70,len:0x6bc
    load:0x403aeb70,len:0x485c
    load:0x403ba000,len:0x2068
    entry 0x403acb70
    W (178) boot: custom bootloader with compress ota!
    ECDSA zero_code_product: enter main: 523 ms
    
    zero_code_product: Current Free Memory: 122100, Minimum Ever Free Size: 122088, Largest Free Block: 112640
    zero_code_core: Signature verification successful
    E (1125) factory_reset: Reboot count: 1, reset reason: 15
    light_matter: restore done: 868 ms
    
    E (1227) wifi:failed to post WiFi event=2 ret=259
    E (4036) wifi:failed to post WiFi event=1 ret=259
    E (4131) wifi:failed to post WiFi event=3 ret=259
    zero_code_core: Current Free Memory: 86080, Minimum Ever Free Size: 58644, Largest Free Block: 59392
    controller lib commit: [77e7dbb]
    controller rom commit: [3314f9d]
    chan:1,max_power:80
    chan:2,max_power:80
    chan:3,max_power:80
    chan:4,max_power:80
    chan:5,max_power:80
    chan:6,max_power:80
    chan:7,max_power:80
    chan:8,max_power:80
    chan:9,max_power:80
    chan:10,max_power:80
    chan:11,max_power:80
    chan:12,max_power:80
    chan:13,max_power:80
    chan:14,max_power:80
    E (4773) chip[ZCL]: Duplicate attribute override registration failed
    matter_one_core: Current Free Memory: 13108, Minimum Ever Free Size: 13108, Largest Free Block: 9984
    matter_one_core: Current Free Memory: 13108, Minimum Ever Free Size: 13108, Largest Free Block: 9984
    matter_one_core: Current Free Memory: 13108, Minimum Ever Free Size: 13084, Largest Free Block: 9984
    matter_one_core: Current Free Memory: 13108, Minimum Ever Free Size: 13084, Largest Free Block: 9984
    matter_one_core: Current Free Memory: 13108, Minimum Ever Free Size: 13084, Largest Free Block: 9984
    matter_one_core: Current Free Memory: 13096, Minimum Ever Free Size: 11576, Largest Free Block: 9984
    chan:1,max_power:80
    chan:2,max_power:80
    chan:3,max_power:80
    chan:4,max_power:80
    chan:5,max_power:80
    chan:6,max_power:80
    chan:7,max_power:80
    chan:8,max_power:80
    chan:9,max_power:80
    chan:10,max_power:80
    chan:11,max_power:80
    chan:12,max_power:80
    chan:13,max_power:80
    chan:14,max_power:80
    matter_one_core: Current Free Memory: 13096, Minimum Ever Free Size: 11576, Largest Free Block: 9984
    matter_one_core: Current Free Memory: 13056, Minimum Ever Free Size: 11576, Largest Free Block: 9984
    matter_one_core: Current Free Memory: 13056, Minimum Ever Free Size: 11576, Largest Free Block: 9984
    matter_one_core: Current Free Memory: 13056, Minimum Ever Free Size: 11576, Largest Free Block: 9984
    zero_code_core: Current Free Memory: 23864, Minimum Ever Free Size: 10668, Largest Free Block: 13056
    zero_code_product: Current Free Memory: 23864, Minimum Ever Free Size: 10668, Largest Free Block: 13056
    factory_reset: Current Free Memory: 27412, Minimum Ever Free Size: 10668, Largest Free Block: 13056
    factory_reset: Current Free Memory: 27412, Minimum Ever Free Size: 10668, Largest Free Block: 13056
    
    


    Boot mode:
     
    ESP-ROM:esp8684-api2-20220127                    
    Build:Jan 27 2022                                                
    rst:0x3 (RTC_SW_SYS_RST),boot:0x4 (DOWNLOAD(UART0))            
    Saved PC:0x40054770                                      
    Download boot modes disabled
    
    Helpful post? Buy me a coffee.
  • #22 21469421
    p.kaczmarek2
    Moderator Smart Home
    Well, it seems I don't have much options. Buying a replacement module would cost too much, maybe at most I could try to botch there WB2S that I received from a reader... but it's not pin to pin compatible...
    Helpful post? Buy me a coffee.
  • #23 21469470
    divadiow
    Level 34  
    yeh, ESP Matter devices aren't often much fun it seems
  • #24 21469723
    p.kaczmarek2
    Moderator Smart Home
    Is there a way to tell whether Matter device is using ESP or BK from the outside? Before buying...
    Helpful post? Buy me a coffee.
  • #25 21469802
    divadiow
    Level 34  
    hmm. I thought I had a kind of pattern to it. Moes can sometimes be ESP. The CozyLife /Aiyatto stuff has been a good bet so far

    https://www.elektroda.com/rtvforum/topic4081005.html
    https://www.elektroda.com/rtvforum/topic4075524.html
    https://www.elektroda.com/rtvforum/topic4077326.html

    I had a feeling that the homekit stuff were less likely to be ESP, but I don't know what I'm basing that on. As for labelling... I don't think so.
  • #26 21473843
    p.kaczmarek2
    Moderator Smart Home
    Two bulbs arrived today.
    - Smart Life/Tuya Smart TY-E14-220VB*AT 5W
    Advertisement for a smart RGB LED bulb with WiFi and Bluetooth features.
    https://pl.aliexpress.com/item/1005007654887555.html
    Box of a smart bulb model C3009.
    Open LED light showing diodes and an electronic component.
    Electronic circuit inside a device with yellow insulation.
    LN882H

    - COOLO eWeLink - EW-A60-15W
    Advertisement promoting Zigbee WiFi smart LED bulbs.
    https://www.aliexpress.com/item/1005006412570573.html
    It's BW2L as well
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around flashing the LN882H TNCE RGBCW WiFi LED bulb (LN882HKI by Lightning Semi) with custom firmware, OpenLN882H, to enable cloud-free operation and integration with Home Assistant. Users share insights on the flashing process, which requires a USB to UART converter and does not necessitate disassembling the bulb. The conversation also touches on the challenges of OTA flashing due to MCU differences, with users discussing various models and their compatibility with different firmware. Several users report on their experiences with other LED bulbs, including those based on BL602 and BL702 microcontrollers, and share links to additional flashing tutorials and resources.
Summary generated by the language model.
ADVERTISEMENT