logo elektroda
logo elektroda
X
logo elektroda

[LN882HKI] Tuya Smart Light disassembly and seek some help to set it up

gregmarfaing 6246 63
ADVERTISEMENT
  • #31 21010280
    divadiow
    Level 35  
    thanks. WEMO and Hue seem OK starting though not yet tested.

    Screenshot of an LED light control interface with sliders for brightness, RGB color, and temperature, along with diagnostic data.

    build failed though, some GH rate limit?

    Code: Text
    Log in, to see the code
  • ADVERTISEMENT
  • #32 21010588
    gregmarfaing
    Level 6  
    >>21009643
    Thank you so much for this update!
    I bought another bulb and was able to get the good mapping with this "LED_Map 3 4 2 0 1"
  • ADVERTISEMENT
  • #33 21010611
    divadiow
    Level 35  
    gregmarfaing wrote:
    "LED_Map 3 4 2 0 1"


    ah yes, well done. that's it.

    I think I need to limit brightness maximum because, I don't know about you, but the CPU temp did hit 100 degrees C on mine and the chip hung.

    Added after 13 [minutes]:

    also. Other BP5758Ds I've seen have seem to mention the mA used by each channel, so maybe Tuya OS limits to certain brightness.

    eg the Eveready GU10 in here https://www.elektroda.com/rtvforum/topic4040714.html is

    Code: Text
    Log in, to see the code
  • #34 21011023
    gregmarfaing
    Level 6  

    Same here,
    for now i use 50% of brightness as the CPU stays at ~79-80.5°C (RGB and cold/warm) but I'd like to know if it's too much or not as I got 4 of these (Laxihub branded from Ali) and they go up to 76°C with 100% of brightness (only with CW not RGB)
  • #35 21011040
    divadiow
    Level 35  
    Hmm. Dunno. I'd be happier if it stayed under 90 when switched on. At the moment mine is 60, off, and with the cap removed. LED disc is also not sealed in as it was from factory.

    Though, temperature column in the datasheet says -40 - 105⁰C

    I'll look around the forums for evidence of changing maximum of brightness slider
  • #36 21011047
    p.kaczmarek2
    Moderator Smart Home
    Have you guys tried BP5758D_Current command?
    Helpful post? Buy me a coffee.
  • #37 21011070
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    Have you guys tried BP5758D_Current command?


    ha! no!

    I'm trying this at full brightness to see what temps I get

    Code: Text
    Log in, to see the code


    Added after 4 [minutes]:

    I wish I knew how to decrypt user param key bit to see the power rating of LEDs in the LN FW dump

    Added after 11 [minutes]:

    not sure we can believe it anyway. it jumps about past a certain point

    Screenshot showing an internal temperature of 121.1°C. Internal temperature: 203.0°C Internal temperature is 183.3°C.
  • #38 21011100
    gregmarfaing
    Level 6  

    p.kaczmarek2 wrote:
    Have you guys tried BP5758D_Current command?

    didn't know this, thanks!
    pretty satisfied with BP5758D_Current 3 3, i get the same temp as before with both RGB and CW at full brightness

    Been up for 15 minutes and still the same, 63°C when it's off
  • ADVERTISEMENT
  • Helpful post
    #39 21014504
    p.kaczmarek2
    Moderator Smart Home
    divadiow wrote:

    Screenshot showing an internal temperature of 121.1°C. Internal temperature: 203.0°C Internal temperature is 183.3°C.

    Those internal temperature sensors seem very unreliable to me as well. I am not sure if we can do much about it.

    gregmarfaing wrote:

    p.kaczmarek2 wrote:
    Have you guys tried BP5758D_Current command?

    didn't know this, thanks!

    Always check our docs, you can find a lot of usefull things there:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    Helpful post? Buy me a coffee.
  • #40 21015497
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    Those internal temperature sensors seem very unreliable to me as well. I am not sure if we can do much about it.


    no. im not sure this bulb is very well really. it doesn't stay up long before rebooting. I don't know if this is a temperature issue or something else. Is yours stable @gregmarfaing ?
  • #41 21015541
    p.kaczmarek2
    Moderator Smart Home
    @divadiow are other LN882H devices on your side stable?
    Helpful post? Buy me a coffee.
  • #42 21015553
    divadiow
    Level 35  
    Yes. Seem to be. I have an RMW002 on all night tonight measuring powersave 0 so will check up-time in the morning.

    I could setup 3 or 4 LN-02/RMW002s for a few days to see if they stay up
  • #43 21015569
    gregmarfaing
    Level 6  

    divadiow wrote:
    p.kaczmarek2 wrote:
    Those internal temperature sensors seem very unreliable to me as well. I am not sure if we can do much about it.


    no. im not sure this bulb is very well really. it doesn't stay up long before rebooting. I don't know if this is a temperature issue or something else. Is yours stable @gregmarfaing ?

    with some time and temp/stability measurements I can say that with [code:1:29b21b0196]BP5758D_Current 2 2 [/code:29b21b0196] I get 80°C and no reboot/freeze (even after 2h turned on ) , except with mqtt with frequent disconnection when the devices is used with something heavier than just switching it on/off , in my case it's a rgb loop from HA .
    It could be a temperature issue as the device seems to be pretty responsive when it's off
    Display of device technical data, including internal temperature and MQTT status.
    and @p.kaczmarek2 thanks again, with the docs I was able to get another rgb bulb with a BP1658 at the good brightness as it was really weak before and I didn't know how to solve this
  • #44 21015679
    divadiow
    Level 35  
    divadiow wrote:
    Yes. Seem to be. I have an RMW002 on all night tonight measuring powersave 0 so will check up-time in the morning.

    I could setup 3 or 4 LN-02/RMW002s for a few days to see if they stay up


    OK so far
    Interface displaying internal temperature, WiFi status, and configuration options.
  • #45 21264807
    davidezborges
    Level 6  
    hi everyone, i leave here the boot log from my device. im trying to dump the firmware but i wasnt able to run properly the tool.
    any leads will be accepted. tried both windows and linux but the tool refused to run and i rather have a backup in case something breaks.
    i can sbmit some pictures if needed.





    bootloader build time: 13:48:19
    config item not found perip_param value
    -- tuya project compile time: Jul 24 2023 10:07:45--
    ble mac[9b:67:42:d7:3c:fc]
    [BLIB_I]BLIB Ver: 1.0.3 [build time:Jan 19 2023 12:14:45][0x010003ff]
    xTaskCreate, name: rw_task, priority: 9, stack size: 2048
    xTaskCreate, name: worker, priority: 2, stack size: 1536
    xTaskCreate, name: ty_main, priority: 3, stack size: 4096
    xTaskCreate, name: IDLE, priority: 0, stack size: 1024
    xTaskCreate, name: Tmr Svc, priority: 10, stack size: 2048
    Before enter tuya_main, Total:164292; Free:151952
    GPIOA_9 high level, will enter Normal mode!
    Failed to enter ate mode! Start tuya user main.
    xTaskCreate, name: tuya_app_main, priority: 4, stack size: 4096
    xTaskCreate, name: TUYA_TCPIP, priority: 9, stack size: 2048
    tkl_ethernetif_init
    tkl_ethernetif_init
    [01-01 00:00:00 ty I][lr:0x100c8f0f] mqc app init ...
    xTaskCreate, name: wq_system, priority: 3, stack size: 5120
    [01-01 00:00:00 ty I][tal_thread.c:184] thread_create name:wq_system,stackDepth:5120,totalstackDepth:7168,priority:3
    xTaskCreate, name: wq_highpri, priority: 4, stack size: 4096
    [01-01 00:00:00 ty I][tal_thread.c:184] thread_create name:wq_highpri,stackDepth:4096,totalstackDepth:11264,priority:4
    xTaskCreate, name: sys_timer, priority: 5, stack s[01-01 00:00:00 ty D][tal_thread.c:203] Thread:wq_highpri Exec Start. Set to Runningize: 4096
     Stat
    [01-01 00:00:00 ty D][tal_thread.c:203] Thread:sys_timer Exec Start. Set to Running Stat
    [01-01 00:00:00 ty I][tal_thread.c:184] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:15360,priority:5
    [01-01 00:00:00 ty E][bp5758d.c:263] ===== bp5758d_init ->ucNumber 5 , total_out_index 10 ======
    
    [01-01 00:00:00 ty N][lr:0x10077a13] reset is 0>>
    xTaskCreate, name: thread_shade, priority: 5, stack size: 2048
    [01-01 00:00:00 ty N][lr:0x10088c7f] ble serv not closed, forbid open!
    [01-01 00:00:00 ty N][lr:0x10077395] BleSwitch=1
    [01-01 00:00:00 ty N][lr:0x10077a13] reset is 0>>
    [01-01 00:00:00 ty N][lr:0x100773b3] first bright up
    [01-01 00:00:00 ty N][lr:0x10077a13] reset is 0>>
    [01-01 00:00:00 ty N][lr:0x100bff73] key_addr: 0x1ec000   block_sz 4096
    [01-01 00:00:00 ty N][lr:0x100c024d] get key:
    0x49 0x53 0xa9 0x2d 0x51 0x6b 0x7 0xdc 0x2b 0x78 0xc7 0x47 0xc6 0x4a 0xb8 0x5a 
    [01-01 00:00:00 ty N][lr:0x10083e19] uni_random_init...
    [01-01 00:00:00 ty N][lr:0x100840bd] tuya_tls_rand_init ok!
    ----- tkl_watchdog_init
    wdg shift_left_num:0x10, set num:65535, top:0x0d
    xTaskCreate, name: health_monitor, priority: 5, stack size: 1536
    tkl_cpu_sleep_mode_set 95 1 0
    tkl_cpu_sleep_mode_set 95 0 0
    tkl_wifi_set_lp_mode 1566, en 0, dtim 0
    [01-01 00:00:00 ty E][tal_wifi.c:714] tal_wifi_lp_dis: set wifi lp mode fail(-26880)
    set work mode 2, is open 0, current ln mode: 0
    wifi not start, turn on first
    adapt wifi start <m:2>, hw_ready:0
    start rf preprocess and image cal
    [WLIB_E]idx=00, iq_hex_cal=0x7A7D, i=122, q=125, iavg= 51, qavg=  6
    [WLIB_E]idx=01, iq_hex_cal=0x767B, i=118, q=123, iavg= 60, qavg= 23
    [WLIB_E]idx=02, iq_hex_cal=0x6F79, i=111, q=121, iavg= 14, qavg=  4
    [WLIB_E]idx=03, iq_hex_cal=0x6378, i= 99, q=120, iavg= 27, qavg= 77
    [WLIB_E]idx=04, iq_hex_cal=0x537B, i= 83, q=123, iavg= 57, qavg= 19
    [WLIB_E]idx=05, iq_hex_cal=0x7A7D, i=122, q=125, iavg= 39, qavg= 15
    [WLIB_E]idx=06, iq_hex_cal=0x767B, i=118, q=123, iavg= 31, qavg= 29
    [WLIB_E]idx=07, iq_hex_cal=0x6F79, i=111, q=121, iavg= 69, qavg= 18
    [WLIB_E]idx=08, iq_hex_cal=0x6478, i=100, q=120, iavg= 29, qavg= 68
    [WLIB_E]idx=09, iq_hex_cal=0x567B, i= 86, q=123, iavg= 36, qavg=  5
    [WLIB_E]idx=10, iq_hex_cal=0x7A7D, i=122, q=125, iavg= 35, qavg= 15
    [WLIB_E]idx=11, iq_hex_cal=0x767B, i=118, q=123, iavg= 23, qavg= 34
    [WLIB_E]idx=12, iq_hex_cal=0x6F79, i=111, q=121, iavg= 66, qavg= 15
    [WLIB_E]idx=13, iq_hex_cal=0x6478, i=100, q=120, iavg= 26, qavg= 64
    [WLIB_E]idx=14, iq_hex_cal=0x567B, i= 86, q=123, iavg= 29, qavg= 31
    [WLIB_E]idx=15, iq_hex_cal=0x7A7D, i=122, q=125, iavg= 35, qavg= 11
    [WLIB_E]idx=16, iq_hex_cal=0x767B, i=118, q=123, iavg= 15, qavg= 22
    [WLIB_E]idx=17, iq_hex_cal=0x6F79, i=111, q=121, iavg= 63, qavg= 12
    [WLIB_E]idx=18, iq_hex_cal=0x6477, i=100, q=119, iavg= 18, qavg= 71
    [WLIB_E]idx=19, iq_hex_cal=0x567A, i= 86, q=122, iavg= 19, qavg=  2
    [WLIB_E]idx=20, iq_hex_cal=0x797D, i=121, q=125, iavg= 21, qavg= 67
    [WLIB_E]idx=21, iq_hex_cal=0x747C, i=116, q=124, iavg= 26, qavg= 15
    [WLIB_E]idx=22, iq_hex_cal=0x6C7B, i=108, q=123, iavg= 44, qavg= 22
    [WLIB_E]idx=23, iq_hex_cal=0x5E7B, i= 94, q=123, iavg= 13, qavg= 13
    [WLIB_E]idx=24, iq_hex_cal=0x4B7F, i= 75, q=127, iavg= 25, qavg= 73
    xTaskCreate, name: wifi_cfg, priority: 5, stack size: 2048
    xTaskCreate, name: mac_task, priority: 9, stack size: 2048
    [WLIB_I]cap_comp = 2, xtal_capbank_tab:[0]:42 [1]:37 [2]:37 [3]:37 [4]:52 [5]:72 [6]:72 [7]:72 
    [WLIB_I][original]phy_tab_1f:0x56, phy_tab_20:0x3C
    [WLIB_I][efuse]phy_tab_1f:0x62, phy_tab_20:0x48
    [WLIB_I][flash]phy_tab_1f:0x62, phy_tab_20:0x48, tx_pwr_comp_all=0, tx_pwr_comp_b=0, tx_pwr_comp_gn=0
    [WLIB_I]==>temp_sect:2,phy_tab_1f:0x62,phy_tab_20:0x48
    [WLIB_I]<==temp_sect:2,phy_tab_1f:0x62,phy_tab_20:0x48
    XTAL CAP VAL:2.
    wifi stop
    wifi sta start
    [WLIB_I]LN882H WiFi Lib Ver: 1.1.3 [build time:Apr 24 2023 15:10:58][0x010103ff]
    [WLIB_I]STA_Startup.
    STA startup!
    [WLIB_I]Disconnected.
    [WLIB_I]HwInd:UKI:0
    [WLIB_I]Disconnected.
    current work mode 0
    No need to switch mode, mode:0
    [tkl_wifi_station_fast_connect:1602] ssid: Meh pwd: babyyoda123 pwd len: 11, channel: 6
    [WLIB_I]Disconnected.
    [tkl_wifi_get_mac:1229] if: 0, mac: fc:3c:d7:42:67:9a
    ble_mac: 9b:67:42:d7:3c:fc
    [WLIB_I]LN882H WiFi Lib Ver: 1.1.3 [build time:Apr 24 2023 15:10:58][0x010103ff]
    [WLIB_I]STA_Startup.
    STA startup!
    [WLIB_I]Disconnected.
    [WLIB_I]HwInd:UKI:0
    [WLIB_I]Disconnected.
    [WLIB_I]will scan on ch:6
    [WLIB_I]Disconnected.
    [01-01 00:00:01 ty N][lr:0x100[WLIB_I]will connect...
    [WLIB_I]Disconnected.
    8676d] have actived over 15 min, not enter mf_init
    [01-01 00:00:01 ty N][lr:0x1006bbd5] mf_init succ
    [01-01 00:00:01 ty N][lr:0x100786f5] < TuyaOS V:3.5.4 BS:40.00_PT:2.3_LAN:3.5_CAD:1.0.5_CD:1.0.0 >
    < BUILD AT:2023_01_09_16_12_01 BY ci_manage FOR tuyaos-iot AT ln882h >
    IOT DEFS < WIFI_GW:1 DEBUG:1 KV_FILE:0 LITTLE_END:1 SL:0 OPERATING_SYSTEM:98 RELIABLE_TRANSFER:0 >
    
    [01-01 00:00:01 ty N][lr:0x100786ff] xj_QP_IIC9b:1.0.3
    [01-01 00:00:01 ty N][lr:0x100787c7] connect mode is 5
    [01-01 00:00:01 ty E][lr:0x100d3d9d] uf_open 2 err 8
    [01-01 00:00:01 ty E][soc_flash.c:77] uf file 2 can't open and read
    [01-01 00:00:01 ty E][user_flash.c:211] Prod data read err
    [01-01 00:00:01 ty E][lr:0x100d3d9d] uf_open 2 err 8
    [01-01 00:00:01 ty E][soc_flash.c:77] uf file 2 can't open and read
    [01-01 00:00:01 ty E][user_flash.c:211] Prod data read err
    [01-01 00:00:01 ty N][lr:0x1006bbf9] prodtest find ssid: tuya_mdev_test1
    [01-01 00:00:01 ty N][lr:0x10084d2d] have actived over 15 min, not enter mf_init
    [01-01 00:00:01 ty N][lr:0x100a76c3] wifi soc init. pid:keyd8s85qd3rwn4a firmwarekey:keyd8s85qd3rwn4a ver:1.0.3
    [01-01 00:00:01 ty N][lr:0x100aae05] start wifi link params validate, nc_tp:9 md:3
    [01-01 00:00:01 ty N][lr:0x100aae8d] gw_wsm.nc_tp:9
    [01-01 00:00:01 ty N][lr:0x100aae97] gw_wsm.md:3
    [01-01 00:00:01 ty N][lr:0x10098f59] Last reset reason: 0
    [01-01 00:00:01 ty N][lr:0x10098fe9] gw_cntl->gw_wsm.stat:2
    [01-01 00:00:01 ty N][lr:0x10099083] gw_cntl->gw_if.abi:0 input:0
    [01-01 00:00:01 ty N][lr:0x10099091] gw_cntl->gw_if.product_key:keyd8s85qd3rwn4a, input:keyd8s85qd3rwn4a
    [01-01 00:00:01 ty N][lr:0x1009909d] gw_cntl->gw_if.tp:0, input:0
    [01-01 00:00:01 ty N][lr:0x100990b1] gw_cntl->gw_if.firmware_key:keyd8s85qd3rwn4a, input:keyd8s85qd3rwn4a
    [01-01 00:00:01 ty N][lr:0x100996b5] enter success_proc
    [tkl_wifi_get_mac:1229] if: 0, mac: fc:3c:d7:42:67:9a
    ble_mac: 9b:67:42:d7:3c:fc
    [01-01 00:00:01 ty N][lr:0x100996c9] serial_no:fc3cd742679a
    [01-01 00:00:01 ty N][lr:0x10078933] frame init ok
    [01-01 00:00:01 ty N][lr:0x100717eb] opMeshRemoterCtrlInit!
    [01-01 00:00:01 ty N][lr:0x100cc67b] bt startup attr:ff
    [01-01 00:00:01xTaskCreate, name: remoter_cmd_deal, priority: 3, stack size: 2560
     ty N][lr:0x1008844f] upd product_id type:1 keyd8s85qd3rwn4a
    [01-01 00:00:01 ty I][tal_thread.c:184] thread_create name:remoter_cmd_deal,stackxTaskCreate, name: host_main_thread_hdl, priority: 8, stack size: 5120
    Depth:2560,totalstackDepth:23552,priority:3
    [01-01 00:00:01 ty I][tal_thread.c:184] thread_create name:host_main_thread_hdl,stackDepth:5120,totalstackDepth:28672,priority:8
    [01-01 00:00:01 ty I][lr:0x100bb15d] le acl buf sz = 251,max buf = 5 
    
    [01-01 00:00:01 ty I][lr:0x100b9b7b] acl buf sz = 251, max pkt = 5, avail pkt = 5
    
    [01-01 00:00:01 ty I][lr:0x100bb625] GAP init: stop adv
    [01-01 00:00:01 ty I][lr:0x1007e775] ble_hs_timer reset:100 
    [01-01 00:00:01 ty I][lr:0x10080ed9] Stack sync
    [01-01 00:00:01 ty N][lr:0x100789a1] ble remote ok
    [01-01 00:00:01 ty I][lr:0x10080eb9] Init/Deinit Event
    [01-01 00:00:01 ty N][lr:0x10088411] ty bt sdk init success finish
    [01-01 00:00:01 ty N][lr:0x100999c7] __devos_init_evt success
    [01-01 00:00:01 ty N][lr:0x10098d07] already bind
    [01-01 00:00:01 ty I][lr:0x100c8ff9] mqc app start ...
    [01-01 00:00:01 ty E][lr:0x100d6419] mqtt Get IP Fails
    xTaskCreate, name: mq_cntl_task, priority: 4, stack size: 5120
    [01-01 00:00:01 ty I][tal_thread.c:184] thread_create name:mq_cntl_task,stackDepth:5120,totalstackDepth:33792,priority:4
    tkl_thread_release, name: tuya_app_
    set work mode 2, is open 1, current ln mode: 0
    current work mode 0
    No need to switch mode, mode:0
    [02-07 03:28:17 ty N][lr:0x100abaab] cur stat:5  0x10078421 -->>
    [02-07 03:28:17 ty N][lr:0x100abae5] wifi netstat changed to:5  -->>
    [02-07 03:28:17 ty N][lr:0x100abafb] report wifi netstat[5] to callback  -->>
    [02-07 03:28:17 ty N][lr:0x10078439] last wifi stat:255, wifi stat 5
    [02-07 03:28:17 ty N][lr:0x10078445] size:90496
    [02-07 03:28:17 ty I][lr:0x100bb625] GAP init: stop adv
    [02-07 03:28:17 ty N][lr:0x100bbb4b] Start Adv
    [02-07 03:28:17 ty N][lr:0x10087fc1] ble adv updated
    [02-07 03:28:17 ty I][lr:0x1007e879] ble_hs_timer_exp:
    [WLIB_I]Status: Scan Successful. Initaiting Join: 
    [WLIB_I]SSID      = Meh
    [WLIB_I]BSSID     = 44:48:b9:5a:cb:e3
    [WLIB_I]Channel   = 6
    [WLIB_I]RSSI      = -68
    [WLIB_I]StationID = fc:3c:d7:42:67:9a
    [WLIB_I]Status: Initiating Authentication.
    [WLIB_I]Status: Authentication Successful. Initiating Association.
    [WLIB_I]Status: Association Successful.
    [WLIB_I]Connected.
    STA connected to target AP!
    reboot type(0:power-on;1:soft-rst;2:wdt-rst): 0
    reboot count: 0
    [ln_ty_sdk_ver: 0.0.5_alpha or 0x00000500] [build time:2022-05-17_14:57:03]
    [Git info: develop_198ece8]
    [BLIB Ver: 1.0.3 or 0x010003ff] [build time:Jan 19 2023 12:14:45]
    [02-07 03:28:20 ty E][lr:0x100822e5] kvs_read fails rmt_ctrl_0 -6
    [02-07 03:28:20 ty E][lr:0x100822e5] kvs_read fails rmt_ctrl_1 -6
    [02-07 03:28:20 ty E][lr:0x100822e5] kvs_read fails rmt_ctrl_2 -6
    [02-07 03:28:20 ty E][lr:0x100822e5] kvs_read fails rmt_ctrl_3 -6
    [02-07 03:28:20 ty E][lr:0x100822e5] kvs_read fails rmt_ctrl_4 -6
    [02-07 03:28:20 ty I][lr:0x100bbe7f] GAP procedure initiated: discovery; 
    [02-07 03:28:20 ty I][lr:0x100bbe91] own_addr_type=0 filter_policy=0 passive=1 limited=0 filter_duplicates=0 
    [02-07 03:28:20 ty I][lr:0x100bbf03] duration=forever
    [02-07 03:28:20 ty I][lr:0x100bbea7] 
    
    sta_netif_status_changed_cb 62
    +--------------- net device info ------------+
    |netif hostname: lwip0                       |
    |netif ip      = 192.168.1.36                |
    |netif mask    = 255.255.255.0               |
    |netif gateway = 192.168.1.1                 |
    |netif mac     : [FC:3C:D7:42:67:9A]         |
    +--------------------------------------------+
    tuya_wifi_get_ip_cb
    [02-07 03:28:21 ty N][lr:0x100aa8f5] wifi status changed to 0
    [02-07 03:28:21 ty N][lr:0x100abaab] cur stat:6  0x10078421 -->>
    [02-07 03:28:21 ty N][lr:0x100abae5] wifi netstat changed to:6  -->>
    [02-07 03:28:21 ty N][lr:0x100abafb] report wifi netstat[6] to callback  -->>
    [02-07 03:28:21 ty N][lr:0x10078439] last wifi stat:5, wifi stat 6
    [02-07 03:28:21 ty N][lr:0x10078445] size:94280
    xTaskCreate, name: lan_sock_loop, priority: 3, stack size: 4096
    [02-07 03:28:21 ty I][tal_thread.c:184] thread_create name:lan_sock_loop,stackDepth:4096,totalstackDepth:37888,priority:3
    [02-07 03:28:21 ty N][lr:0x100d63e5] mqtt ip:192.168.1.36 0xc0a80124
    [02-07 03:28:22 ty N][lr:0x100d7397] transporter connect host[m3.tuyaus.com] success, begin to mqtt connect
    [02-07 03:28:22 ty N][lr:0x100d7409] mqtt connect success
    [02-07 03:28:22 ty N][lr:0x100d743b] mqtt subcribe success
    [02-07 03:28:23 ty N][lr:0x100abaab] cur stat:7  0x10078421 -->>
    [02-07 03:28:23 ty N][lr:0x100abae5] wifi netstat changed to:7  -->>
    [02-07 03:28:23 ty N][lr:0x100abafb] report wifi netstat[7] to callback  -->>
    [02-07 03:28:23 ty N][lr:0x10078439] last wifi stat:6, wifi stat 7
    [02-07 03:28:23 ty N][lr:0x10078445] size:82928
    [02-07 03:28:23 ty N][lr:0x10078565] CLOUD_CONN
    [02-07 03:28:23 ty E][lr:0x100d3d9d] uf_open 3 err 8
    [02-07 03:28:23 ty E][soc_flash.c:77] uf file 3 can't open and read
    [02-07 03:28:23 ty E][lr:0x100d3d9d] uf_open 4 err 8
    [02-07 03:28:23 ty E][soc_flash.c:77] uf file 4 can't open and read
    [02-07 03:28:23 ty E][lr:0x100d3d9d] uf_open 5 err 8
    [02-07 03:28:23 ty E][soc_flash.c:77] uf file 5 can't open and read
    [02-07 03:28:23 ty E][lr:0x100d3d9d] uf_open 6 err 8
    [02-07 03:28:23 ty E][soc_flash.c:77] uf file 6 can't open and read
    xTaskCreate, name: thr_adRes, priority: 3, stack size: 4096
    [02-07 03:28:23 ty E][lr:0x100d3d9d] uf_open 7 err 8
    [02-07 03:28:23 ty E][soc_flash.c:77] uf file 7 can't open and read
    [02-07 03:28:23 ty N][lr:0x10077763] ble init timer
    [02-07 03:28:23 ty I][lr:0x100bb625] GAP init: stop adv
    [02-07 03:28:23 ty I][lr:0x1007e775] ble_hs_timer reset:0 
    [02-07 03:28:23 ty N][lr:0x1008867f] ble_sdk_send skip, no connect:4
    [02-07 03:28:23 ty I][lr:0x1007e879] ble_hs_timer_exp:
    [02-07 03:28:24 ty N][lr:0x10071959] BleTimerStart
    [02-07 03:28:25 ty N][lr:0x100c34c9] body:{"metas":{"supportAssistActive":true}}
    [02-07 03:28:26 ty E][lr:0x100d3d9d] uf_open netcfg_log err 8
    [10-16 01:47:29 ty N][lr:0x1008b4c5] body:{"type":3,"relation":[]}
    [10-16 01:47:38 ty N][lr:0x100c6b71] Update Timer from cloud
    [10-16 01:47:46 ty E][tuya_svc_upgrade.c:861] result null
  • #47 21265486
    davidezborges
    Level 6  
    >>21264859 thanks for the response, the command line tool gives me (on linux):
    python LN882H_Flash_Dumper.py '/dev/ttyUSB0' flashdump
    File "LN882H_Flash_Dumper.py", line 26
    print('.', end='', flush=True)
    ^
    SyntaxError: invalid syntax

    the windows error seems different as it says something about a file not found.

    the gui tool only allows to flash the chip but as I said I'd rather have a backup in case everything goes badly.
    I have 3 lightbulbs with the same chip so I can tinker a little but I'm not that good at python to make changes or develop my own tool.
  • #48 21265497
    divadiow
    Level 35  
    davidezborges wrote:
    it says something about a file not found.

    and LN882H_CMD_Tool.exe is definitely in the same directory as LN882H_Flash_Dumper.py?

    Added after 2 [hours] 1 [minutes]:

    (on Windows)
  • #49 21265995
    davidezborges
    Level 6  
    >>21265497 I'll be honest, the last couple of minutes I've been looking for that file.
  • #51 21266718
    davidezborges
    Level 6  
    >>21266005 thanks for the help, I've been able to find the folder and file that uses the dump tool. Windows 10 refuses to open the serial port. Windows 7 can open the serial port and load RAM data. Anyways it says: fail. could not go in download mode.

    I'll keep trying, maybe it's a wiring problem. P21 should be shorted to ground, right?

    Maybe later (when I finish some work) I will upload some pictures of the board
  • #52 21266733
    divadiow
    Level 35  
    davidezborges wrote:
    p21 should be shorted to ground, right?

    BOOT/GPIOA9 is pin 17 on LN882HKx.

    Pin diagram of LN882HKx IC with GPIOA9 marked at pin 17.

    which device/module do you have exactly, is it the candle bulb that is the main subject of this thread? and where are you seeing p21?
  • #53 21266912
    davidezborges
    Level 6  
    >>21266733



    here we go, these are pictures from module and led controller.
    I'll try to find the post where I read that p21 was same as boot(the microcontroller actually doesn't boot when p21 is shorted to ground)
    it's not a candle bulb but the overall hardware is the same.

    #Edit
    made some continuity tests, p21 it's actually A9!



    Printed circuit board with visible traces, components, and connected wires. Image of a circuit board with various electronic components and wires connected. Printed circuit board with colorful LEDs and an integrated circuit. Close-up of a round circuit board with LEDs in various colors. Image of a circuit board viewed through a magnifying glass.
  • #55 21266966
    davidezborges
    Level 6  
    >>21266943 the short answer is yes, the long answer is I just soldered another thin insulated copper line to U0-RX and will try to read the flash memory again.
    crossing fingers...
    #edit
    tried using U0-RX but no luck.
    I'll try to find where U1-RX comes from (that's the pin where I got bootlogs) maybe they changed default rx/tx pins?
    #edit 2
    used U1-TX but no luck either pins are B9 and B8 for TX and RX (LN882H side) respectively.
    I don't want to give up but this Chinese crap is taking longer than I expected to play nice.
    later I will use a dedicated power supply for this and try again. thanks again for every response.

    Added after 48 [minutes]:

    >>21266943 that really helped a lot, the LED controller is not the same but the wiring was.
    THANKS!! it is reading the memory dump right now
  • #56 21272297
    davidezborges
    Level 6  
    davidezborges wrote:
    >>21266733



    here we go, these are pictures from module and led controller.
    I'll try to find the post where I read that p21 was same as boot(the microcontroller actually doesn't boot when p21 is shorted to ground)
    it's not a candle bulb but the overall hardware is the same.

    #Edit
    made some continuity tests, p21 it's actually A9!



    Printed circuit board with visible traces, components, and connected wires. Image of a circuit board with various electronic components and wires connected. Printed circuit board with colorful LEDs and an integrated circuit. Close-up of a round circuit board with LEDs in various colors. Image of a circuit board viewed through a magnifying glass.






    after a little work i finally made it work using latest release from https://github.com/openshwprojects/OpenBK7231T_App/releases
    and using the following config:
    Code: JSON
    Log in, to see the code
  • ADVERTISEMENT
  • Helpful post
    #57 21280147
    divadiow
    Level 35  
    @davidezborges thank you for the firmware dump in that other thread.

    I have flashed and paired and can see that the model is W509Z2

    Here is a final template based on your discoveries

    Code: JSON
    Log in, to see the code


    Box of Tuya RGB+CCT smart LED bulb.

    is this box picture accurate?


    https://github.com/OpenBekenIOT/webapp/pull/155

    Added after 1 [hours] 13 [minutes]:

    and boot log and some run-time for your fw

    Code: Text
    Log in, to see the code
  • #58 21280900
    p.kaczmarek2
    Moderator Smart Home
    Merged, thank you, now we have 644 devices:
    https://openbekeniot.github.io/webapp/devicesList.html
    Will we manage to get to 700 this year? There may be still some not added templates in the existing posts.

    PS: Curious what happens there:
    
    adc raw:  777, temp_IC: 27, cap:0xA3331D00, rf43:0x0007, reg74:0x0228
    [WLIB_I]--->pll_cal reg16:0xFFC0, reg17:0x001f
    [WLIB_I]PLL_307_CAL: __adc_raw:  767,temp_IC =   23
    adc raw:  768, temp_IC: 24, cap:0xA3331D00, rf43:0x0005, reg74:0x0228
    

    Internal temperature?
    Helpful post? Buy me a coffee.
  • #59 21280965
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    There may be still some not added templates in the existing posts.

    probably!

    p.kaczmarek2 wrote:
    Internal temperature?

    must be? I wonder how the power management differs to OBK code, what powersave level is used. This is on my MQ-12F test board of course.

    Added after 9 [hours] 7 [minutes]:

    @davidezborges what BP5758D map are you using on your W509Z2 E27? Is it "BP5758D_Map 2 1 0 3 4"?
  • #60 21281700
    davidezborges
    Level 6  
    >>21280965 Screenshot of LED settings showing number configuration for colors: red, green, blue, cool, warm.

    2 1 0 3 4 is the final configuration I've been using.

    let me know if you need anything else.

