logo elektroda
logo elektroda
X
logo elektroda

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

gregmarfaing 5595 63
ADVERTISEMENT
  • #1 20970052
    gregmarfaing
    Level 6  

    Hello first time here,
    I recently bought a rgb light from aliexpress
    RGB LED lamp box placed on a keyboard.

    The disassembly was pretty easy and I didn't damage the light thanks to the video from elektroda channel



    And I was able to access to this: Electronic module from an RGB lamp on a wooden surface.
    Circuit board with pin labels SDA, V+, and SCL, held in a tool holder. Electronic module with several wires on a wooden table.

    After desoldering the module and seeing that it was a LN882HKI I was able to find the pinout with this topic Close-up of a small electronic module held in hands. Close-up of an electronic module with pin labels.
    I did a backup of the chip and tried to flash obk at 2000000 but after 3 fails I tried at 115200 and it worked right away.
    But now I'm facing an issue: I don't know how to setup the module in obk, I tried with the gpio finder but it did nothing except freezing starting P13 so I stopped messing with it.
    Thanks in advance for your help and sorry for the typos here and there
  • ADVERTISEMENT
  • Helpful post
    #2 20970107
    divadiow
    Level 34  
    gregmarfaing wrote:
    i don't know how to setup the module in obk , i tried with the gpio finder but it did nothing except freezing starting P13 so i stopped messing with it .


    sounds like you're doing the right thing? I've experienced freezing on some pins before but I just reboot and carry on. Perhaps start from the bottom instead.

    https://www.elektroda.com/rtvforum/topic3976371.html

    Added after 10 [minutes]:

    if they're PWM controlled LEDs, seems like only these pins can be used on LN882H anyway though

    8 GPIOA7 I/O PWM pin, corresponding to pin 15 of the IC.
    9 GPIOA10 I/O PWM pin, corresponding to pin 21 of the IC.
    10 GPIOA11 I/O PWM pin, corresponding to pin 22 of the IC.
    11 GPIOA12 I/O PWM pin, corresponding to pin 23 of the IC.
    12 GPIOB3 I/O PWM pin, corresponding to pin 24 of the IC.
  • #3 20970561
    gregmarfaing
    Level 6  
    Well i tried every gpio except p13 and p14 as it freezes and the leds didn't turn on (to be sure that i was doing good I tried with another rgb light).
    So to see if the problem is on my side, I checked the soldered points I did but still didn't see a thing and saw that on the leds pcb there was a bp5758 if it can be of any use
  • ADVERTISEMENT
  • Helpful post
    #4 20970624
    divadiow
    Level 34  
    Ah I see. I'm still quite new to OpenBK. I don't think I've had to set BP5758 channels on any bulbs. I do see there is DAT and CLK for that chip tho, so I guess it's finding the gpios for those two.

    Screenshot of an app displaying a list of available channel selectors, such as BL0937CF1, ADC, SM2135DAT, SM2135CLK, BP5758D_DAT, BP5758D_CLK, BP1658CJ_DAT, BP1658CJ_CLK, PWM_n, IRRecv, IRSend, Btn_NextColor.

    Perhaps there'd be continuity between two of the contacts on the PCB and two legs of the BP?
  • #5 20970790
    p.kaczmarek2
    Moderator Smart Home
    You are the first one to find a LN882H + BP5758 combo. I will need to enable BP5758 driver for you.

    Still, first you need to get a multimeter and check which LN882H pins are used for BP5758 SCL and SDA (or CLK and DAT, it's the same...). This is currently necessary, because there are too many options to just guess.

    Do you know BP5758 pinout? Are SDA and SCL marked on board?
    Helpful post? Buy me a coffee.
  • #6 20970849
    gregmarfaing
    Level 6  

    Close-up of a PCB with marked SDA and SCL pins.
    as you can see SDA and SCL are both marked on the PCB and I think this is the pinout of the BL5758 (as the other pins are all connected to LEDs) Close-up of a PCB with highlighted SDA and SCL pins and LEDs.
    And I just wanted to add that for me the pin used by the module are A0 and A1 as the others connected are VCC, GND, and ANT, respectively.
    BL5758 microcontroller with highlighted pins on a PCB held by a hand.

    Close-up of an electronic module with pin markings on a PCB.
  • #7 20971149
    p.kaczmarek2
    Moderator Smart Home
    We need to know exactly which pin is SCL and which is SDA.
    Helpful post? Buy me a coffee.
  • #8 20971544
    gregmarfaing
    Level 6  

    I should've asked how to proceed with the multimeter because now I think that my device is dead. I first had the cold white light up then with the next pin I had a little electric flash and now nothing except some burn marks on some components.
  • #9 20971601
    divadiow
    Level 34  
    oh crap!

    was it not in continuity mode? usually denoted by a "beep" audio symbol. my meter only has the beep symbol

    Close-ups of symbols and markings on an electrical meter.

    the bulb does not need to be powered when checking for continuity

    Added after 53 [seconds]:

    not that it's any help, but I've ordered one too to play with
  • #10 20971708
    p.kaczmarek2
    Moderator Smart Home
    Wait, @gregmarfaing , did you do a continuity test on a live device? Everything should be disconnected from mains first. Or, please provide more information on what happened.
    Helpful post? Buy me a coffee.
  • #11 20971840
    gregmarfaing
    Level 6  
    Well it's exactly that, I tried with the multimeter while it was powered on (I found this pretty dangerous so I was extra cautious) because it's my time doing this, I'm learning from scratch and I didn't know I had to use the continuous mode while the device was off. Still I really appreciate your help and divadiow's as well. Anyway, I think that I'll buy another one too as it's just so cheap (bought it at 2,69€)
    i can just add that A0 is connected to SCL and A1 is connected to SDA ( tested with the multimeter in good condition this time with the dead device)
  • ADVERTISEMENT
  • Helpful post
    #12 20983813
    divadiow
    Level 34  
    my turn to break one of these, but not sure how. I was so careful! UART just outputs junk now and there's no sign it's transmitting.

    I didn't get to flash it, but before I killed it, these are the pins and boot log. I've ordered another one lol. 😫

    Image of a PCB with LED components and pin labels. Close-up of a PCB with labeled pins. Close-up of a PCB with labeled pins.

    
    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[8d:57:49:68:d6:d8]
    [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 E][lr:0x100d3d9d] uf_open 8 err 8
    [01-01 00:00:00 ty E][soc_flash.c:77] uf file 8 can't open and read
    [01-01 00:00:00 ty E][light_memory.c:102] power mem read err
    [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 E][lr:0x100d3d9d] uf_open 8 err 8
    [01-01 00:00:00 ty E][soc_flash.c:77] uf file 8 can't open and read
    [01-01 00:00:00 ty E][light_memory.c:102] power mem read err
    [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:
    0xb7 0xda 0x23 0x52 0x55 0x7b 0xb4 0x8d 0x76 0x81 0x68 0x40 0x81 0x51 0x7e 0xb5
    [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
    [01-01 00:00:00 ty E][lr:0x100c8623] logseq empty
    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)
    [01-01 00:00:00 ty N][lr:0x100ab263] mf is open need stop fastconnect
    set work mode 1, is open 0, current ln mode: 0
    wifi not start, turn on first
    adapt wifi start <m:1>, hw_ready:0
    start rf preprocess and image cal
    [WLIB_E]idx=00, iq_hex_cal=0x7E7E, i=126, q=126, iavg= 69, qavg= 63
    [WLIB_E]idx=01, iq_hex_cal=0x7F7C, i=127, q=124, iavg= 10, qavg= 26
    [WLIB_E]idx=02, iq_hex_cal=0x8079, i=128, q=121, iavg= 74, qavg= 54
    [WLIB_E]idx=03, iq_hex_cal=0x8174, i=129, q=116, iavg= 34, qavg=  9
    [WLIB_E]idx=04, iq_hex_cal=0x816F, i=129, q=111, iavg= 18, qavg= 48
    [WLIB_E]idx=05, iq_hex_cal=0x7E7E, i=126, q=126, iavg= 46, qavg= 54
    [WLIB_E]idx=06, iq_hex_cal=0x7F7C, i=127, q=124, iavg= 51, qavg=  7
    [WLIB_E]idx=07, iq_hex_cal=0x807A, i=128, q=122, iavg= 10, qavg= 70
    [WLIB_E]idx=08, iq_hex_cal=0x8275, i=130, q=117, iavg= 19, qavg=  8
    [WLIB_E]idx=09, iq_hex_cal=0x836F, i=131, q=111, iavg=  9, qavg= 38
    [WLIB_E]idx=10, iq_hex_cal=0x7E7E, i=126, q=126, iavg= 50, qavg= 54
    [WLIB_E]idx=11, iq_hex_cal=0x7F7C, i=127, q=124, iavg= 45, qavg= 10
    [WLIB_E]idx=12, iq_hex_cal=0x8079, i=128, q=121, iavg= 25, qavg= 67
    [WLIB_E]idx=13, iq_hex_cal=0x8275, i=130, q=117, iavg= 32, qavg=  5
    [WLIB_E]idx=14, iq_hex_cal=0x826F, i=130, q=111, iavg=  8, qavg= 32
    [WLIB_E]idx=15, iq_hex_cal=0x7E7E, i=126, q=126, iavg= 44, qavg= 58
    [WLIB_E]idx=16, iq_hex_cal=0x7F7C, i=127, q=124, iavg= 50, qavg= 20
    [WLIB_E]idx=17, iq_hex_cal=0x8179, i=129, q=121, iavg=  1, qavg= 59
    [WLIB_E]idx=18, iq_hex_cal=0x8274, i=130, q=116, iavg= 33, qavg= 21
    [WLIB_E]idx=19, iq_hex_cal=0x836F, i=131, q=111, iavg= 24, qavg= 36
    [WLIB_E]idx=20, iq_hex_cal=0x7D7F, i=125, q=127, iavg= 12, qavg=  1
    [WLIB_E]idx=21, iq_hex_cal=0x7D7E, i=125, q=126, iavg= 26, qavg= 46
    [WLIB_E]idx=22, iq_hex_cal=0x7D7D, i=125, q=125, iavg= 36, qavg= 25
    [WLIB_E]idx=23, iq_hex_cal=0x7D7B, i=125, q=123, iavg= 31, qavg= 21
    [WLIB_E]idx=24, iq_hex_cal=0x7C79, i=124, q=121, iavg= 39, qavg= 38
    xTaskCreate, name: wifi_cfg, priority: 5, stack size: 2048
    xTaskCreate, name: mac_task, priority: 9, stack size: 2048
    [WLIB_I]cap_comp = -12, xtal_capbank_tab:[0]:28 [1]:23 [2]:23 [3]:23 [4]:38 [5]:58 [6]:58 [7]:58
    [WLIB_I][original]phy_tab_1f:0x56, phy_tab_20:0x3C
    [WLIB_I][efuse]phy_tab_1f:0x5A, phy_tab_20:0x40
    [WLIB_I][flash]phy_tab_1f:0x5A, phy_tab_20:0x2B, tx_pwr_comp_all=0, tx_pwr_comp_b=-21, tx_pwr_comp_gn=0
    [WLIB_I]==>temp_sect:2,phy_tab_1f:0x5A,phy_tab_20:0x2B
    [WLIB_I]<==temp_sect:2,phy_tab_1f:0x5A,phy_tab_20:0x2B
    XTAL CAP VAL:-12.
    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
    xTaskCreate, name: mf_test, priority: 4, stack size: 5120
    adapt wifi start <m:2>, hw_ready:1
    [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] w57tepkyqlsegcov_LN882H:1.0.0
    [01-01 00:00:01 ty N][lr:0x100787c7] connect mode is 5
    tkl_thread_release, name: mf_test
    [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
    set work mode 1, is open 1, current ln mode: 0
    current work mode 0
    No need to switch mode, mode:0
    adapt wifi start <m:2>, hw_ready:1
    adapt wifi start <m:2>, hw_ready:1
    [01-01 00:00:02 ty N][lr:0x100a76c3] wifi soc init. pid:keyh84mvjw3x7qdf firmwarekey:keyh84mvjw3x7qdf ver:1.0.0
    [01-01 00:00:02 ty N][lr:0x100aae05] start wifi link params validate, nc_tp:1 md:0
    [01-01 00:00:02 ty N][lr:0x100aae8d] gw_wsm.nc_tp:1
    [01-01 00:00:02 ty N][lr:0x100aae97] gw_wsm.md:0
    [01-01 00:00:02 ty N][lr:0x10098f59] Last reset reason: 0
    [01-01 00:00:02 ty N][lr:0x10098fe9] gw_cntl->gw_wsm.stat:1
    [01-01 00:00:02 ty N][lr:0x10099083] gw_cntl->gw_if.abi:0 input:0
    [01-01 00:00:02 ty N][lr:0x10099091] gw_cntl->gw_if.product_key:keyh84mvjw3x7qdf, input:keyh84mvjw3x7qdf
    [01-01 00:00:02 ty N][lr:0x1009909d] gw_cntl->gw_if.tp:0, input:0
    [01-01 00:00:02 ty N][lr:0x100990b1] gw_cntl->gw_if.firmware_key:keyh84mvjw3x7qdf, input:keyh84mvjw3x7qdf
    [01-01 00:00:02 ty N][lr:0x100996b5] enter success_proc
    [tkl_wifi_get_mac:1229] if: 0, mac: d8:d6:68:49:57:8c
    ble_mac: 8d:57:49:68:d6:d8
    [01-01 00:00:02 ty N][lr:0x100996c9] serial_no:d8d66849578c
    [01-01 00:00:02 ty N][lr:0x10078933] frame init ok
     ty N][lr:0x100717eb] opMeshRemoterCtrlInit!urrent ln mode: 0
    
    current work mode 0
    [WLIB_I]Disconnected.
    xTaskCreate, name: remoter_cmd_deal, priority: 3, stack size: 2560
    [01-01 00:00:02 ty I][tal_thread.c:184] thread_create name:remoter_cmd_deal,stackDepth:2560,totalstackDepth:28672,priority:3
    [01-01 00:00:02 ty N][lr:0x100789a1] ble remote ok
    [WLIB_I]LN882H WiFi Lib Ver: 1.1.3 [build time:Apr 24 2023 15:10:58][0x010103ff]
    [WLIB_I]SoftAP_Startup.
    SoftAP startup!
    [WLIB_I]HwInd:UKI:0
    [WLIB_I]Channel scanning not needed
    [WLIB_I]User Preferred channel idx 5-0
    [WLIB_I]Selecting 20MHz ch from One of ... 0 1 2 3 4 5
    [WLIB_I]Selected Channel Tbl Idx 5-0
    [WLIB_I]AP: Starting network in 5-0
    [WLIB_I]Connected.
    [WLIB_I]Status: Start Successful. Entering Enable State.
    tkl_thread_release, name: tuya_app_
    [WLIB_I]Disconnected.
    [WLIB_I]Channel scanning not needed
    [WLIB_I]User Preferred channel idx 5-0
    [WLIB_I]Selecting 20MHz ch from One of ... 0 1 2 3 4 5
    [WLIB_I]Selected Channel Tbl Idx 5-0
    [WLIB_I]AP: Starting network in 5-0
    [WLIB_I]Connected.
    [WLIB_I]Status: Start Successful. Entering Enable State.
    [tkl_wifi_get_mac:1229] if: 0, mac: d8:d6:68:49:57:8c
    ble_mac: 8d:57:49:68:d6:d8
    [tkl_wifi_get_mac:1229] if: 1, mac: d8:d6:68:49:57:8d
    ble_mac: 8d:57:49:68:d6:d8
    ssid:SmartLife-578C; pwd:; channel:6, ecn:0, max conn:1, hidden:0beacon:100, mac:d8:d6:68:49:57:8d; start:1
    [WLIB_I]Disconnected.
    ip info:
            ip:      192.168.176.1
            gw:      192.168.176.1
            netmask: 255.255.255.0
    server config:
            ip:       192.168.176.1
            ip start: 192.168.176.2
            ip end:   192.168.176.2
    port:67
    lease:2880
    renew:2880
    max client:1
    [WLIB_I]LN882H WiFi Lib Ver: 1.1.3 [build time:Apr 24 2023 15:10:58][0x010103ff]
    [WLIB_I]SoftAP_Startup.
    SoftAP startup!
    ap_startup_cb 137, wifi softap up
    ------- dhcp stop ----------
    -------DUMP DHCP SERVER_CONFIG----------
    server_config.server=192.168.176.1
    server_config.port=67
    server_config.lease=2880
    server_config.renew=2880
    server_config.ip_start=192.168.176.2
    server_config.ip_end=192.168.176.2
    server_config.max=1
    -----------------END--------------
    IP_POOL: i=0 192.168.176.2
    xTaskCreate, name: dhcpd, priority: 4, stack size: 1280
    dhcpd_task start...
    [WLIB_I]HwInd:UKI:0
    [WLIB_I]Channel scanning not needed
    [WLIB_I]User Preferred channel idx 5-0
    [WLIB_I]Selecting 20MHz ch from One of ... 0 1 2 3 4 5
    [WLIB_I]Selected Channel Tbl Idx 5-0
    [WLIB_I]AP: Starting network in 5-0
    [WLIB_I]Connected.
    [WLIB_I]Status: Start Successful. Entering Enable State.
    [WLIB_I]Disconnected.
    [WLIB_I]Channel scanning not needed
    [WLIB_I]User Preferred channel idx 5-0
    [WLIB_I]Selecting 20MHz ch from One of ... 0 1 2 3 4 5
    [WLIB_I]Selected Channel Tbl Idx 5-0
    [WLIB_I]AP: Starting network in 5-0
    [WLIB_I]Connected.
    [WLIB_I]Status: Start Successful. Entering Enable State.
    [01-01 00:00:02 ty N][lr:0x100abaab] cur stat:13  0x10078421 -->>
    [01-01 00:00:02 ty N][lr:0x100abae5] wifi netstat changed to:13  -->>
    [01-01 00:00:02 ty N][lr:0x100abafb] report wifi netstat[13] to callback  -->>
    [01-01 00:00:02 ty N][lr:0x10078439] last wifi stat:255, wifi stat 13
    [01-01 00:00:02 ty N][lr:0x10078445] size:111032
    [01-01 00:00:02 ty N][lr:0x1007859f] start ez & ap auto blink
    [01-01 00:00:02 ty N][lr:0x100add25] timer stated, short timer:0x0, long timer:0x100adb65
    [01-01 00:00:02 ty N][lr:0x100cc67b] bt startup attr:ff
    [01-01 00:00:02 ty N][lr:0x1008844f] upd product_id type:1 keyh84mvjw3x7qdf
    xTaskCreate, name: host_main_thread_hdl, priority: 8, stack size: 5120
    [01-01 00:00:02 ty I][tal_thread.c:184] thread_create name:host_main_thread_hdl,stackDepth:5120,totalstackDepth:33792,priority:8
    [01-01 00:00:02 ty I][lr:0x100bb15d] le acl buf sz = 251,max buf = 5
    
    [01-01 00:00:02 ty I][lr:0x100b9b7b] acl buf sz = 251, max pkt = 5, avail pkt = 5
    
    [01-01 00:00:02 ty I][lr:0x100bb625] GAP init: stop adv
    [01-01 00:00:02 ty I][lr:0x1007e775] ble_hs_timer reset:100
    [01-01 00:00:02 ty I][lr:0x10080ed9] Stack sync
    [01-01 00:00:02 ty I][lr:0x10080eb9] Init/Deinit Event
    [01-01 00:00:02 ty N][lr:0x10088411] ty bt sdk init success finish
    [01-01 00:00:02 ty N][lr:0x100bbb4b] Start Adv
    [01-01 00:00:02 ty N][lr:0x100999c7] __devos_init_evt success
    [01-01 00:00:02 ty I][lr:0x100bb625] GAP init: stop adv
    [01-01 00:00:02 ty I][lr:0x1007e775] ble_hs_timer reset:0
    [01-01 00:00:02 ty N][lr:0x100bbb4b] Start Adv
    [01-01 00:00:02 ty N][lr:0x10087fc1] ble adv updated
    xTaskCreate, name: TCP_ap_v4, priority: 5, stack size: 3584
    [01-01 00:00:02 ty I][tal_thread.c:184] thread_create name:TCP_ap_v4,stackDepth:3584,totalstackDepth:37376,priority:5
    [tkl_wifi_get_mac:1229] if: 0, mac: d8:d6:68:49:57:8c
    ble_mac: 8d:57:49:68:d6:d8
    [tkl_wifi_get_mac:1229] if: 1, mac: d8:d6:68:49:57:8d
    ble_mac: 8d:57:49:68:d6:d8
    [01-01 00:00:02 ty E][lr:0x100a93c1] timer is not run,wait
    [01-01 00:00:02 ty I][lr:0x1007e879] ble_hs_timer_exp:
    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]
    


    and some more random pics of the PCB Close-up of a section of a PCB with visible electronic components. Close-up of a PCB section with visible capacitors and an MB10F bridge rectifier. Electronic module on a PCB with a visible QR code. The image shows a small circuit board with wires attached to components. Image of a PCB with several green capacitors and wires on a work mat background. A photo of a circular PCB with colorful SMD LEDs on a wooden table. Close-up of a BP5758 integrated circuit on a PCB with colored LED lights.

    pinched from the Daybetter thread https://www.elektroda.com/rtvforum/topic3925050.html

    Diagram of current flow in the BP5758D circuit with MCU.

    the adventure continues...
  • ADVERTISEMENT
  • #13 20984119
    gregmarfaing
    Level 6  

    Aww... this sucks!
    And it's really weird that it broke as the flashing part was really straightforward for me and the module worked flawlessly before breaking it myself.
    Still, good luck with the next one! I'll buy a new one soon as (I don't know if it's the same in other countries) these cheap things are always on sale at the beginning of the month at AliExpress
  • #14 20984227
    divadiow
    Level 34  
    yeh annoying. maybe I killed something testing continuity right through to each pin on the IC. no matter, theyre cheap and another will be here in 5 days. Can't be too precious about these cheapo things.

    Can't say I'd noticed them being cheaper at the beginning of the month really.
  • #16 20995184
    p.kaczmarek2
    Moderator Smart Home
    This may require one little change more. You need to add the related file to Make. Here is an example how I did that for power metering:
    https://github.com/openshwprojects/OpenLN882H/commit/5e1e686bc5884ef0abee362bc791be660a541a2b
    Helpful post? Buy me a coffee.
  • #19 21002234
    p.kaczmarek2
    Moderator Smart Home
    If you have enabled this driver and updated the SDK, and it compiles fine with:
    
    #define ENABLE_DRIVER_BP5758    1
    

    then you should next try using it on LN882H to see if driver is available.
    Helpful post? Buy me a coffee.
  • #20 21002248
    divadiow
    Level 34  
    oh. I enabled the driver with #define ENABLE_DRIVER_BP5758 1

    but does this need you to OK again it now before I can try a test workflow build?

    Screenshot showing a notification about a workflow awaiting approval on the GitHub platform.
  • #21 21002253
    p.kaczmarek2
    Moderator Smart Home
    I think that you can still click here:
    Screenshot of a version control system interface showing a build log with several commits.
    and get the build files from the commit build.
    Helpful post? Buy me a coffee.
  • #23 21002388
    p.kaczmarek2
    Moderator Smart Home
    Updating the SDK requires also a manual update of dependencies in the main App repository. I did it myself on the App, but did you merge my changes into your fork?

    Still, if that were missing, then you'd get linker errors...

    Oh, I've found a problem! We didn't have such define! We have just one large define for all 4 LED drivers:
    Source code snippet in an editor with LED driver definitions.
    Sorry, I should have caught it earlier.
    Helpful post? Buy me a coffee.
  • #24 21002439
    divadiow
    Level 34  
    aha! that explains why I didn't see any other BP5758 defines for other chipsets

    Does this mean all LED drivers under that umbrella define need adding to LN882H?

    Screenshot of compilation errors indicating undefined references in LED driver code.
  • #28 21010121
    p.kaczmarek2
    Moderator Smart Home
    Good job, but now, if we want to release it, you need to create a separate PR, because your PR also enables that unusual LED driver on Beken...
    Helpful post? Buy me a coffee.
  • #30 21010227
    p.kaczmarek2
    Moderator Smart Home
    Both approaches are acceptable. Let me check out the new PR.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the disassembly and setup of a Tuya Smart Light featuring the LN882HKI chip. The user successfully disassembled the light and accessed the chip, attempting to flash it with OpenBK firmware. Initial attempts at GPIO configuration led to freezing issues, particularly with pins P13 and P14. Users suggested checking the pinout for the BP5758 driver, which is used for controlling the RGB LEDs. After troubleshooting, it was determined that A0 and A1 correspond to SCL and SDA for the BP5758 chip. The conversation also highlighted the importance of using a multimeter correctly to avoid damaging the device during testing. Several users shared their experiences with flashing the firmware, temperature management, and the stability of the device post-flashing. The final configuration for the device was established, including the correct mapping for the BP5758 driver.
Summary generated by the language model.
ADVERTISEMENT