logo elektroda
logo elektroda
X
logo elektroda

[Teardown] AVATTO WHS20 Smart Temperature & Humidity Sensor with screen

damiengaignon 624 6
ADVERTISEMENT
  • #1 21474645
    damiengaignon
    Level 4  
    Hey ^^

    Here is the AVATTO WHS20 from AliExpress
    https://www.aliexpress.com/item/1005005730613593.html

    The bundle:
    White packaging of Avatto thermometer and hygrometer.Box of the WHS20 temperature and humidity sensor with printed technical specifications.


    The inside:
    Image of a round printed circuit board with various electronic components on a wooden background.Green circuit board with a mounted LCD screen.
    Circuit board with electronic components and a display.Close-up of a green printed circuit board with a digital display and electronic components.

    It's a CB3S module aka BK7231N communicating with a HDSC HC32L136K8TA MCU.
    Close-up of a printed circuit board (PCB) with visible electronic components.

    CB3S is connected like the following :
    - TX1 & RX1 to MCU
    - P26 to unpopulated IR diode emitter
    - P7 to unpopulated IR diode receiver

    I desoldered two times the CB3S but damaged some traces.
    Then I soldered some wires and cut temporary main TX/RX traces.
    Close-up of a circuit board with soldered wires.

    As I did not want to get Tuya app, I decided to install directly OpenBK.

    With some tries and a new flag in the firmware, I manage to get my values and send them.
    This device is considered low powered cause it could be used on battery.

    So on 29/03/2025, I grab the firmware from this Github PR : https://github.com/openshwprojects/OpenBK7231T_App/pull/1297 (The file is attached).
    I need to check flag 37 and 51.
    Configure Wifi, MQTT and use this autoexec.bat.
    
    startDriver tuyaMCU
    startDriver tmSensor
    startDriver NTP
    
    setChannelType 1 Temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    setChannelType 3 BatteryLevelPercent
    linkTuyaMCUOutputToChannel 4 val 3
    // Temperature sampling
    setChannelType 4 ReadOnly
    linkTuyaMCUOutputToChannel 6 val 4
    setChannelLabel 4 "Temperature sampling"
    // Charge state
    setChannelType 5 ReadOnly
    linkTuyaMCUOutputToChannel 8 bool 5
    setChannelLabel 5 "Charge state"
    // Temperature unit
    setChannelType 6 ReadOnly
    linkTuyaMCUOutputToChannel 9 enum 6
    setChannelLabel 6 "Temperature unit"
    // Maximum temperature set
    setChannelType 7 ReadOnly
    linkTuyaMCUOutputToChannel 10 val 7
    setChannelLabel 7 "Temperature max"
    // Minimum temperature set
    setChannelType 8 ReadOnly
    linkTuyaMCUOutputToChannel 11 val 8
    setChannelLabel 8 "Temperature min"
    // Maximum humidity set
    setChannelType 9 ReadOnly
    linkTuyaMCUOutputToChannel 12 val 9
    setChannelLabel 9 "Humidity max"
    // Minimum humidity set
    setChannelType 10 ReadOnly
    linkTuyaMCUOutputToChannel 13 val 10
    setChannelLabel 10 "Humidity min"
    // Temperature alarm
    setChannelType 11 ReadOnly
    linkTuyaMCUOutputToChannel 14 enum 11
    setChannelLabel 11 "Temperature alarm"
    // Humidity alarm
    setChannelType 12 ReadOnly
    linkTuyaMCUOutputToChannel 15 enum 12
    setChannelLabel 12 "Humidity alarm"
    // Temperature periodic report
    setChannelType 13 ReadOnly
    linkTuyaMCUOutputToChannel 17 val 13
    setChannelLabel 13 "Temperature periodic report"
    // Temperature calibration
    setChannelType 14 ReadOnly
    linkTuyaMCUOutputToChannel 23 val 14
    setChannelLabel 14 "Temperature calibration"
    // Humidity calibration
    setChannelType 15 ReadOnly
    linkTuyaMCUOutputToChannel 24 val 15
    setChannelLabel 15 "Humidity calibration"
    
    tuyaMcu_defWiFiState 4
    


    Currently I did not tried to see if some values could be configured through Home Assistant like calibration, min and max.
    These values could be changed on the device. Enum are not correctly shown in HA.
    Also, I have two alarms on the device but I do not think I can update them through HA.

    Old text
    Spoiler:
    
    On my first desolder attempt, I have dumped the firmware (attached).
    Then, I wrote the OpenBK7231N_QIO_1.18.57.bin
    I was able to connect to AP, configure Wifi and some drivers : tuyaMCU, tmSensor and NTP.
    Informations were ok on the screen.
    But the system crashes... every time I reboot at about 3 mins.
    So I connected TX2 and get this :
    V:BK7231N_1.0.1
    REG:cpsr spsr r13r14
    SVC:000000D3 00401C1C 000033AC
    IRQ:000000d2 00000010 00401e0c ba17410b
    FIR:000000d1 00000010 00401ffc 24fc02d7 (this last changes time to time)
    SYS:000000df 0040192c 00000158
    ST:00000000
    J 0x10000

    EDIT : It seems to be the normal boot behaviour, not a crash log.

    So I erased completely the memory except the bootloader and reinstalled the firmware, the RF partition, changed the MAC address.
    But same thing and every time it appears at 175 s (thanks to wifi watchdog).

    Here I am ^^
    Thanks for help.


    EDIT: 25/03/29 : Update
  • ADVERTISEMENT
  • #2 21475760
    p.kaczmarek2
    Moderator Smart Home
    Hey, thanks for sharing, it's a very interesting device. We can try to support it in OBK.

    It looks like a TuyaMCU device, so running TuyaMCU driver is a good idea, but why do you start tmSensor as well? It seems that the device is powered from USB 5V, so it's not battery-powered.

    I wouldnt' recommend clearing whole flash, this won't help. I'd rather guess that TuyaMCU resets the WiFi module via CEN becaues it's not receiving a correct state report.

    Have you started writing autoexec.bat for TuyaMCU?

    maybe it will stop resetting as soon as you get a proper TuyaMCU communication, at least some basic exchanges and heartbeats?

    TuyaMCU guide: https://www.elektroda.com/rtvforum/topic4038151.html
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21476040
    damiengaignon
    Level 4  
    It's a TuyaMCU, indeed.
    For tmSensor, I misread the description, I remove it in my last tries.

    BTW, I restart from beginning.
    I reflash the original firmware and log the startup. I do not want to use Tuya App so it's not connected to anything.
    
    ▒
    V:BK7231N_1.0.1
    REG:cpsr     spsr     r13      r14
    SVC:000000D3          00401C1C 000033AC
    IRQ:000000d2 00000010 00401e0c ba15400b
    FIR:000000d1 00000010 00401ffc 24fc82d7
    SYS:000000df          0040192c 00000158
    ST:00000000
    J 0x10000
    [01-01 18:12:15 TUYA Info][lr:0xba1e9] mqc app init ...
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:5 cnt:1
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:31 cnt:2
    [01-01 18:12:15 TUYA Debug][lr:0x9a0cf] Thread:sys_timer Exec Start. Set to Running Stat
    [01-01 18:12:15 TUYA Err][lr:0xace43] logseq empty
    [01-01 18:12:15 TUYA Debug][lr:0xb61fb] svc online log init success
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
    [01-01 18:12:15 TUYA Err][lr:0x9f03d] wd_protected_read fails gw_bi -1
    [01-01 18:12:15 TUYA Debug][lr:0x9f2ff] gw base read finish:-1
    [01-01 18:12:15 TUYA Debug][lr:0xad125] ty bt cmmod regist ok:1
    [01-01 18:12:15 TUYA Debug][lr:0xad53d] upd adv para, send conn_req beacon.
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_port_init
    [01-01 18:12
    [01-01 18:12:15 TUYA Notice][lr:0xad20f] ty 1a,status:0x0
    [01-01 18:12:15 TUYA Debug][lr[PLATFORM NOTICE]STACK :
                                                          [01-01 18:12:15 TUYA Iug][lr:0x5a7e5] bk7231Debug][lr:0x5a7e5] bk723n_lowpower_common_ty:2.1n_lowpower_common_ty:21.5
    [PLATFORM NOTICE]C.1.5
    REATE DB SUCCESS
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [01-01 18:12:15 TUYA Notice][lr:0xad655] ble adv upd!
    [PLATFORM NOTICE]!!!!!!!!!!tuya_before_netcfg_cb
    [01-01 18:12:15 TUYA Noti[PLATFORM DEBUG]UNKNOW cNT:17
    EVENT:17
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNK▒
    V:BK7231N_1.0.1
    REG:cpsr     spsr     r13      r14
    SVC:000000D3          00401C1C 000033AC
    IRQ:000000d2 00000010 00401e0c ba17410b
    FIR:000000d1 00000010 00401ffc 64fe02d7
    SYS:000000df          0040192c 00000158
    ST:00000000
    J 0x10000
    [01-01 18:12:15 TUYA Info][lr:0xba1e9] mqc app init ...
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:5 cnt:1
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:31 cnt:2
    [01-01 18:12:15 TUYA Debug][lr:0x9a0cf] Thread:sys_timer Exec Start. Set to Running Stat
    [01-01 18:12:15 TUYA Err][lr:0xace43] logseq empty
    [01-01 18:12:15 TUYA Debug][lr:0xb61fb] svc online log init success
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
    [01-01 18:12:15 TUYA Err][lr:0x9f03d] wd_protected_read fails gw_bi -1
    [01-01 18:12:15 TUYA Debug][lr:0x9f2ff] gw base read finish:-1
    [01-01 18:12:15 TUYA Debug][lr:0xad125] ty bt cmmod regist ok:1
    [01-01 18:12:15 TUYA Debug][lr:0xad53d] upd adv para, send conn_req beacon.
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_port_init
    [01-01 18:12
    [01-01 18:12:15 TUYA Notice][lr:0xad20f] ty 1a,status:0x0
    [01-01 18:12:15 TUYA Debug][lr[PLATFORM NOTICE]STACK :
                                                          [01-01 18:12:15 TUYA DIug][lr:0x5a7e5] bk7231ebug][lr:0x5a7e5] bk723n_lowpower_common_ty:2.1n_lowpower_common_ty:21.5
    [PLATFORM NOTICE]C.1.5
    REATE DB SUCCESS
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [01-01 18:12:15 TUYA Notice][lr:0xad655] ble adv upd!
    [PLATFORM NOTICE]!!!!!!!!!!tuya_before_netcfg_cb
    [01-01 18:12:15 TUYA Noti[PLATFORM DEBUG]UNKNOW cNT:17
    EVENT:17
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [01-01 18:12:15 TUYA Notice][lr:0xb2377] get key:
    0x6 0xb1 0x8d 0xc 0x2a 0xde 0x5f 0x5b 0x5a 0x38 0xd0 0xdb 0xbe 0xe3 0x2d 0xb9
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:mf_test,stackDepth:5120,totalstackDepth:18432,priority:4
    [01-01 18:12:15 TUYA Notice][lr:0x58239] mf_init succ
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:ty_uart_task,stackDepth:3072,totalstackDepth:21504,priority:3
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:ty_record_task,stackDepth:2048,totalstackDepth:23552,priority:3
    [01-01 18:12:15 TUYA Notice][lr:0x59e97] get baud:9600
    [01-01 18:12:15 TUYA Notice][lr:0xb4419] wifi mcu init. pid:aw3mdykowygrrjm2 firmwarekey:keyr5qhaxgstx9ys v1:2.1.5 v2:1.0.0
    [PLATFORM NOTICE]bk_rst:0 tuya_rst:0
    [01-01 18:12:15 TUYA Notice][lr:0xa36a3] Last reset reason: 0
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:health_monitor,stackDepth:1536,totalstackDepth:25088,priority:5
    [01-01 18:12:15 TUYA Notice][lr:0xa3813] serial_no:18de50bbfd64
    [01-01 18:12:16 TUYA Notice][lr:0xa384b] gw_cntl.gw_wsm.stat:0
    [01-01 18:12:16 TUYA Err][lr:0xa3879] read wf start mode err:-6
    [01-01 18:12:16 TUYA Notice][lr:0xa38d9] gw_cntl.gw_wsm.nc_tp:1
    [01-01 18:12:16 TUYA Notice][lr:0xa38e1] gw_cntl.gw_wsm.md:0
    [01-01 18:12:16 TUYA Notice][lr:0xa3acf] gw_cntl.gw_if.abi:0 input:0
    [01-01 18:12:16 TUYA Notice][lr:0xa3adb] gw_cntl.gw_if.product_key:aw3mdykowygrrjm2, input:aw3mdykowygrrjm2
    [01-01 18:12:16 TUYA Notice][lr:0xa3ae7] gw_cntl.gw_if.tp:9, input:9
    [01-01 18:12:16 TUYA Notice][lr:0xa3af7] gw_cntl.gw_if.firmware_key:keyr5qhaxgstx9ys, input:keyr5qhaxgstx9ys
    [01-01 18:12:16 TUYA Notice][lr:0xad263] ty bt upd product:aw3mdykowygrrjm2 0
    [01-01 18:12:16 TUYA Notice][lr:0xad7db] upd product_id type:0 aw3mdykowygrrjm2 a9bd591d555d28fa mAOHDk0NCJ0F7AtkfRpLjvS52RMfJgCK
    [01-01 18:12:16 TUYA Notice][lr:0x5a797] device_init succ
    [01-01 18:12:18 TUYA Notice][lr:0x5a5d1] wifi status is :1
    [01-01 18:12:18 TUYA Notice][lr:0xad85f] update bound stat:0
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [PLATFORM DEBUG]UNKNOW EVENT:19
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:20
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [01-01 18:12:18 TUYA Notice][lr:0xad655] ble adv upd!
    


    Then, I reflash OpenBK7231N_QIO_1.18.57.bin, write an autoexec.bat with different values. My last try is this one :
    
    // Start TuyaMCu driver
    startDriver TuyaMCU
    // set TuyaMCU baud rate
    tuyaMcu_setBaudRate 9600
    // set TuyaMCU default wifi state 0x04, which means "paired",
    // because some TuyaMCU MCUs will not report all data
    // unless they think they are connected to cloud
    tuyaMcu_defWiFiState 4
    startDriver NTP
    


    Here is the log :
    
    V:BK7231N_1.0.1
    
    REG:cpsr     spsr     r13      r14
    
    SVC:000000D3          00401C1C 000033AC
    
    IRQ:000000d2 00000010 00401e0c be17410b 
    
    FIR:000000d1 00000010 00401ffc e6fe82f7 
    
    SYS:000000df          0040192c 00000158 
    
    ST:00000000
    
    J 0x10000
    
    bk_misc_init_start_type 0 0
    prvHeapInit-start addr:0x4142e8, size:113944
    [Flash]id:0xeb6015
    sctrl_sta_ps_init
    cset:0 0 0 0
    Entering initLog()...
    Commands registered!
    initLog() done!
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 17 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 3 changes count.
    Error:CMD:no file early.bat err -2
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    
    Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    
    Main_Init_Delay
    
    delaying start
    bandgap_calm_in_efuse=0x3f
    [load]bandgap_calm=0x3f->0x1f,vddig=4->5
    [FUNC]rwnxl_init
    [bk]tx_txde#Startup delayed 0ms#
    sayed 0ms#
    [FUNC]intc_init
    [FUNC]calibration_main
    gpio_level=1,txpwr_state=15
    user define rfcali mode:1 
    get rfc#Startup delayed 10ms#
    a delayed 10ms#
    #Startup delayed 20ms#
    #Startup delayed 30ms#
    #Startup delayed 40ms#
    #Startup delayed 50ms#
    #Startup delayed 60ms#
    #Startup delayed 70ms#
    #Startup delayed 80ms#
    #Startup delayed 90ms#
    #Startup delayed 100ms#
    #Startup delayed 110ms#
    #Startup delayed 120ms#
    #Startup delayed 130ms#
    #Startup delayed 140ms#
    #Startup delayed 150ms#
    #Startup delayed 160ms#
    #Startup delayed 170ms#
    #Startup delayed 180ms#
    #Startup delayed 190ms#
    #Startup delayed 200ms#
    #Startup delayed 210ms#
    #Startup delayed 220ms#
    #Startup delayed 230ms#
    #Startup delayed 240ms#
    #Startup delayed 250ms#
    #Startup delayed 260ms#
    #Startup delayed 270ms#
    #Startup delayed 280ms#
    #Startup delayed 290ms#
    #Startup delayed 300ms#
    #Startup delayed 310ms#
    #Startup delayed 320ms#
    #Startup delayed 330ms#
    #Startup delayed 340ms#
    #Startup delayed 350ms#
    #Startup delayed 360ms#
    #Startup delayed 370ms#
    #Startup delayed 380ms#
    #Startup delayed 390ms#
    #Startup delayed 400ms#
    #Startup delayed 410ms#
    #Startup delayed 420ms#
    #Startup delayed 430ms#
    #Startup delayed 440ms#
    #Startup delayed 450ms#
    calibration_main over
    flash txpwr table:0xf
    dif g and n20 ID in flash:4
    dif g and n40 ID in flash:4
    read txpwr tab from flash success
    temp in flash is:241
    xtal in flash is:64
    xtal_cali:64
    --init_xtal = 64
    [FUNC]ps_i#Startup delayed 460ms#
    nlayed 460ms#
    [FUNC]func_init_extended OVER!!!
    
    start_type:0
    Version:
    Initializing TCP/IP stack
    #Startup delayed 470ms#
    app_init finished
    #Startup delayed 480ms#
    #Startup delayed 490ms#
    #Startup delayed 500ms#
    #Startup delayed 510ms#
    #Startup delayed 520ms#
    #Startup delayed 530ms#
    #Startup delayed 540ms#
    #Startup delayed 550ms#
    #Startup delayed 560ms#
    #Startup delayed 570ms#
    #Startup delayed 580ms#
    #Startup delayed 590ms#
    #Startup delayed 600ms#
    #Startup delayed 610ms#
    #Startup delayed 620ms#
    #Startup delayed 630ms#
    #Startup delayed 640ms#
    #Startup delayed 650ms#
    #Startup delayed 660ms#
    #Startup delayed 670ms#
    #Startup delayed 680ms#
    #Startup delayed 690ms#
    #Startup delayed 700ms#
    #Startup delayed 710ms#
    #Startup delayed 720ms#
    #Startup delayed 730ms#
    #Startup delayed 740ms#
    
    starting....
    Info:MAIN:Main_Init_Delay done
    
    Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:Using SSID [HomeSweetHome]
    Info:MAIN:Using Pass [**********]
    Info:MQTT:MQTT_RegisterCallback called for bT obk50BBFD64/ subT obk50BBFD64/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obk50BBFD64/ subT cmnd/obk50BBFD64/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    Info:MQTT:MQTT_RegisterCallback called for bT obk50BBFD64/ subT obk50BBFD64/+/get
    Info:CMD:CMD_StartScript: started @startup at the beginning
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Started TuyaMCU.
    Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    Info:MAIN:Started NTP.
    cal_bias!
    cal dpll!
    temperature_type=1
    temp_code:-16 - adc_code:323 - adc_trend:[13]:241->[5]:321
    Info:MAIN:Time 1, idle 268042/s, free 78368, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 2, idle 191153/s, free 78368, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 3, idle 191467/s, free 78368, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 4, idle 191549/s, free 78368, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    supplicant_main_exiting
    supplicant_exit_done
    [sa_sta]MM_RESET_REQ
    [bk]tx_txdesc_flush
    [sa_sta]ME_CONFIG_REQ
    [sa_sta]ME_CHAN_CONFIG_REQ
    [sa_sta]MM_START_REQ
    hapd_intf_add_vif,type:2, s:0, id:0
    wpa_dInit
    wpa_supplicant_req_scan
    Setting scan[retry16] request: 0.100000 sec
    MANUAL_SCAN_REQ
    enter low level!
    mac XX:XX:XX:bb:XX:XX
    leave low level!
    net_wlan_add_netif done!, vif_idx:0
    Info:MAIN:Time 5, idle 190233/s, free 78368, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [HomeSweetHome]
    wpa_supplicant_scan
    wpa_drv_scan
    wpa_send_scan_req
    ht in scan
    scan_start_req_handler
    Info:MAIN:Time 6, idle 184620/s, free 72952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 7, idle 182228/s, free 72952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    wpa_driver_scan_cb
    wpa_get_scan_rst:1
    cipher2security 2 2 16 16
    Info:MAIN:Time 8, idle 85445/s, free 73104, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 9, idle 0/s, free 73104, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 10, idle 0/s, free 73104, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 0, softap: 0, b/g/n
    wpa_supplicant_connect
    Cancelling scan request
    wpa_driver_associate
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    ssid:HomeSweetHome, 1
    found scan rst rssi -69 < -50
    dis ht_support
    no ht in scan
    scan_start_req_handler
    aready open
    aready open
    me_set_ps_disable:840 0 0 1 0 3
    sm_auth_send:1
    sm_auth_handler
    ht NOT in assoc req
    sm_assoc_rsp_handler
    rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=0 max_bw=0
    rc_init: nss_max=0 mcs_max=255 r_idx_min=0 r_idx_max=11 no_samples=10
    ---------SM_CONNECT_IND_ok
    wpa_driver_assoc_cb
    Cancelling scan request
    __l2_packet_send: ret 0
    __l2_packet_send: ret 0
    hapd_intf_add_key CCMP
    add sta_mgmt_get_sta
    sta:0, vif:0, key:0
    sta_mgmt_add_key
    add hw key idx:24
    hapd_intf_add_key CCMP
    add is_broadcast_ether_addr
    sta:255, vif:0, key:1
    add hw key idx:1
    ctrl_port_hdl:1
    me_set_ps_disable:840 0 0 0 0 3
    sta_ip_start
    
    configuring interface mlan (with DHCP client)WARN: TCPIP mutex is NOT locked (1) caller 53C3F
    
    WARN: TCPIP mutex is NOT locked (1) caller 53C3F
    
    
    new ie: 0 : 0 0 0 0 0 0 0 0 0 0 0 0 0 
    new ie: 1 : 82 84 8b 96 24 30 48 6c 
    new ie: 3 : 1 
    new ie: 30 : 1 0 0 f ac 4 1 0 0 f ac 4 1 0 0 f ac 2 c 0 
    new ie: 2d : bc 8 1b ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    
    Info:MAIN:Time 11, idle 89707/s, free 73456, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 12, idle 190151/s, free 73496, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    ip_addr: 7d01a8c0
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 13, idle 187016/s, free 73024, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:NTP:Seconds since Jan 1 1900 = 3950720443
    Info:NTP:Unix time  : 1741731643
    Info:NTP:Local Time: 2025-03-11 22:20:43
    Info:MAIN:Time 14, idle 188772/s, free 73104, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 15, idle 187411/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 16, idle 202503/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 17, idle 195271/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 18, idle 189504/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 19, idle 193574/s, free 61712, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 20, idle 190822/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-72,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MAIN:Time 21, idle 187032/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 22, idle 190360/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 23, idle 193343/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 24, idle 192707/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 25, idle 199541/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 26, idle 199916/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 27, idle 194084/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 28, idle 192047/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 29, idle 194612/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 30, idle 189789/s, free 73408, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-69,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 31, idle 187927/s, free 73192, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 32, idle 200779/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 33, idle 190230/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 34, idle 192756/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 35, idle 193041/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 36, idle 191949/s, free 73192, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 37, idle 194611/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 38, idle 190558/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 39, idle 189388/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 40, idle 191868/s, free 73400, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-70,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MAIN:Time 41, idle 189574/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 42, idle 191048/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 43, idle 195057/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 44, idle 188056/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 45, idle 192533/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 46, idle 192865/s, free 73408, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 47, idle 191448/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 48, idle 188888/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 49, idle 193709/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 50, idle 186028/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-72,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MAIN:Time 51, idle 189682/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 52, idle 190849/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 53, idle 190115/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 54, idle 193225/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 55, idle 191924/s, free 65016, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 56, idle 190373/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 57, idle 193542/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 58, idle 190260/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 59, idle 194274/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Error:CMD:cmd LED_Map NOT found (args )
    Info:CMD:[WebApp Cmd 'LED_Map' Result] Unknown command
    Info:MAIN:Time 60, idle 190675/s, free 64800, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-74,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MAIN:Time 61, idle 186835/s, free 61712, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 62, idle 191487/s, free 73408, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Error:CMD:cmd LED_Map NOT found (args )
    Info:CMD:[WebApp Cmd 'LED_Map' Result] Unknown command
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 63, idle 194269/s, free 73192, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 64, idle 194358/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 65, idle 188526/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 66, idle 191483/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 67, idle 193636/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 68, idle 193494/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    temp_code:-11 - adc_code:314 - adc_trend:[5]:321->[6]:311
    Info:MAIN:Time 69, idle 192365/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 70, idle 194636/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-71,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MAIN:Time 71, idle 187217/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 72, idle 189577/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 73, idle 196305/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 74, idle 192761/s, free 73216, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:NTP:Seconds since Jan 1 1900 = 3950720504
    Info:NTP:Unix time  : 1741731704
    Info:NTP:Local Time: 2025-03-11 22:21:44
    Info:MAIN:Time 75, idle 191622/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 76, idle 189891/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 77, idle 191268/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 78, idle 192573/s, free 73408, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 79, idle 193258/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 80, idle 190761/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-70,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MAIN:Time 81, idle 187604/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 82, idle 193016/s, free 64800, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 83, idle 192378/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 84, idle 191436/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 85, idle 197876/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 86, idle 189951/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 87, idle 191806/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 88, idle 190452/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 89, idle 188789/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 90, idle 189218/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-71,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MAIN:Time 91, idle 190327/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 92, idle 187365/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 93, idle 203926/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 94, idle 188724/s, free 73408, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 95, idle 192380/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 96, idle 189335/s, free 64800, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 97, idle 187290/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 98, idle 197597/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 99, idle 188949/s, free 64800, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 100, idle 188479/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-70,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MAIN:Time 101, idle 190689/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 102, idle 191942/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Debug:CMD:loglevel set 6
    Info:CMD:[WebApp Cmd 'loglevel 6' Result] OK
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 103, idle 196496/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 104, idle 188385/s, free 64800, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 105, idle 191757/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 106, idle 188395/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 107, idle 189419/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 108, idle 188019/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 109, idle 192542/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 110, idle 189142/s, free 73408, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-71,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    Info:MQTT:mqtt_host empty, not starting mqtt
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 111, idle 189345/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 112, idle 186241/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 113, idle 190808/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 114, idle 186800/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 115, idle 191412/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 116, idle 186131/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 117, idle 189154/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 118, idle 191794/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 119, idle 191030/s, free 64800, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 120, idle 189687/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-74,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 121, idle 182859/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 122, idle 190803/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 123, idle 190073/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 124, idle 190391/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 125, idle 190216/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 126, idle 187122/s, free 73408, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 127, idle 192890/s, free 73408, MQTT 0(8), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 128, idle 188950/s, free 73400, MQTT 0(8), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 129, idle 190122/s, free 73408, MQTT 0(8), bWifi 1, secondsWithNoPing -1, socks 2/38 
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    Info:MAIN:Time 130, idle 191486/s, free 73408, MQTT 0(8), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.1.125 gate=192.168.1.254 mask=255.255.255.0 mac=XX:XX:XX:XX:XX:XX
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-74,ssid=HomeSweetHome,bssid=84:1e:a3:9b:a5:e0,channel=1,cipher_type:CCMP
    

    I also tried 115200 baudrate, and it's the same.
    It continues to stop at 175 s.
  • #4 21476393
    p.kaczmarek2
    Moderator Smart Home
    heartbeat_valid is 0, so TuyaMCU communication is not working. Try the alternate baud rate. Maybe it's high-speed TuyaMCU.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 21477480
    damiengaignon
    Level 4  
    So I tried all baud rates from 4 800 to 921 600, nothing.
    I'm thinking I have burned something between both IC.
    Connections seem ok
    So my last check is to reimplement original firmware and try to connect Tuya App ^^;
    Thinking of it... on my last attempt with the original firmware, I tried to sniff packets between CB3S et MCU and I had only heartbeat, some other commands but null results.
  • #6 21480186
    damiengaignon
    Level 4  
    Here are my findings.
    I reflash the original firmware, connect it to Tuya App and use Tuya Dev Platform...

    So, complete log from debug port :
    
    V:BK7231N_1.0.1
    REG:cpsr     spsr     r13      r14
    SVC:000000D3          00401C1C 000033AC
    IRQ:000000d2 00000010 00401e0c 9a15410b
    FIR:000000d1 00000010 00401ffc 24fc02d7
    SYS:000000df          0040192c 00000158
    ST:00000000
    J 0x10000
    [01-01 18:12:15 TUYA Info][lr:0xba1e9] mqc app init ...
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:5 cnt:1
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:31 cnt:2
    [01-01 18:12:15 TUYA Debug][lr:0x9a0cf] Thread:sys_timer Exec Start. Set to Running Stat
    [01-01 18:12:15 TUYA Debug][lr:0xace99] read m:1 f:0 l:0
    [01-01 18:12:15 TUYA Debug][lr:0xb61fb] svc online log init success
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
    [01-01 18:12:15 TUYA Err][lr:0x9f03d] wd_protected_read fails gw_bi -1
    [01-01 18:12:15 TUYA Debug][lr:0x9f2ff] gw base read finish:-1
    [01-01 18:12:15 TUYA Debug][lr:0xad125] ty bt cmmod regist ok:1
    [01-01 18:12:15 TUYA Debug][lr:0xad53d] upd adv para, send conn_req beacon.
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_port_init
    [01-0nit:312
    [01-01 18:12:15 TUYA Notice][lr:0xad20ion:0x1a,status:0x0
    [01-01 18:12:15 TUYA Deb[PLATFORM NOTICE]STACK uIT OK
    [01-01 18:12:15Iug][lr:0x5a7e5] bk7231 TUYA Debug][lr:0x5a7e5n_lowpower_common_ty:2.] bk7231n_lowpower_commo1.5
    [PLATFORM NOTICE]Cn_ty:2.1.5
    REATE DB SUCCESS
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [01-01 18:12:15 TUYA Notice][lr:0xad655] ble adv upd!
    [PLATFORM NOTICE]!!!!!!!!!!tuya
    V:BK7231N_1.0.1
    REG:cpsr     spsr     r13      r14
    SVC:000000D3          00401C1C 000033AC
    IRQ:000000d2 00000010 00401e0c 9a17410b
    FIR:000000d1 00000010 00401ffc 24fc82d7
    SYS:000000df          0040192c 00000158
    ST:00000000
    J 0x10000
    [01-01 18:12:15 TUYA Info][lr:0xba1e9] mqc app init ...
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:5 cnt:1
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:31 cnt:2
    [01-01 18:12:15 TUYA Debug][lr:0x9a0cf] Thread:sys_timer Exec Start. Set to Running Stat
    [01-01 18:12:15 TUYA Debug][lr:0xace99] read m:1 f:0 l:0
    [01-01 18:12:15 TUYA Debug][lr:0xb61fb] svc online log init success
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
    [01-01 18:12:15 TUYA Err][lr:0x9f03d] wd_protected_read fails gw_bi -1
    [01-01 18:12:15 TUYA Debug][lr:0x9f2ff] gw base read finish:-1
    [01-01 18:12:15 TUYA Debug][lr:0xad125] ty bt cmmod regist ok:1
    [01-01 18:12:15 TUYA Debug][lr:0xad53d] upd adv para, send conn_req beacon.
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_port_init
    [01-01it:312
    [01-01 18:12:15 TUYA Notice][lr:0xad20ion:0x1a,status:0x0
    [01-01 18:12:15 TUYA Deb[PLATFORM NOTICE]STACK uIT OK
    [01-01 18:12:15Iug][lr:0x5a7e5] bk7231 TUYA Debug][lr:0x5a7e5n_lowpower_common_ty:2.1] bk7231n_lowpower_comm.5
    [PLATFORM NOTICE]CRon_ty:2.1.5
    EATE DB SUCCESS
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [01-01 18:12:15 TUYA Notice][lr:0xad655] ble adv upd!
    [PLATFORM NOTICE]!!!!!!!!!!tuya_before_netcfg_[01-01 18:12:15 TUYA Nocdr: 0x1ee000   block_stice][lr:0xb22a7] key_az 4096
    [PLATFORM DEBUGdstatus:0x0
    ]UNKNOW EVENT:17
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [01-01 18:12:15 TUYA Notice][lr:0xb2377] get key:
    0x6 0xb1 0x8d 0xc 0x2a 0xde 0x5f 0x5b 0x5a 0x38 0xd0 0xdb 0xbe 0xe3 0x2d 0xb9
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:mf_test,stackDepth:5120,totalstackDepth:18432,priority:4
    [01-01 18:12:15 TUYA Notice][lr:0x58239] mf_init succ
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:ty_uart_task,stackDepth:3072,totalstackDepth:21504,priority:3
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:ty_record_task,stackDepth:2048,totalstackDepth:23552,priority:3
    [01-01 18:12:15 TUYA Notice][lr:0x59e97] get baud:9600
    [01-01 18:12:15 TUYA Notice][lr:0xb4419] wifi mcu init. pid:aw3mdykowygrrjm2 firmwarekey:keyr5qhaxgstx9ys v1:2.1.5 v2:1.0.0
    [PLATFORM NOTICE]bk_rst:0 tuya_rst:0
    [01-01 18:12:15 TUYA Notice][lr:0xa36a3] Last reset reason: 0
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:health_monitor,stackDepth:1536,totalstackDepth:25088,priority:5
    [01-01 18:12:15 TUYA Notice][lr:0xa3813] serial_no:18de50bbfd64
    [01-01 18:12:16 TUYA Notice][lr:0xa384b] gw_cntl.gw_wsm.stat:2
    [01-01 18:12:16 TUYA Notice][lr:0xa38d9] gw_cntl.gw_wsm.nc_tp:9
    [01-01 18:12:16 TUYA Notice][lr:0xa38e1] gw_cntl.gw_wsm.md:0
    [01-01 18:12:16 TUYA Notice][lr:0xa3acf] gw_cntl.gw_if.abi:0 input:0
    [01-01 18:12:16 TUYA Notice][lr:0xa3adb] gw_cntl.gw_if.product_key:aw3mdykowygrrjm2, input:aw3mdykowygrrjm2
    [01-01 18:12:16 TUYA Notice][lr:0xa3ae7] gw_cntl.gw_if.tp:9, input:9
    [01-01 18:12:16 TUYA Notice][lr:0xa3af7] gw_cntl.gw_if.firmware_key:keyr5qhaxgstx9ys, input:keyr5qhaxgstx9ys
    [01-01 18:12:16 TUYA Notice][lr:0xad263] ty bt upd product:aw3mdykowygrrjm2 0
    [01-01 18:12:16 TUYA Notice][lr:0xad7db] upd product_id type:0 aw3mdykowygrrjm2 a9bd591d555d28fa mAOHDk0NCJ0F7AtkfRpLjvS52RMfJgCK
    [01-01 18:12:16 TUYA Notice][lr:0x5a797] device_init succ
    [01-01 18:12:16 TUYA Info][lr:0x9a243] thread_create name:lpc_task,stackDepth:3072,totalstackDepth:28160,priority:3
    [01-01 18:12:16 TUYA Notice][lr:0xad28f] ty bt upd localkey
    [01-01 18:12:16 TUYA Notice][lr:0xad815] upd login key len:6
    [01-01 18:12:16 TUYA Info][lr:0xba293] mqc app start ...
    [01-01 18:12:16 TUYA Info][lr:0x9a243] thread_create name:mq_cntl_task,stackDepth:4096,totalstackDepth:32256,priority:4
    [01-01 18:12:16 TUYA Err][lr:0xb57e5] astro timer read fail:-6
    [01-01 18:12:16 TUYA Err][lr:0xb5be9] read fail:-6
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [PLATFORM DEBUG]UNKNOW EVENT:19
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:20
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [01-01 01:00:01 TUYA Notice][lr:0xad655] ble adv upd!
    [01-01 01:00:01 TUYA Notice][lr:0xc0c3f] mqtt get serve ip success
    [01-01 01:00:01 TUYA Notice][lr:0xaf603] ret = 0
    [01-01 01:00:01 TUYA Notice][lr:0xc0c3f] mqtt create success, begin to connect
    [01-01 01:00:01 TUYA Err][lr:0xc0d7d] ret:1.
    [01-01 01:00:02 TUYA Notice][lr:0x5a5d1] wifi status is :6
    [01-01 01:00:02 TUYA Notice][lr:0xc0d0d] mqtt connect success. begin to subscribe:smart/device/in/bf201ca7e96c34603a9i27
    [01-01 01:00:02 TUYA Err][lr:0xc0d7d] ret:1.
    [01-01 01:00:03 TUYA Notice][lr:0x5a5d1] wifi status is :7
    [01-01 01:00:03 TUYA Notice][lr:0xaf603] ret = 0
    [01-01 01:00:04 TUYA Notice][lr:0xadb8d] ble get conn stat:4
    [01-01 01:00:04 TUYA Notice][lr:0xadbb9] ble_sdk_send skip, no connect:4
    [PLATFORM DEBUG]UNKNOW EVENT:18
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [03-14 22:31:05 TUYA Notice][lr:0x58cc1] result:[]
    [03-14 22:31:05 TUYA Err][lr:0xc2409] uf_open netcfg_log err 8
    [03-14 22:31:05 TUYA Notice][lr:0xadb8d] ble get conn stat:4
    [03-14 22:31:05 TUYA Notice][lr:0xadbb9] ble_sdk_send skip, no connect:4
    
    V:BK7231N_1.0.1
    REG:cpsr     spsr     r13      r14
    SVC:000000D3          00401C1C 000033AC
    IRQ:000000d2 00000010 00401e0c ba17410b
    FIR:000000d1 00000010 00401ffc 24fc02d3
    SYS:000000df          0040192c 00000158
    ST:00000000
    J 0x10000
    [01-01 18:12:15 TUYA Info][lr:0xba1e9] mqc app init ...
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:5 cnt:1
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:31 cnt:2
    [01-01 18:12:15 TUYA Debug][lr:0x9a0cf] Thread:sys_timer Exec Start. Set to Running Stat
    [01-01 18:12:15 TUYA Debug][lr:0xace99] read m:0 f:0 l:0
    [01-01 18:12:15 TUYA Debug][lr:0xb61fb] svc online log init success
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
    [01-01 18:12:15 TUYA Err][lr:0x9f03d] wd_protected_read fails gw_bi -1
    [01-01 18:12:15 TUYA Debug][lr:0x9f2ff] gw base read finish:-1
    [01-01 18:12:15 TUYA Debug][lr:0xad125] ty bt cmmod regist ok:1
    [01-01 18:12:15 TUYA Debug][lr:0xad53d] upd adv para, send conn_req beacon.
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_port_init
    [01-01it:312
    [01-01 18:12:15 TUYA Notice][lr:0xad20ion:0x1a,status:0x0
    [01-01 18:12:15 TUYA Deb[PLATFORM NOTICE]STACK uIT OK
    [01-01 18:12:15Iug][lr:0x5a7e5] bk7231 TUYA Debug][lr:0x5a7e5]n_lowpower_common_ty:2. bk7231n_lowpower_commo1.5
    [PLATFORM NOTICE]Cn_ty:2.1.5
    REATE DB SUCCESS
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [01-01 18:12:15 TUYA Notice][lr:0xad655] ble adv upd!
    [PLATFORM NOTICE]!!!!!!!!!!tuya_before_netcfg_[01-01 18:12:15 TUYA Nocdr: 0x1ee000   block_stice][lr:0xb22a7] key_az 4096
    [PLATFORM DEBUGdstatus:0x0
    ]UNKNOW EVENT:17
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [01-01 18:12:15 TUYA Notice][lr:0xb2377] get key:
    0x6 0xb1 0x8d 0xc 0x2a 0xde 0x5f 0x5b 0x5a 0x38 0xd0 0xdb 0xbe 0xe3 0x2d 0xb9
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:mf_test,stackDepth:5120,totalstackDepth:18432,priority:4
    [01-01 18:12:15 TUYA Notice][lr:0x58239] mf_init succ
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:ty_uart_task,stackDepth:3072,totalstackDepth:21504,priority:3
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:ty_record_task,stackDepth:2048,totalstackDepth:23552,priority:3
    [01-01 18:12:15 TUYA Notice][lr:0x59e97] get baud:9600
    [01-01 18:12:15 TUYA Notice][lr:0xb4419] wifi mcu init. pid:aw3mdykowygrrjm2 firmwarekey:keyr5qhaxgstx9ys v1:2.1.5 v2:1.0.0
    [PLATFORM NOTICE]bk_rst:0 tuya_rst:0
    [01-01 18:12:15 TUYA Notice][lr:0xa36a3] Last reset reason: 0
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:health_monitor,stackDepth:1536,totalstackDepth:25088,priority:5
    [01-01 18:12:15 TUYA Notice][lr:0xa3813] serial_no:18de50bbfd64
    [01-01 18:12:16 TUYA Notice][lr:0xa384b] gw_cntl.gw_wsm.stat:2
    [01-01 18:12:16 TUYA Notice][lr:0xa38d9] gw_cntl.gw_wsm.nc_tp:9
    [01-01 18:12:16 TUYA Notice][lr:0xa38e1] gw_cntl.gw_wsm.md:0
    [01-01 18:12:16 TUYA Notice][lr:0xa3acf] gw_cntl.gw_if.abi:0 input:0
    [01-01 18:12:16 TUYA Notice][lr:0xa3adb] gw_cntl.gw_if.product_key:aw3mdykowygrrjm2, input:aw3mdykowygrrjm2
    [01-01 18:12:16 TUYA Notice][lr:0xa3ae7] gw_cntl.gw_if.tp:9, input:9
    [01-01 18:12:16 TUYA Notice][lr:0xa3af7] gw_cntl.gw_if.firmware_key:keyr5qhaxgstx9ys, input:keyr5qhaxgstx9ys
    [01-01 18:12:16 TUYA Notice][lr:0xad263] ty bt upd product:aw3mdykowygrrjm2 0
    [01-01 18:12:16 TUYA Notice][lr:0xad7db] upd product_id type:0 aw3mdykowygrrjm2 a9bd591d555d28fa mAOHDk0NCJ0F7AtkfRpLjvS52RMfJgCK
    [01-01 18:12:16 TUYA Notice][lr:0x5a797] device_init succ
    [01-01 18:12:16 TUYA Info][lr:0x9a243] thread_create name:lpc_task,stackDepth:3072,totalstackDepth:28160,priority:3
    [01-01 18:12:16 TUYA Notice][lr:0xad28f] ty bt upd localkey
    [01-01 18:12:16 TUYA Notice][lr:0xad815] upd login key len:6
    [01-01 18:12:16 TUYA Info][lr:0xba293] mqc app start ...
    [01-01 18:12:16 TUYA Info][lr:0x9a243] thread_create name:mq_cntl_task,stackDepth:4096,totalstackDepth:32256,priority:4
    [01-01 18:12:16 TUYA Err][lr:0xb57e5] astro timer read fail:-6
    [01-01 18:12:16 TUYA Err][lr:0xb5be9] read fail:-6
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [PLATFORM DEBUG]UNKNOW EVENT:19
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:20
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [01-01 01:00:01 TUYA Notice][lr:0xad655] ble adv upd!
    [01-01 01:00:01 TUYA Notice][lr:0xc0c3f] mqtt get serve ip success
    [01-01 01:00:01 TUYA Notice][lr:0xaf603] ret = 0
    [01-01 01:00:01 TUYA Notice][lr:0xc0c3f] mqtt create success, begin to connect
    [01-01 01:00:01 TUYA Err][lr:0xc0d7d] ret:1.
    [01-01 01:00:01 TUYA Notice][lr:0xc0d0d] mqtt connect success. begin to subscribe:smart/device/in/bf201ca7e96c34603a9i27
    [01-01 01:00:01 TUYA Err][lr:0xc0d7d] ret:1.
    [01-01 01:00:02 TUYA Notice][lr:0x5a5d1] wifi status is :6
    [01-01 01:00:03 TUYA Notice][lr:0x5a5d1] wifi status is :7
    [01-01 01:00:03 TUYA Notice][lr:0xaf603] ret = 0
    [03-14 22:32:10 TUYA Notice][lr:0x58cc1] result:[]
    [03-14 22:32:10 TUYA Notice][lr:0xadb8d] ble get conn stat:4
    [03-14 22:32:10 TUYA Notice][lr:0xadbb9] ble_sdk_send skip, no connect:4
    [PLATFORM DEBUG]UNKNOW EVENT:18
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [03-14 22:32:10 TUYA Notice][lr:0xadb8d] ble get conn stat:4
    [03-14 22:32:10 TUYA Notice][lr:0xadbb9] ble_sdk_send skip, no connect:4
    
    V:BK7231N_1.0.1
    REG:cpsr     spsr     r13      r14
    SVC:000000D3          00401C1C 000033AC
    IRQ:000000d2 00000010 00401e0c ba174109
    FIR:000000d1 00000010 00401ffc 24ec02d7
    SYS:000000df          0040192c 00000158
    ST:00000000
    J 0x10000
    [01-01 18:12:15 TUYA Info][lr:0xba1e9] mqc app init ...
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:5 cnt:1
    [01-01 18:12:15 TUYA Debug][lr:0xba197] mq_pro:31 cnt:2
    [01-01 18:12:15 TUYA Debug][lr:0x9a0cf] Thread:sys_timer Exec Start. Set to Running Stat
    [01-01 18:12:15 TUYA Debug][lr:0xace99] read m:0 f:0 l:0
    [01-01 18:12:15 TUYA Debug][lr:0xb61fb] svc online log init success
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
    [01-01 18:12:15 TUYA Err][lr:0x9f03d] wd_protected_read fails gw_bi -1
    [01-01 18:12:15 TUYA Debug][lr:0x9f2ff] gw base read finish:-1
    [01-01 18:12:15 TUYA Debug][lr:0xad125] ty bt cmmod regist ok:1
    [01-01 18:12:15 TUYA Debug][lr:0xad53d] upd adv para, send conn_req beacon.
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_port_init
    [01-0nit:312
    [01-01 18:12:15 TUYA Notice][lr:0xad20ion:0x1a,status:0x0
    [01-01 18:12:15 TUYA Deb[PLATFORM NOTICE]STACK uIT OK
    [01-01 18:12:15Iug][lr:0x5a7e5] bk7231 TUYA Debug][lr:0x5a7e5n_lowpower_common_ty:2.] bk7231n_lowpower_commo1.5
    [PLATFORM NOTICE]Cn_ty:2.1.5
    REATE DB SUCCESS
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [01-01 18:12:15 TUYA Notice][lr:0xad655] ble adv upd!
    [PLATFORM NOTICE]!!!!!!!!!!tuya_before_netcfg_[01-01 18:12:15 TUYA Nocdr: 0x1ee000   block_stice][lr:0xb22a7] key_az 4096
    [PLATFORM DEBUGdstatus:0x0
    ]UNKNOW EVENT:17
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [01-01 18:12:15 TUYA Notice][lr:0xb2377] get key:
    0x6 0xb1 0x8d 0xc 0x2a 0xde[PLATFORM DEBUG]UNKNOW  FORM DEBUG]UNKNOW EVENEVENT:16
    T:16
    0x5f 0x5b 0x5a 0x38 0xd0 0xdb 0xbe 0xe3 0x2d 0xb9
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:mf_test,stackDepth:5120,totalstackDepth:18432,priority:4
    [01-01 18:12:15 TUYA Notice][lr:0x58239] mf_init succ
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:ty_uart_task,stackDepth:3072,totalstackDepth:21504,priority:3
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:ty_record_task,stackDepth:2048,totalstackDepth:23552,priority:3
    [01-01 18:12:15 TUYA Notice][lr:0x59e97] get baud:9600
    [01-01 18:12:15 TUYA Notice][lr:0xb4419] wifi mcu init. pid:aw3mdykowygrrjm2 firmwarekey:keyr5qhaxgstx9ys v1:2.1.5 v2:1.0.0
    [PLATFORM NOTICE]bk_rst:0 tuya_rst:0
    [01-01 18:12:15 TUYA Notice][lr:0xa36a3] Last reset reason: 0
    [01-01 18:12:15 TUYA Info][lr:0x9a243] thread_create name:health_monitor,stackDepth:1536,totalstackDepth:25088,priority:5
    [01-01 18:12:15 TUYA Notice][lr:0xa3813] serial_no:18de50bbfd64
    [01-01 18:12:15 TUYA Notice][lr:0xa384b] gw_cntl.gw_wsm.stat:2
    [01-01 18:12:15 TUYA Notice][lr:0xa38d9] gw_cntl.gw_wsm.nc_tp:9
    [01-01 18:12:15 TUYA Notice][lr:0xa38e1] gw_cntl.gw_wsm.md:0
    [01-01 18:12:16 TUYA Notice][lr:0xa3acf] gw_cntl.gw_if.abi:0 input:0
    [01-01 18:12:16 TUYA Notice][lr:0xa3adb] gw_cntl.gw_if.product_key:aw3mdykowygrrjm2, input:aw3mdykowygrrjm2
    [01-01 18:12:16 TUYA Notice][lr:0xa3ae7] gw_cntl.gw_if.tp:9, input:9
    [01-01 18:12:16 TUYA Notice][lr:0xa3af7] gw_cntl.gw_if.firmware_key:keyr5qhaxgstx9ys, input:keyr5qhaxgstx9ys
    [01-01 18:12:16 TUYA Notice][lr:0xad263] ty bt upd product:aw3mdykowygrrjm2 0
    [01-01 18:12:16 TUYA Notice][lr:0xad7db] upd product_id type:0 aw3mdykowygrrjm2 a9bd591d555d28fa mAOHDk0NCJ0F7AtkfRpLjvS52RMfJgCK
    [01-01 18:12:16 TUYA Notice][lr:0x5a797] device_init succ
    [01-01 18:12:16 TUYA Info][lr:0x9a243] thread_create name:lpc_task,stackDepth:3072,totalstackDepth:28160,priority:3
    [01-01 18:12:16 TUYA Notice][lr:0xad28f] ty bt upd localkey
    [01-01 18:12:16 TUYA Notice][lr:0xad815] upd login key len:6
    [01-01 18:12:16 TUYA Info][lr:0xba293] mqc app start ...
    [01-01 18:12:16 TUYA Info][lr:0x9a243] thread_create name:mq_cntl_task,stackDepth:4096,totalstackDepth:32256,priority:4
    [01-01 18:12:16 TUYA Err][lr:0xb57e5] astro timer read fail:-6
    [01-01 18:12:16 TUYA Err][lr:0xb5be9] read fail:-6
    [PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
    [PLATFORM DEBUG]UNKNOW EVENT:19
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:20
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [01-01 01:00:01 TUYA Notice][lr:0xad655] ble adv upd!
    [01-01 01:00:01 TUYA Notice][lr:0xc0c3f] mqtt get serve ip success
    [01-01 01:00:01 TUYA Notice][lr:0xaf603] ret = 0
    [01-01 01:00:01 TUYA Notice][lr:0xc0c3f] mqtt create success, begin to connect
    [01-01 01:00:01 TUYA Err][lr:0xc0d7d] ret:1.
    [01-01 01:00:02 TUYA Notice][lr:0x5a5d1] wifi status is :6
    [01-01 01:00:02 TUYA Notice][lr:0xc0d0d] mqtt connect success. begin to subscribe:smart/device/in/bf201ca7e96c34603a9i27
    [01-01 01:00:02 TUYA Err][lr:0xc0d7d] ret:1.
    [01-01 01:00:03 TUYA Notice][lr:0x5a5d1] wifi status is :7
    [01-01 01:00:03 TUYA Notice][lr:0xaf603] ret = 0
    [03-14 22:33:15 TUYA Notice][lr:0x58cc1] result:[]
    [03-14 22:33:15 TUYA Notice][lr:0xadb8d] ble get conn stat:4
    [03-14 22:33:15 TUYA Notice][lr:0xadbb9] ble_sdk_send skip, no connect:4
    [03-14 22:33:15 TUYA Notice][lr:0xadb8d] ble get conn stat:4
    [03-14 22:33:15 TUYA Notice][lr:0xadbb9] ble_sdk_send skip, no connect:4
    [PLATFORM DEBUG]UNKNOW EVENT:18
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [PLATFORM DEBUG]UNKNOW EVENT:16
    


    The raw log of communication (2 UART converters - Lines are inverted !!) :
    
    //R 14/03/2025 22:30:57 WiFi received:
    55AA0001000000
    //S 14/03/2025 22:30:57 WiFi sent:
    55AA000100247B2270223A226177336D64796B6F77796772726A6D32222C2276223A22312E302E30227D12
    //R 14/03/2025 22:30:59 WiFi received:
    55AA000200010305
    //S 14/03/2025 22:30:59 WiFi sent:
    55AA0002000001
    //R 14/03/2025 22:31:00 WiFi received:
    55AA000200010406
    //S 14/03/2025 22:31:00 WiFi sent:
    55AA0002000001
    //S 14/03/2025 22:31:00 WiFi sent:
    55AA001000010010
    //R 14/03/2025 22:31:01 WiFi received:
    55AA00100002010012
    //S 14/03/2025 22:31:01 WiFi sent:
    55AA0006000005
    //R 14/03/2025 22:31:01 WiFi received:
    55AA000600080119030E161F050577
    //S 14/03/2025 22:31:02 WiFi sent:
    55AA0005006701020004000000E1020200040000002D0402000400000000060200040000001E09040001000A020004000000320B020004FFFFFFF60C020004000000500D020004000000140E040001020F0400010211020004000000011702000400000000180200040000000017
    //R 14/03/2025 22:31:02 WiFi received:
    55AA000500010005
    //R 14/03/2025 22:32:04 WiFi received:
    55AA0001000000
    //S 14/03/2025 22:32:04 WiFi sent:
    55AA000100247B2270223A226177336D64796B6F77796772726A6D32222C2276223A22312E302E30227D12
    //R 14/03/2025 22:32:05 WiFi received:
    55AA000200010305
    //S 14/03/2025 22:32:05 WiFi sent:
    55AA0002000001
    //R 14/03/2025 22:32:06 WiFi received:
    55AA000200010406
    //S 14/03/2025 22:32:06 WiFi sent:
    55AA0002000001
    //S 14/03/2025 22:32:06 WiFi sent:
    55AA001000010010
    //R 14/03/2025 22:32:06 WiFi received:
    55AA00100002010012
    //S 14/03/2025 22:32:07 WiFi sent:
    55AA0006000005
    //R 14/03/2025 22:32:07 WiFi received:
    55AA000600080119030E16200A057D
    //S 14/03/2025 22:32:07 WiFi sent:
    55AA0005006701020004000000E1020200040000002D0402000400000000060200040000001E09040001000A020004000000320B020004FFFFFFF60C020004000000500D020004000000140E040001020F0400010211020004000000011702000400000000180200040000000017
    //R 14/03/2025 22:32:07 WiFi received:
    55AA000500010005
    //S 14/03/2025 22:33:09 WiFi sent:
    55AA000100247B2270223A226177336D64796B6F77796772726A6D32222C2276223A22312E302E30227D12
    //R 14/03/2025 22:33:09 WiFi received:
    55AA0001000000
    //R 14/03/2025 22:33:10 WiFi received:
    55AA000200010305
    //S 14/03/2025 22:33:10 WiFi sent:
    55AA0002000001
    //R 14/03/2025 22:33:11 WiFi received:
    55AA000200010406
    //S 14/03/2025 22:33:11 WiFi sent:
    55AA0002000001
    //S 14/03/2025 22:33:11 WiFi sent:
    55AA001000010010
    //R 14/03/2025 22:33:11 WiFi received:
    55AA00100002010012
    //S 14/03/2025 22:33:12 WiFi sent:
    55AA0006000005
    //R 14/03/2025 22:33:12 WiFi received:
    55AA000600080119030E16210F0583
    //S 14/03/2025 22:33:12 WiFi sent:
    55AA0005006701020004000000E5020200040000002D0402000400000000060200040000001E09040001000A020004000000320B020004FFFFFFF60C020004000000500D020004000000140E040001020F040001021102000400000001170200040000000018020004000000001B
    //R 14/03/2025 22:33:12 WiFi received:
    55AA000500010005
    


    And finaly the decoded log (remember, lines are inverted !!) :
    
    Received by WiFi module:
    55 AA   00   01      00 00      00   
    HEADER   VER=00   Product      LEN      CHK   
    
    Sent by WiFi module:
    55 AA   00   01      00 24   7B2270223A226177336D64796B6F77796772726A6D32222C2276223A22312E302E30227D   12   
    HEADER   VER=00   Product      LEN   {"p":"aw3mdykowygrrjm2","v":"1.0.0"}   CHK   
    
    Received by WiFi module:
    55 AA   00   02      00 01   03   05   
    HEADER   VER=00   McuConf      LEN   03   CHK   
    
    Sent by WiFi module:
    55 AA   00   02      00 00      01   
    HEADER   VER=00   McuConf      LEN      CHK   
    
    Received by WiFi module:
    55 AA   00   02      00 01   04   06   
    HEADER   VER=00   McuConf      LEN   04   CHK   
    
    Sent by WiFi module:
    55 AA   00   02      00 00      01   
    HEADER   VER=00   McuConf      LEN      CHK   
    
    Sent by WiFi module:
    55 AA   00   10      00 01   00   10   
    HEADER   VER=00   ObtainDPcache      LEN         CHK   
    
    Received by WiFi module:
    55 AA   00   10      00 02   0100   12   
    HEADER   VER=00   ObtainDPcache      LEN         CHK   
    
    Sent by WiFi module:
    55 AA   00   06      00 00      05   
    HEADER   VER=00   SetDP      LEN         CHK   
    
    Received by WiFi module:
    55 AA   00   06      00 08   0119030E161F0505   77   
    HEADER   VER=00   SetDP      LEN   bOk=1 25/3/14 22:31:5         CHK   
    
    Sent by WiFi module:
    55 AA   00   05      00 67   01020004000000E1020200040000002D0402000400000000060200040000001E09040001000A020004000000320B020004FFFFFFF60C020004000000500D020004000000140E040001020F04000102110200040000000117020004000000001802000400000000   17   
    HEADER   VER=00   Unk      LEN   dpId=1 Val V=225,dpId=2 Val V=45,dpId=4 Val V=0,dpId=6 Val V=30,dpId=9 Enum V=0,dpId=10 Val V=50,dpId=11 Val V=-10,dpId=12 Val V=80,dpId=13 Val V=20,dpId=14 Enum V=2,dpId=15 Enum V=2,dpId=17 Val V=1,dpId=23 Val V=0,dpId=24 Val V=0      CHK   
    
    Received by WiFi module:
    55 AA   00   05      00 01   00   05   
    HEADER   VER=00   Unk      LEN         CHK   
    
    Received by WiFi module:
    55 AA   00   01      00 00      00   
    HEADER   VER=00   Product      LEN      CHK   
    
    Sent by WiFi module:
    55 AA   00   01      00 24   7B2270223A226177336D64796B6F77796772726A6D32222C2276223A22312E302E30227D   12   
    HEADER   VER=00   Product      LEN   {"p":"aw3mdykowygrrjm2","v":"1.0.0"}   CHK   
    
    Received by WiFi module:
    55 AA   00   02      00 01   03   05   
    HEADER   VER=00   McuConf      LEN   03   CHK   
    
    Sent by WiFi module:
    55 AA   00   02      00 00      01   
    HEADER   VER=00   McuConf      LEN      CHK   
    
    Received by WiFi module:
    55 AA   00   02      00 01   04   06   
    HEADER   VER=00   McuConf      LEN   04   CHK   
    
    Sent by WiFi module:
    55 AA   00   02      00 00      01   
    HEADER   VER=00   McuConf      LEN      CHK   
    
    Sent by WiFi module:
    55 AA   00   10      00 01   00   10   
    HEADER   VER=00   ObtainDPcache      LEN         CHK   
    
    Received by WiFi module:
    55 AA   00   10      00 02   0100   12   
    HEADER   VER=00   ObtainDPcache      LEN         CHK   
    
    Sent by WiFi module:
    55 AA   00   06      00 00      05   
    HEADER   VER=00   SetDP      LEN         CHK   
    
    Received by WiFi module:
    55 AA   00   06      00 08   0119030E16200A05   7D   
    HEADER   VER=00   SetDP      LEN   bOk=1 25/3/14 22:32:10         CHK   
    
    Sent by WiFi module:
    55 AA   00   05      00 67   01020004000000E1020200040000002D0402000400000000060200040000001E09040001000A020004000000320B020004FFFFFFF60C020004000000500D020004000000140E040001020F04000102110200040000000117020004000000001802000400000000   17   
    HEADER   VER=00   Unk      LEN   dpId=1 Val V=225,dpId=2 Val V=45,dpId=4 Val V=0,dpId=6 Val V=30,dpId=9 Enum V=0,dpId=10 Val V=50,dpId=11 Val V=-10,dpId=12 Val V=80,dpId=13 Val V=20,dpId=14 Enum V=2,dpId=15 Enum V=2,dpId=17 Val V=1,dpId=23 Val V=0,dpId=24 Val V=0      CHK   
    
    Received by WiFi module:
    55 AA   00   05      00 01   00   05   
    HEADER   VER=00   Unk      LEN         CHK   
    
    Sent by WiFi module:
    55 AA   00   01      00 24   7B2270223A226177336D64796B6F77796772726A6D32222C2276223A22312E302E30227D   12   
    HEADER   VER=00   Product      LEN   {"p":"aw3mdykowygrrjm2","v":"1.0.0"}   CHK   
    
    Received by WiFi module:
    55 AA   00   01      00 00      00   
    HEADER   VER=00   Product      LEN      CHK   
    
    Received by WiFi module:
    55 AA   00   02      00 01   03   05   
    HEADER   VER=00   McuConf      LEN   03   CHK   
    
    Sent by WiFi module:
    55 AA   00   02      00 00      01   
    HEADER   VER=00   McuConf      LEN      CHK   
    
    Received by WiFi module:
    55 AA   00   02      00 01   04   06   
    HEADER   VER=00   McuConf      LEN   04   CHK   
    
    Sent by WiFi module:
    55 AA   00   02      00 00      01   
    HEADER   VER=00   McuConf      LEN      CHK   
    
    Sent by WiFi module:
    55 AA   00   10      00 01   00   10   
    HEADER   VER=00   ObtainDPcache      LEN         CHK   
    
    Received by WiFi module:
    55 AA   00   10      00 02   0100   12   
    HEADER   VER=00   ObtainDPcache      LEN         CHK   
    
    Sent by WiFi module:
    55 AA   00   06      00 00      05   
    HEADER   VER=00   SetDP      LEN         CHK   
    
    Received by WiFi module:
    55 AA   00   06      00 08   0119030E16210F05   83   
    HEADER   VER=00   SetDP      LEN   bOk=1 25/3/14 22:33:15         CHK   
    
    Sent by WiFi module:
    55 AA   00   05      00 67   01020004000000E5020200040000002D0402000400000000060200040000001E09040001000A020004000000320B020004FFFFFFF60C020004000000500D020004000000140E040001020F04000102110200040000000117020004000000001802000400000000   1B   
    HEADER   VER=00   Unk      LEN   dpId=1 Val V=229,dpId=2 Val V=45,dpId=4 Val V=0,dpId=6 Val V=30,dpId=9 Enum V=0,dpId=10 Val V=50,dpId=11 Val V=-10,dpId=12 Val V=80,dpId=13 Val V=20,dpId=14 Enum V=2,dpId=15 Enum V=2,dpId=17 Val V=1,dpId=23 Val V=0,dpId=24 Val V=0      CHK   
    
    Received by WiFi module:
    55 AA   00   05      00 01   00   05   
    HEADER   VER=00   Unk      LEN         CHK   
    
    


    And the description of the data from Dev Platform
    {
      "result": {
        "properties": [
          {
            "code": "temp_current",
            "custom_name": "",
            "dp_id": 1,
            "time": 1741990749816,
            "type": "value",
            "value": 220
          },
          {
            "code": "humidity_value",
            "custom_name": "",
            "dp_id": 2,
            "time": 1741990749816,
            "type": "value",
            "value": 45
          },
          {
            "code": "battery_percentage",
            "custom_name": "",
            "dp_id": 4,
            "time": 1741990749816,
            "type": "value",
            "value": 0
          },
          {
            "code": "temp_sampling",
            "custom_name": "",
            "dp_id": 6,
            "time": 1741990749816,
            "type": "value",
            "value": 30
          },
          {
            "code": "charge_state",
            "custom_name": "",
            "dp_id": 8,
            "time": 1741985503397,
            "type": "bool",
            "value": false
          },
          {
            "code": "temp_unit_convert",
            "custom_name": "",
            "dp_id": 9,
            "time": 1741990749816,
            "type": "enum",
            "value": "c"
          },
          {
            "code": "maxtemp_set",
            "custom_name": "",
            "dp_id": 10,
            "time": 1741990749816,
            "type": "value",
            "value": 50
          },
          {
            "code": "minitemp_set",
            "custom_name": "",
            "dp_id": 11,
            "time": 1741990749816,
            "type": "value",
            "value": -10
          },
          {
            "code": "maxhum_set",
            "custom_name": "",
            "dp_id": 12,
            "time": 1741990749816,
            "type": "value",
            "value": 80
          },
          {
            "code": "minihum_set",
            "custom_name": "",
            "dp_id": 13,
            "time": 1741990749816,
            "type": "value",
            "value": 20
          },
          {
            "code": "temp_alarm",
            "custom_name": "",
            "dp_id": 14,
            "time": 1741990749816,
            "type": "enum",
            "value": "cancel"
          },
          {
            "code": "hum_alarm",
            "custom_name": "",
            "dp_id": 15,
            "time": 1741990749816,
            "type": "enum",
            "value": "cancel"
          },
          {
            "code": "temp_periodic_report",
            "custom_name": "",
            "dp_id": 17,
            "time": 1741990749816,
            "type": "value",
            "value": 1
          },
          {
            "code": "temp_calibration",
            "custom_name": "",
            "dp_id": 23,
            "time": 1741990749816,
            "type": "value",
            "value": 0
          },
          {
            "code": "hum_calibration",
            "custom_name": "",
            "dp_id": 24,
            "time": 1741990749816,
            "type": "value",
            "value": 0
          }
        ]
      },
      "success": true,
      "t": 1741990769193,
      "tid": "65733805012211f0bdf7c612b69bb704"
    }


    Also, in the debug log you can see that the wifi module is restarted every minutes... it seems it's the update delay for the device to send data to Tuya App.
    Is it the normal behavior or some failure ? I do not know !

    BTW, I reinstalled Openbeken firmware 1.18.60 and I have no communication between the MCU and the module.
    I really do not know why, communication works only on the really first openbeken firmware flash.

    Also, wifi watchdog does not want to stop if I click on disable and restart.

    EDIT : Ok, I understand.
    Even if the device is connected to main through USB, device is considered as a "low consumption" device. With Tuya App, I have a notification about low battery power even if USB powered. Also, power of the module is controlled by the MCU, RST and CEN are connected to PA15 of the HC32L136K8TA MCU.
    Also, I need tmSensor driver and everything works correclty, I just need to route dpIDs.
    Last, as the device restart often and stay very little time, OpenBeken considered fast reboot and goes to safe mode.
    I wil edit my first post for a complete teardown.
  • ADVERTISEMENT
  • #7 21500432
    damiengaignon
    Level 4  
    Ok, I managed to get it working.
    I have updated the first post.

Topic summary

The discussion revolves around the AVATTO WHS20 Smart Temperature & Humidity Sensor, which utilizes a CB3S module (BK7231N) and communicates with an HDSC HC32L136K8TA MCU. Users explore the device's functionality, particularly its compatibility with TuyaMCU, and troubleshoot communication issues. Initial attempts to establish a connection with the Tuya App and log data from the device reveal challenges, including baud rate adjustments and potential hardware damage. Ultimately, the author successfully reflashes the original firmware, connects to the Tuya App, and shares debug logs indicating operational status.
Summary generated by the language model.
ADVERTISEMENT