Topic summary

The discussion centers on disassembling and setting up a Tuya-based RGB smart light bulb featuring the LN882HKI chip and a BP5758D LED driver. Initial disassembly was straightforward, and the user successfully backed up the chip firmware and flashed OpenBK (OBK) firmware at 115200 baud after failed attempts at higher speeds. Challenges included identifying correct GPIO pins for PWM control and interfacing with the BP5758D chip, which requires proper SDA and SCL pin mapping. Continuity testing with a multimeter was advised but caused device damage when performed on a powered device. Contributors developed and shared device templates and firmware patches to enable BP5758D driver support on LN882H-based bulbs, including pin mappings and LED channel configurations (e.g., "BP5758D_Map 3 4 2 0 1" and "2 1 0 3 4"). Thermal management issues were noted, with CPU temperatures reaching up to 100°C at full brightness, prompting recommendations to limit brightness and use BP5758D_Current commands to reduce power. Stability concerns remain, especially with MQTT and RGB loops causing disconnections. Firmware dumping tools and flashing procedures were discussed, including correct wiring for UART pins (notably reversed TX/RX lines) and boot mode pin grounding (P21/A9). The community shared resources such as firmware repositories, device templates, and documentation links to assist with flashing, configuration, and troubleshooting. The final confirmed device model is W509Z2, a 220V 9W E27 ES RGB+CCT bulb with LN882H chip and BP5758D LED driver. The discussion also touched on thermal imaging equipment for temperature assessment and comparisons of power management between original and custom firmware.
Summary generated by the language model.
ADVERTISEMENT