logo elektroda
logo elektroda
X
logo elektroda

Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research

MrGenius 1269 123
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #61 21432560
    p.kaczmarek2
    Moderator Smart Home
    It seems to be in:
    xr806_sdk\include\kernel\FreeRTOS\FreeRTOSv10.2.1\semphr.h
    So it's not enabled?

    Added after 33 [seconds]:

    Any ideas how to enable FreeRTOS for this project in XR806 SDK?

    Added after 6 [minutes]:

    Update:
    Maybe it's just that include was missing in new_common.h ... but this brings question how did it even work on XR809 in the first place.
    Code: C / C++
    Log in, to see the code
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #62 21432566
    divadiow
    Level 34  
    anything to do with this in menuconfig?


    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research

    Added after 5 [minutes]:

    toggling freertos used off/on changes this file xr806_sdk\xr806_sdk\.config


    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
  • #63 21432580
    p.kaczmarek2
    Moderator Smart Home
    How do you enter menuconfig for a given project?
    Helpful post? Buy me a coffee.
  • #64 21432585
    divadiow
    Level 34  
    hmm. dunno. that change doesn't seem to reference anything in the project:


    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
  • #65 21432592
    p.kaczmarek2
    Moderator Smart Home
    It looks like it has FreeRTOS, but configENABLE_BACKWARD_COMPATIBILITY is 0

    Added after 15 [minutes]:

    SemaphoreHandle_t is not recognized still.
    semphr.h is not included?

    Or maybe I just need to add following to new_common.h:
    Code: C / C++
    Log in, to see the code


    Added after 6 [minutes]:

    First HAL issue?
    
    ../shared/src/hal/xr809/hal_flashConfig_xr809.c: In function 'HAL_Configuration_GenerateMACForThisModule':
    ../shared/src/hal/xr809/hal_flashConfig_xr809.c:78:16: error: 'EFPG_FIELD_MAC' undeclared (first use in this function); did you mean 'EFPG_FIELD_UA'?
      if (efpg_read(EFPG_FIELD_MAC, out) == 0) {
                    ^~~~~~~~~~~~~~
                    EFPG_FIELD_UA
    ../shared/src/hal/xr809/hal_flashConfig_xr809.c:78:16: note: each undeclared identifier is reported only once for each function it appears in
    


    Added after 2 [minutes]:

    I reached the linker error stage, it does not look like too bad:
    
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../../../../project/common/startup/gcc/retarget.o: in function `hardware_init_hook':
    /mnt/w/git/xr806_sdk/project/demo/wlan_demo/gcc/../../../../project/common/startup/gcc/retarget.c:53: undefined reference to `board_ioctl'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/new_pins.o: in function `Button_OnInitialPressDown':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/new_pins.c:423: undefined reference to `LED_NextColor'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/new_pins.o: in function `Button_OnDoubleClick':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/new_pins.c:526: undefined reference to `LED_NextColor'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/httpserver/new_http.o: in function `HTTP_ProcessPacket':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/httpserver/new_http.c:801: undefined reference to `http_basic_auth_run'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/httpserver/new_http.c:809: undefined reference to `http_basic_auth_run'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/mqtt/new_mqtt.o: in function `MQTT_DoItemPublish':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/mqtt/new_mqtt.c:1931: undefined reference to `LWIP_GetActiveSockets'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_main.o: in function `CMD_Init_Early':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_main.c:928: undefined reference to `CMD_If'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_newLEDDriver.o: in function `nextColor':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_newLEDDriver.c:1482: undefined reference to `LED_NextColor'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_newLEDDriver.o: in function `sendColorChange':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_newLEDDriver.c:448: undefined reference to `MQTT_PublishMain_StringString_DeDuped'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_newLEDDriver.o: in function `LED_SendEnableAllState':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_newLEDDriver.c:470: undefined reference to `MQTT_PublishMain_StringInt_DeDuped'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_newLEDDriver.o: in function `sendFinalColor':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_newLEDDriver.c:496: undefined reference to `MQTT_PublishMain_StringString_DeDuped'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_newLEDDriver.o: in function `LED_SendDimmerChange':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_newLEDDriver.c:503: undefined reference to `MQTT_PublishMain_StringInt_DeDuped'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_newLEDDriver.o: in function `sendTemperatureChange':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_newLEDDriver.c:506: undefined reference to `MQTT_PublishMain_StringInt_DeDuped'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_newLEDDriver.o: in function `sendFullRGBCW_IfEnabled':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_newLEDDriver.c:467: undefined reference to `MQTT_PublishMain_StringString_DeDuped'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_newLEDDriver.o: in function `NewLED_InitCommands':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_newLEDDriver.c:1635: undefined reference to `commandSetPaletteColor'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_tokenizer.o: in function `Tokenizer_GetArg':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_tokenizer.c:170: undefined reference to `CMD_ExpandConstantsWithinString'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_tokenizer.c:187: undefined reference to `CMD_ExpandConstant'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/cmnds/cmd_tokenizer.o: in function `Tokenizer_TokenizeString':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_tokenizer.c:344: undefined reference to `CMD_ExpandConstantsWithinString'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/cmnds/cmd_tokenizer.c:355: undefined reference to `CMD_ExpandConstantsWithinString'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/user_main.o: in function `Main_Init_AfterDelay_Unsafe':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/user_main.c:1129: undefined reference to `HAL_Configure_WDT'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: ../shared/src/user_main.o: in function `Main_OnEverySecond':
    /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/user_main.c:625: undefined reference to `MQTT_Dedup_Tick'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/user_main.c:751: undefined reference to `LWIP_GetActiveSockets'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/user_main.c:751: undefined reference to `LWIP_GetMaxSockets'
    /mnt/w/GIT/xr806_sdk/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc/../shared/src/user_main.c:907: undefined reference to `HAL_Run_WDT'
    collect2: error: ld returned 1 exit status
    make[1]: *** [../../../../project/project.mk:441: sharedApp.elf] Error 1
    make[1]: Leaving directory '/mnt/w/git/xr806_sdk/project/demo/sharedApp/gcc'
    make: *** [../../../../project/project.mk:430: __all] Error 2


    Added after 1 [hours] 39 [minutes]:

    Finally!

    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research

    Added after 17 [minutes]:

    Still a lot of missing:
    
    
    use default flash chip mJedec 0x0
    [FD I]: mode: 0x10, freq: 96000000Hz, drv: 0
    [FD I]: jedec: 0x0, suspend_support: 1
    mode select:e
    
    wlan information ===================================================
    firmware:
        version : R0-XR_C07.08.52.67_ULP_R_02.132 Jan 10 2023 19:14:11-Y02.132 
        buffer  : 8
    driver:
        version : XR_V02.06.10
    mac address:
        in use        : 1c:01:6f:c0:e0:79
        in use        : 1c:01:6f:c0:e0:7a
    ====================================================================
    
    wlan mode:a
    
    platform information ===============================================
    XR806 SDK v1.2.2  Feb  9 2025 23:14:19 63401410
    
    heap space [0x234ad0, 0x24bc00), size 94512
    
    cpu  clock 160000000 Hz
    HF   clock  40000000 Hz
    
    sdk option:
        XIP           : enable
        INT LF OSC    : enable
        INT LDO       : select
        INT LDO / EXT PWR: enable
        SIP flash     : enable
    
    mac address:
        efuse         : 80:74:84:69:04:75
        in use        : 1c:01:6f:c0:e0:79
    ====================================================================
    
    [HAL] uart 0 is inited
    PRJCONF_SYSINFO_ADDR 1044480
    
    SYSINFO_SSID_LEN_MAX 32
    
    Entering initLog()...
    
    [os E] OS_ThreadCreate():48, handle 0x252000
    create "log_serial" thread failed!
    
    Commands registered!
    
    initLog() done!
    
    Info:MAIN:Main_Init_Before_Delay
    Warn:CFG:CFG_InitAndLoad: Config crc or ident mismatch. Default config will be loaded.
    Info:CFG:CFG_SetDefaultLEDCorrectionTable: setting defaults
    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
    
    Info:MAIN:Main_Init_Delay done
    
    Main_Init_Delay done
    
    [os E] OS_ThreadCreate():48, handle 0x252000
    create "TCP_server" thread failed!
    
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:Using SSID []
    Info:MAIN:Using Pass []
    Info:MQTT:MQTT_RegisterCallback called for bT oxr00000000/ subT oxr00000000/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT xr809s/ subT xr809s/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/oxr00000000/ subT cmnd/oxr00000000/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/xr809s/ subT cmnd/xr809s/+
    Info:MQTT:MQTT_RegisterCallback called for bT oxr00000000/ subT oxr00000000/+/get
    Error:CMD:cmd startScript NOT found (args autoexec.bat)
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Time 1, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 2, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 3, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 4, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 5, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    en1: CTRL-EVENT-TERMINATING 
    WAR join_status:0
    interface name: en1
    Using interface en1 with hwaddr 1c:01:6f:c0:e0:79 and ssid "AP-XRADIO"
    en1: interface state UNINITIALIZED->ENABLED
    en1: AP-ENABLED 
    en1: AP-DISABLED 
    [net INF] msg <wlan connected>
    [net INF] netif is link up
    [net INF] bring up netif
    [net INF] netif (IPv4) is up
    [net INF] address: 192.168.51.1
    [net INF] gateway: 192.168.51.1
    [net INF] netmask: 255.255.255.0
    [net INF] msg <network up>
    vif0, AP/GO mode THROTTLE=38
    en1: interface state ENABLED->DISABLED
    [net INF] msg <wlan disconnected>
    [net INF] netif is link down
    Using interface en1 with hwaddr 1c:01:6f:c0:e0:79 and ssid "OpenXR809_00000000"
    en1: interface state DISABLED->ENABLED
    en1: AP-ENABLED 
    [net INF] msg <wlan connected>
    [net INF] netif is link up
    WAR [WM] Drop frame (0x0008).
    [net INF] netif is already up
    vif0, AP/GO mode THROTTLE=38
    Info:MAIN:Time 6, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:MAIN:Time 7, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 8, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 9, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 10, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 11, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 12, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 13, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 14, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 15, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 16, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 17, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 18, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 19, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 20, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 21, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 22, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 23, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 24, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 25, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    xr_newassoc(): link_id:0 mac:e4:b3:18:f6:91:cc
    en1: STA e4:b3:18:f6:91:cc IEEE 802.11: associated
    en1: AP-STA-CONNECTED e4:b3:18:f6:91:cc
    Info:MAIN:Time 26, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 27, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 28, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 29, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 30, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 31, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 32, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 33, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 34, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 35, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 36, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 37, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 38, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 39, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 40, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 41, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 42, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    Info:MAIN:Time 43, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 0/0 
    
    


    Added after 13 [minutes]:

    Current wraper backup attached. Use it like shown:
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
    Helpful post? Buy me a coffee.
  • #66 21432834
    p.kaczmarek2
    Moderator Smart Home
    For now, there is still a WiFi connection problem:
    
     
    socks 0/0 
                                                                        
    Info:MAIN:Time 179, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 180, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    xr_newassoc(): link_id:0 mac:e4:b3:18:f6:91:cc
                                     
    en1: STA e4:b3:18:f6:91:cc IEEE 802.11: associated
                                 
    en1: AP-STA-CONNECTED e4:b3:18:f6:91:cc
                                            
    Info:MAIN:Time 181, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 182, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 183, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    WAR drop=1135, fctl=0x00d0.
                                                        
    Info:MAIN:Time 184, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 185, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 186, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 187, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    xr_newassoc(): link_id:1 mac:e4:b3:18:f6:91:cc
                                     
    en1: STA e4:b3:18:f6:91:cc IEEE 802.11: associated
                                 
    Info:MAIN:Time 188, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    WAR drop=1135, fctl=0x00d0.
                                                        
    xr_newassoc(): link_id:1 mac:e4:b3:18:f6:91:cc
                                     
    en1: STA e4:b3:18:f6:91:cc IEEE 802.11: associated
                                 
    Info:MAIN:Time 189, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 190, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 191, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 192, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 193, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 194, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 195, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 196, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 197, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 198, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 199, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 200, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                        
    Info:MAIN:Time 201, idle 0/s, free 0, MQTT 0(0), bWifi 0, secondsWithNoPing -1, 
    socks 0/0 
                                                                    
    
    
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #67 21433075
    divadiow
    Level 34  
    awesome progress dude. I will source an XR806 asap.
  • #68 21435705
    MrGenius
    Level 6  
    Found another Open Source Project around the XR806. Maybe we can look stuff up from there?
    https://github.com/YuzukiHD/TinyMaix-XR806

    divadiow wrote:
    awesome progress dude. I will source an XR806 asap.

    I ordered some through Superbuy. But this will take years I believe....
  • ADVERTISEMENT
  • #69 21435819
    p.kaczmarek2
    Moderator Smart Home
    That's just the same XR806 SDK we have, just with extra TinyMaix example. Nothing new here.

    For now, we need to review code to check why WiFi connection does not finish. We can also try making a separate, tiny WiFi connection demo and compare stuff step by step.

    The HAL code is 99.9% the same as XR809, so it's already ready and it compiles.

    Still, I would also need another XR806, maybe I could do NodeMCU hack for XR806....

    Added after 1 [minutes]:

    PS: All this HAL compiled for me:
    https://github.com/openshwprojects/OpenBK7231T_App/tree/main/src/hal/xr809
    With just little changes:
    https://github.com/openshwprojects/OpenBK7231...mmit/dd75d3f7731b617559c159cddfa1c2cec7cb05a4
    Helpful post? Buy me a coffee.
  • #70 21435829
    divadiow
    Level 34  
    MrGenius wrote:
    I ordered some through Superbuy. But this will take years I believe....

    I went for one too as I've a collection of bits in the warehouse there waiting to come over. Still, it'll be 3 weeks at least before arriving in the UK I fear

    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
  • #71 21482522
    divadiow
    Level 34  
    XR809 Tuya kits
    Code: Text
    Log in, to see the code


    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
  • ADVERTISEMENT
  • #73 21494477
    Majkyy98
    Level 11  
    And what would the situation be with a thermostat from Orno on a WXU module? After a private conversation with @p.kaczmarek2 I was directed here to the thread with the XR809.

    The manufacturer/distributor of the whole unit is Orno, with the Wi-Fi module board and other components inside. I am attaching pictures in the attachments of what this module looks like.
    After inserting the battery and setting the time, the unit calibrates itself, then you can connect to the Tuya Smart app.

    I also found a complete datasheet of the module.
    https://developer.tuya.com/en/docs/iot/wxu-module-datasheet?id=Kc2xk9qlk04so


    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research .
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research .
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research .
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research .
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research .
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research .
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research .
  • #74 21494997
    divadiow
    Level 34  
    cool. another WXU/XR806. You'll probably have noticed from a review of previous posts on this thread that there is no working alternative firmware for XR806 at the moment.

    Did you manage/try to get boot log and/or firmware dump as with the TRV before?
  • #75 21495294
    p.kaczmarek2
    Moderator Smart Home
    OpenBeken boots on XR806 but WiFi is not stable, futher work is needed
    Helpful post? Buy me a coffee.
  • #77 21502245
    p.kaczmarek2
    Moderator Smart Home
    I can try to upload my work and let you verify my workflow if you have time. Maybe we could put that on Github
    Helpful post? Buy me a coffee.
  • #78 21502313
    divadiow
    Level 34  
    >>21502245

    yes, sure. I've mostly forgotten what happened a few weeks ago, but it'll give me something to try I guess

    Added after 1 [hours] 5 [minutes]:

    >>21429278
    labelled these bits

    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research


    PB02 grounded and flash read success
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research

    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
  • #79 21502479
    MrGenius
    Level 6  
    All hope on you guys. These WXU devices seem to have a different Tuya OS also.
    They are not answering on Ping, and not answering on Port 6668. So no Localtuya either.
  • #80 21524126
    p.kaczmarek2
    Moderator Smart Home
    WiFi issue is still present, but I added XR806 to online builds:
    https://github.com/openshwprojects/OpenBK7231...mmit/5d09349b9dc749638b0a6c31c80b880ebe0d90f2
    Not really useful right now, but can help with development.
    Helpful post? Buy me a coffee.
  • #81 21524158
    divadiow
    Level 34  
    Great. Will flash to my WXU as soon as I can.

    The XR806 modules from Taobao went out of stock eventually and my order got cancelled, so I'm still without a dev board.
  • #82 21524182
    p.kaczmarek2
    Moderator Smart Home
    What's the estimate of when you can check that? I'm short on time and it would certainly help to make sure that this online build actually works.
    Helpful post? Buy me a coffee.
  • #83 21524185
    divadiow
    Level 34  
    Mid-afternoon BST.

    Added after 1 [hours] 33 [minutes]:

    Tuya XR806 layout vs OpenXR806 for the record
    PhoenixMC program window version 3.1.23215d with a selected thermostat firmware file.
    Screenshot of the PhoenixMC program with an open firmware file and a list of sections to update.
  • #84 21524320
    p.kaczmarek2
    Moderator Smart Home
    If flashing and online builds are working for XR806, then maybe we can try to brute-force the issue.
    Helpful post? Buy me a coffee.
  • #85 21524328
    divadiow
    Level 34  
    as in transplant Tuya RF partitions to OpenXR806 to see if this makes any difference? If that, yes, I would like to try that
  • #86 21524365
    p.kaczmarek2
    Moderator Smart Home
    No, not RF transplant. I don't think we need it. I think it's a matter of SDK configuration.
    Helpful post? Buy me a coffee.
  • #87 21524434
    divadiow
    Level 34  
    boots but no GUI for me. yes, 192.168.51.1.

    is this the cause

    Code: Text
    Log in, to see the code


    Code: Text
    Log in, to see the code
  • #88 21524436
    p.kaczmarek2
    Moderator Smart Home
    Huh? I was sure the thread is created. Strange. It's XR806, are you sure? The one from @MrGenius thermostat?
    Helpful post? Buy me a coffee.
  • #89 21524437
    divadiow
    Level 34  
    yes. I've power-cycled a few times. will do more. Wifi is strong and stable
    Screenshot of Wi-Fi settings for the OpenXR806_00000000 network, displaying connection details and network properties.

    Added after 1 [minutes]:

    p.kaczmarek2 wrote:
    It's XR806, are you sure? The one from @MrGenius thermostat?

    yes, WXU

    Added after 6 [minutes]:

    Code: Text
    Log in, to see the code


    Code: Text
    Log in, to see the code


    Added after 24 [minutes]:

    no GUI with this btw https://github.com/openshwprojects/OpenBK7231T_App/actions/runs/14550245013

    Code: Text
    Log in, to see the code
  • #90 21524465
    p.kaczmarek2
    Moderator Smart Home
    ah I was confused by variable names. It's the log server thread that fails. I know about it.

    HTTP server thread is created, but for some reason nothing is received. I'm aware about it.

    So you can open connection to port 80 but it sends nothing?
    Helpful post? Buy me a coffee.

Topic summary

The discussion centers on the Tuya WXU module, specifically the XR806 SoC used in TRV heater devices, exploring firmware flashing, SDK usage, and custom firmware development. The XR806 differs from the XR809 notably by including WiFi and BLE capabilities and having 320 KB SRAM versus 288 KB in XR806 specs. Participants shared boot logs, teardown procedures, and hardware photos, confirming the XR806's WiFi presence and SDK version 1.2.2. Efforts to flash custom firmware such as OpenBK7231T_App and OpenXR806 were documented, with challenges including UART synchronization errors, thread creation failures, and unstable WiFi connections. The XR806 SDK was used for compiling demos like hello_demo and wlan_demo, with configuration via make menuconfig to enable WiFi features and FreeRTOS. Issues with missing headers, build environment setup (WSL, GCC toolchain), and SDK path configurations were addressed. A key breakthrough was identifying HTTP basic authentication enabled by default on XR806, blocking HTTP server responses, which was resolved by disabling or clearing the web password. Flash memory configuration was adjusted to a free offset (0x1FC000) to enable saving settings. Despite progress, WiFi stability and full TRV functionality remain under development. Community members sourced XR806 modules from various suppliers and shared open-source projects like TinyMaix-XR806 for reference. The discussion also touched on porting HAL code from XR809 to XR806 due to high similarity, and ongoing efforts to integrate XR806 support into OpenBK7231T_App with online builds. The overall progress marks the first successful custom firmware boot and HTTP server operation on XR806-based WXU modules, paving the way for further development and device control.
Summary generated by the language model.
ADVERTISEMENT