logo elektroda
logo elektroda
X
logo elektroda

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

MrGenius 6276 124
Best answers

How can I make a Tuya WXU/TRV device work with XR806 firmware?

OpenBeken/OpenXR806 does boot on XR806, and by April the thread confirms a custom HTTP page was running on the WXU/XR806 for the first time; the main remaining problems were Wi‑Fi stability and getting settings to persist [#21524637] [#21524126] The first bootable path came from building against the XR806 SDK (the shared repo was published at `github.com/divadiow/xr806_sdk`), using the SDK’s `make menuconfig`/build flow and enabling the right Wi‑Fi options; once built, the firmware printed normal XR806 boot logs and the device could be flashed successfully [#21429402] [#21430649] [#21430654] [#21430812] Flash/download mode on this board appears to need only `PB02` pulled low, not the XR809-style `PB02+PB03` combination [#21530921] Config storage was later fixed by moving `sysinfo` to `0x1FC000`, which let OBK save its config; that still left about 12 KB free at the end of the 2 MB flash [#21525228] [#21533999] Even after that, the thread still reported unstable Wi‑Fi/HTTP behavior and no fully finished TRV port yet [#21524434] [#21524467] [#21524739]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21429134
    MrGenius
    Level 7  
    Posts: 9
    Help: 3
    Rate: 6
    >>21148651
    Anybody was able to make it work with the XR806?
    Just came across a TRV heater device, which is using the Tuya WXU chip. My research is pointing to XR806.
  • ADVERTISEMENT
  • #2 21429143
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    MrGenius wrote:
    Anybody was able to make it work with the XR806?


    The normal XR806 definitely doesn't have wifi, but this T103C-HL on the WXU module clearly states it does. Maybe some Tuya-specific variation. It already has different SRAM to normal XR806

    Code: Text
    Log in, to see the code


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

    Here's the boot log from a WXU from a posting on Discord:

    Code: Text
    Log in, to see the code


    You could always try dumping existing firmware and trying OpenXR809 I guess
  • #3 21429176
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    I may have such device from @MrGenius , but I didn't do teardown yet.
    Helpful post? Buy me a coffee.
  • #4 21429196
    MrGenius
    Level 7  
    Posts: 9
    Help: 3
    Rate: 6
    I found some hits when searching for the XR806, mentioning this: Allwinnertech XR806 Wi-Fi+BLE5.0
    The documentation i found for that, is listing the same amount of SRAM, Flash and existing Wifi + BLE!? At least on the paper, the same specs as WXU.
  • #5 21429205
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    @MrGenius I remember you saying that you know how to open this device, can you share info?

    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
    Helpful post? Buy me a coffee.
  • #6 21429214
    MrGenius
    Level 7  
    Posts: 9
    Help: 3
    Rate: 6
    It was actually very easy to open:

    - You pull off the plastic turning wheel with some careful force. Just pull it off.
    - then you can pull off the whole round cover, which is covering the batteries.
    - Next, you clip out with a small a screwdriver the display
    - then you can open the 3 small screws on top to pull out the board.

    If i get home, i might be able to get you more pictures. But I am sure you will manage that ;)
  • ADVERTISEMENT
  • #7 21429243
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    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
    Bootlog:
    
    main_task_start : 62
    [bl] start
    [bl] iímain_task_start : 62
    [bl] start
    [bl] img seq 0, state 1
    [bl] no trustzone feature !
    [bl] bl_load_bin_by_id(), id 0xa5fe5a01
    [bl] bl_load_bin_by_id() cost 11 ms
    [bl] goto 0x201101
    __read_manage_block: mag->blockid=255, id=0, mag->state=255.
    __read_manage_block: mag->magic=0xffffffff, rescrc=0x00000000, mag->crc32=0xffffffff.
    __read_manage_block: mag->blockid=255, id=1, mag->state=255.
    __read_manage_block: mag->magic=0xffffffff, rescrc=0x00000000, mag->crc32=0xffffffff.
    _judge_ota_info checkerr0:1, checkerr1:1
    main_task_start : 62
    PMA: aux_pm_inituse default flash chip mJedec 0x0
    [FD I]: mode: 0x10, freq: 96000000Hz, drv: 0
    [FD I]: jedec: 0x0, suspend_support: 1
    [FD I] blk protect init ok
    **********wlan_mode:0
    [XR-80211] channel switching report, use N/BG rates --20231212v3
    [XR-80211]:FIX SCAN RSSI, sample count: 5, marker: 255
    Driver:delay scan complete, change link loss count, CMD_timeout send HANG, add filter function and bss lost thold,not DTIM count if disable mcast recv, assoc listen intval 50, rx stay awake perf, cmd force trydz tmo, rx wakelock 25ms --20240312v27
    
    wlan information ===================================================
    firmware:
        version : R0-XR_C07.08.52.67_ULP__02.138TY-SetNoise-SyncFilt-FltIGMP Dec  5 2023 15:27:52-Y02.138TY-SetNoise-SyncFilt-FltIGMP 
        buffer  : 8
    driver:
        version : XR_V02.05
    mac address:
        in use        : 38:a5:c9:3f:46:49
        in use        : 38:a5:c9:3f:46:4a
    ====================================================================
    
    [wpa] add wpas_terminal flag--20230508v1
    
    platform information ===============================================
    XR806 SDK v1.2.1  Jul 30 2024 14:29:27 63401410
    
    heap space [0x21e64c, 0x24bc00), size 185780
    
    cpu  clock 160000000 Hz
    HF   clock  40000000 Hz
    
    sdk option:
        XIP           : enable
        INT LF OSC    : enable
        INT LDO       : select
        ILDO/EPWR     : enable
        SIP flash     : enable
    
    mac address:
        efuse         : 80:74:84:69:04:75
        in use        : 38:a5:c9:3f:46:49
    ====================================================================
    
    SystemStartupState=0
    chip=48086	A=13
    argv_int[0]:8
    argv_int[1]:52
    argv_int[2]:70
    argv_int[3]:66
    argv_int[4]:62
    argv_int[5]:12
    argv_int[6]:11
    argv_int[7]:8
    power_b:369098752 power_gn:1074003968 power_mcs7:-1878455536
     init_rf_param succ
    [01-01 00:00:00 ty I][tal_thread.c:184] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:3
    [01-01 00:00:00 ty I][tal_thread.c:184] thread_create name:wq_system,stackDepth:5120,totalstackDepth:9216,priority:2
    [01-01 00:00:00 ty I][tal_thread.c:184] thread_create name:wq_highpri,stackDepth:4096,totalstackDepth:13312,priority:3
    tkl_thread_create:59 thread name:tuya_app_main
    set force ps:1 100000 success
    $ tkl_watchdog_init interval_ms(16000)!
    WatchDog ResetMode Started, set timeout: 16
    [01-01 00:00:00 ty I][tal_thread.c:184] thread_create name:health_monitor,stackDepth:3072,totalstackDepth:16384,priority:3
    [01-01 00:00:00 ty I][mqc_app.c:429] mqc app init ...
    [01-01 00:00:00 ty E][log_seq.c:867] logseq empty
    [01-01 00:00:00 ty I][lpmgr.c:743] time:2000, g_cpu_sleep:2000
    [wifi_adapter]: wifi_set_pm_dtim:20, immediate:1 beacon_cnt:5
    $ -----wifi_set_pm_dtim:899 find_id:-1
    $ [01-01 00:00:00 ty N][tbl_common_user_main.c:594] < TuyaOS V:3.6.3 BS:40.00_PT:2.3_LAN:3.5_CAD:1.0.5_CD:1.0.0 >
    < BUILD AT:2024_07_18_19_55_22 BY ci_manage FOR tuyaos-lite-sdk AT xr806 >
    IOT DEFS < WIFI_GW:1 DEBUG:0 KV_FILE:0 LITTLE_END:1 SL:0 OPERATING_SYSTEM:98 RELIABLE_TRANSFER:0 >
    
    rst_reason=0
    [01-01 00:00:00 ty N][tbl_common_user_main.c:595] reset_reason:0
    [01-01 00:00:00 ty N][tbl_common_user_main.c:596] xr806_lowpower_common_ty:1.1.4
    [01-01 00:00:00 ty N][simple_flash.c:446] key_addr: 0x1f5000   block_sz 4096
    [01-01 00:00:00 ty N][simple_flash.c:532] get key:
    [01-01 00:00:00 ty N][tuya_tls.c:852] uni_random_init...
    [01-01 00:00:00 ty N][tuya_tls.c:279] tuya_tls_rand_init ok!
    [01-01 00:00:00 ty N][tuya_wifi_connect.c:329] mf is open need stop fastconnect
    tkl_system_malloc big memory, size(4200)!
    tkl_wifi_set_work_mode:697 mode:1
    tkl_system_malloc big memory, size(4168)!
    [01-01 00:00:00 ty N][tbl_common_tuya_main.c:385] mf_init succ
    [01-01 00:00:00 ty N][tdl_send_data_queue.c:355] uart queue sever queue num is :20
    [01-01 00:00:00 ty N][tbl_common_basic_service.c:1782] addr:2273816 13
    [01-01 00:00:00 ty N][tbl_common_basic_service.c:528] set sleep mode 1
    [01-01 00:00:00 ty N][tbl_common_basic_service.c:541] set wk pin:20
    tkl_cpu_sleep_mode_set: en = 1, mode = 0
    pmu_release_wakelock(PMU_OS)
    tkl_cpu_sleep_mode_set: en = 1, mode = 0
    tkl_cpu_sleep_mode_set: en = 0, mode = 0
    [wifi_adapter]: wifi_set_pm_dtim:10, immediate:1 beacon_cnt:3
    $ -----wifi_set_pm_dtim:899 find_id:-1
    $ [01-01 00:00:00 ty N][tbl_lp_manage.c:529] wake pin 20  level 0
    [01-01 00:00:00 ty N][tbl_lp_manage.c:530] wake pin 28  level 0
    [01-01 00:00:00 ty N][tbl_common_public_iot.c:933] MCU ver:1.1.0
    [01-01 00:00:00 ty N][tuya_wifi_link.c:87] start wifi link params validate, nc_tp:10 md:0
    [01-01 00:00:00 ty N][tuya_wifi_link.c:109] gw_wsm.nc_tp:10
    [01-01 00:00:00 ty N][tuya_wifi_link.c:110] gw_wsm.md:0
    [01-01 00:00:00 ty E][tuya_wifi_reset.c:638] read wf start mode err:-6
    [01-01 00:00:00 ty N][tuya_svc_devos.c:509] Last reset reason: 0
    [01-01 00:00:00 ty N][tuya_svc_devos.c:306] gw_cntl->gw_wsm.stat:0
    [01-01 00:00:00 ty N][tuya_svc_devos.c:358] gw_cntl->gw_if.abi:0 input:0
    [01-01 00:00:00 ty N][tuya_svc_devos.c:359] gw_cntl->gw_if.product_key:ihedujbuli6hsx9b, input:ihedujbuli6hsx9b
    [01-01 00:00:00 ty N][tuya_svc_devos.c:360] gw_cntl->gw_if.tp:0, input:0
    [01-01 00:00:00 ty N][tuya_svc_devos.c:363] gw_cntl->gw_if.firmware_key:key5nkpphq7huej7, input:key5nkpphq7huej7
    [01-01 00:00:01 ty N][tuya_svc_devos.c:538] enter success_proc
    [01-01 00:00:01 ty N][tuya_svc_devos.c:541] serial_no:38a5c93f4649
    [01-01 00:00:01 ty N][tbl_common_basic_service.c:633] get_dev_info ok memrory left:85635
    PMA: pm freeze task no exist
    [01-01 00:00:01 ty E][tuya_wifi_reset.c:638] read wf start mode err:-6
    tkl_wifi_set_work_mode:697 mode:3
    [wifi_adapter]: wifi_on old mode 0,new mode 1
    en1: CTRL-EVENT-TERMINATING 
    WAR join_status:0
    interface name: en1
    setmlme_common lock
    setmlme_common unlock
    setmlme_common lock
    setmlme_common unlock
    Using interface en1 with hwaddr 38:a5:c9:3f:46:49 and ssid "AP-XRADIO"
    en1: interface state UNINITIALIZED->ENABLED
    en1: AP-ENABLED 
    [net INF] msg <wlan connected>
    [net INF] netif is link up
    [net INF] netif is already down
    [net INF] bring up netif
    [user ERR] Error cmd:63
    [wifi_adapter]: exec failed
    [wifi_adapter]: wifi on exit
    [net INF] netif (IPv4) is up
    [net INF] address: 192.168.176.1
    [net INF] gateway: 192.168.176.1
    [net INF] netmask: 255.255.255.0
    wlp_net_ctrl_msg_proc:0
    not sta, mode:1
    [net INF] msg <network up>
    [net INF] dhcp addr start: 192.168.176.2
    [net INF] dhcp addr end: 192.168.176.6
    wlp_net_ctrl_msg_proc:10
    not sta, mode:1
    vif0, AP/GO mode THROTTLE=38
    [wifi_adapter]: ap start : ip  0x1b0a8c0
    [wifi_adapter]: ap start : mask  0xffffff
    [wifi_adapter]: ap start : gateway  0x1b0a8c0
    [net INF] no need to switch wlan mode 1
    [wlan T] wlan_ap_disable()425
    en1: AP-DISABLED 
    setmlme_common lock
    setmlme_common unlock
    setmlme_common lock
    setmlme_common unlock
    en1: interface state ENABLED->DISABLED
    [net INF] msg <wlan disconnected>
    [net INF] netif is link down
    wlp_net_ctrl_msg_proc:1
    not sta, mode:1
    [wifi_adapter]: max_conn: 1
    [wifi_adapter]: chan: 6
    [wifi_adapter]: [dxh] set ap beacon int 100ms
    [wlan T] wlan_ap_enable()414
    setmlme_common lock
    setmlme_common unlock
    setmlme_common lock
    setmlme_common unlock
    Using interface en1 with hwaddr 38:a5:c9:3f:46:49 and ssid "SmartLife-4649"
    en1: interface state DISABLED->ENABLED
    en1: AP-ENABLED 
    [net INF] msg <wlan connected>
    [net INF] netif is link up
    [net INF] bring down netif
    [net INF] netif (IPv4) is down
    [net INF] bring up netif
    [net INF] netif (IPv4) is up
    [net INF] address: 192.168.176.1
    [net INF] gateway: 192.168.176.1
    [net INF] netmask: 255.255.255.0
    wlp_net_ctrl_msg_proc:0
    not sta, mode:1
    WAR [WSM] Drop frame (0x0008).
    WAR [WSM] Drop frame (0x0008).
    [net INF] msg <network down>
    wlp_net_ctrl_msg_proc:11
    not sta, mode:1
    [net INF] msg <network up>
    vif0, AP/GO mode THROTTLE=38
    [01-01 00:00:02 ty N][tuya_wifi_status.c:171] cur stat:13  0x2030e9 -->>
    [01-01 00:00:02 ty N][tuya_wifi_status.c:174] wifi netstat changed to:13  -->>
    [01-01 00:00:02 ty N][tuya_wifi_status.c:182] report wifi netstat[13] to callback  -->>
    [01-01 00:00:02 ty N][tbl_common_basic_service.c:920] wifi status is :13
    [net INF] dhcp addr start: 192.168.176.2
    [net INF] dhcp addr end: 192.168.176.6
    wlp_net_ctrl_msg_proc:10
    not sta, mode:1
    [01-01 00:00:02 ty N][tuya_wifi_reset.c:404] timer stated, short timer:0x0, long timer:0x4d8a39
    [01-01 00:00:02 ty N][tuya_bt_link.c:61] bt startup attr:1
    [01-01 00:00:02 ty N][tuya_ble_svc.c:976] upd product_id type:0 ihedujbuli6hsx9b
    
    
    ble controller open
    version    : 9.1.21
    build sha1 : v9.1.21-5-gd8b2bd2
    build date : Feb 15 2023
    build time : 14:18:16
    platform   : xr806
    
    
    btcoex_bt_force_req
    [01-01 00:00:02 ty N][tbl_lp_manage.c:464] gpio wake up
    [01-01 00:00:02 ty N][tfm_data_frame_recv.c:192] offset is :7
    btcoex_force_stop
    ble rf_init done!
    BLE INIT ALL DONE!
    BT Coex. Init. OK.
    tkl_hci_init:136
    <E>    Adv status is already disabled
    [01-01 00:00:02 ty N][tuya_ble_svc.c:1037] ty bt sdk init success finish
    [01-01 00:00:02 ty N][ble_gap.c:2510] Start Adv
    [01-01 00:00:02 ty N][tuya_svc_devos.c:219] __devos_init_evt success
    [01-01 00:00:02 ty N][ble_gap.c:2510] Start Adv
    [01-01 00:00:02 ty N][tuya_ble_svc.c:1115] ble adv updated
    tkl_system_malloc big memory, size(10516)!
    tkl_net_socket_create type(1), fd(2)!
    tkl_net_socket_create type(0), fd(3)!
    tkl_net_socket_create type(1), fd(4)!
    [01-01 00:00:02 ty E][wifi_netcfg_frame_transporter.c:316] timer is not run,wait
    [01-01 00:00:03 ty N][tbl_lp_manage.c:210] wait connect wifi
    
    
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #8 21429249
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    nice. i'm excited to look through the backup
  • #9 21429269
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    I've desoldered module, but I am getting synchron error so far.
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
    Helpful post? Buy me a coffee.
  • #10 21429276
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    went crazy once with sync error on XR3 until I realised I should have been using RX0/TX0 not TX1/RX1
  • #11 21429278
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    I think I am using TX0/RX0, but maybe you can spot the error?
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
    Helpful post? Buy me a coffee.
  • #12 21429281
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    seems OK I think

    PB02/PB03 grounded✅✅
    UART0-RX/TX ✅✅

    hang on. Maybe on XR3 it was RX->RX and TX->TX

    Added after 3 [minutes]:

    Quote:
    My first port of call, however, was to capture the UART boot log output. This was achieved by attaching USB-TTL RX to the RXD0 (not TXD0, as expected) of the module. This is the black dupont soldered in this pic. It joins the white where it's connected to USB-TTL RX pin.


    was for log anyway https://www.elektroda.com/rtvforum/topic4063735.html
  • ADVERTISEMENT
  • #13 21429302
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    wait a sec, one has to reset while doing "synchron waiting"?
    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
    Helpful post? Buy me a coffee.
  • #14 21429306
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    I've not had to do that on XR3. just power up with all connected
  • #15 21429307
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    Anything more I need to read?
    Attachments:
    • wxu20250207-1911.zip (3.15 MB) You must be logged in to download this attachment.
    Helpful post? Buy me a coffee.
  • #16 21429312
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    not that I am aware of...
  • #17 21429323
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    So now, if you flash this binary to your XR809, will you get it to boot?
    Helpful post? Buy me a coffee.
  • #18 21429324
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    already on it :)

    TuyaMCU at 115200 too.
  • #19 21429332
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    How do you know TuyaMCU baud?
    Helpful post? Buy me a coffee.
  • #20 21429353
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    divadiow wrote:
    Maybe on XR3 it was RX->RX and TX->TX

    yes, it is.

    flashed OK but no signs of life. PSU not showing any draw and nothing out on RX0 or RX1 :(

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

    will do again to be sure
  • #21 21429361
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    and if you flash OBK, then it boots and outputs debug log?
    Helpful post? Buy me a coffee.
  • #22 21429369
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    divadiow wrote:
    The normal XR806 definitely doesn't have wifi,

    humble apologies. I'm getting mixed up with the Winner Micro W806 - ignore.

    Added after 1 [minutes]:

    p.kaczmarek2 wrote:
    and if you flash OBK, then it boots and outputs debug log?

    indeed it does. normal boot log on RXD0

    Added after 5 [minutes]:

    it seems I had a poke around for the SDK last year

    Tuya WXU XR806 from TRV Heater Device flashing, SDK, firmware change research
  • #23 21429385
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    So we need to compile with XR806 SDK... how much different from XR809 is that?
    Helpful post? Buy me a coffee.
  • #24 21429402
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    https://github.com/divadiow/xr806_sdk

    Added after 42 [seconds]:

    though I think I'm in the process of getting the latest, if it's even different

    Added after 15 [minutes]:

    are you considering another port? :D
  • #25 21429431
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    Can you try to compile some of the examples? Then maybe I could try flashing them to my module.
    Helpful post? Buy me a coffee.
  • #26 21429438
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    yes, maybe soon, just doing my WBR3 dev thingy

    Added after 3 [minutes]:

    you'd be quicker and better at it though...?

    Added after 55 [seconds]:

    maybe @insmod could be tempted away from Android adventure
  • #27 21429454
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    Maybe porting from XR809 to XR806 is not that hard?

    This is XR809 HAL:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/hal/xr809/hal_pins_xr809.c
    It uses stuff like GPIO_InitParam structure.
    But is the same API available for XR806?
    https://github.com/search?q=repo%3Adivadiow%2Fxr806_sdk%20GPIO_InitParam&type=code
    I can't yet check, it's not yet indexed.

    Added after 2 [minutes]:

    Looks the same?

    https://github.com/divadiow/xr806_sdk/blob/master/project/example/gpio/main.c
    https://github.com/openshwprojects/OpenXR809/blob/master/project/example/gpio/main.c

    So maybe everything just boils down to getting compilation process running and maybe changing config structure offset?
    Helpful post? Buy me a coffee.
  • #28 21429493
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    >>21429438 I don't have either xr806 or xr809, so count me out. And, i'm unfamiliar with xr809 sdk anyway.
    I'll soon finish with android, i managed to build working aosp for my device with 2 main problems fixed - camera and udfps. Now to build lineageos...
  • #29 21429510
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14388
    Help: 650
    Rate: 12308
    I think that one can be very easy, the only thing I don't know well is Github Actions vs makefile flow (I've learned most of the coding in C++/C Visual Studio), so if you @insmod want to help with setting up Github builds for XR806 sometime soon, please do. First we can just try it with @divadiow .
    Helpful post? Buy me a coffee.
  • #30 21429730
    divadiow
    Level 38  
    Posts: 4833
    Help: 420
    Rate: 851
    there's this firmware for XR806 supplied here https://www.aw-ol.com/downloads?cat=23 but it obviously doesn't prove anything about the SDK we have in its current state
    Attachments:
    • OpenHarmony测试固件.zip (514.37 KB) You must be logged in to download this attachment.

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.
Generated by the language model.

FAQ

TL;DR: With 320 KB SRAM and a quoted breakthrough — "XR auth disabled" — this FAQ shows XR806/WXU thermostat modders how to open Tuya TRVs, dump firmware, build XR806 SDK demos, and understand why OpenBeken now boots and serves a web UI, while Wi‑Fi stability and TuyaMCU work still need fixes. [#21524634]

Why it matters: This thread turns a vague "WXU might be XR806" hunch into a repeatable path for teardown, flashing, SDK builds, and first-boot OpenBeken testing on real Tuya thermostats.

Option Result in thread Main limitation
Stock Tuya WXU firmware on original device Boots, exposes TuyaOS logs, Wi‑Fi + BLE seen Closed firmware, no alternative control path proven
Dumped WXU image flashed onto XR809 Did not boot XR806/XR809 firmware mismatch
XR806 SDK demos hello_demo and Wi‑Fi demos built and ran menuconfig options needed
OpenBeken on XR806/WXU Boots and later serves web UI Wi‑Fi, config, MAC, and TuyaMCU issues remained during testing

Key insight: The project stopped being blocked by flashing and basic booting. The real breakthroughs were proving that WXU is XR806-class hardware in practice, and then finding that the missing XR806 web GUI was caused by HTTP auth behavior, not a dead HTTP server.

Quick Facts

  • Tuya WXU was discussed as XR806-class hardware because logs showed XR806 SDK v1.2.1/v1.2.2, 160 MHz CPU, 40 MHz HF clock, Wi‑Fi, and BLE on real thermostat hardware. [#21429243]
  • The thread compared memory claims directly: Tuya WXU listed 320 KB SRAM, while one XR806 spec mentioned 288 KB SRAM, which caused early confusion about whether WXU was a Tuya-specific variant. [#21429143]
  • A real TuyaOS boot log on WXU showed TuyaOS V3.6.3 built on 2024-07-18, with xr806_lowpower_common_ty 1.1.4 and a product AP named SmartLife-4649. [#21429243]
  • XR806 flashing and logging used different serial paths in practice: successful tests showed firmware output on the flashing UART, while boot logs from stock firmware were often captured on a different UART. [#21430698]
  • OpenBeken config saving started working after moving XR806 sysinfo to 0x1FC000, leaving about 12 KB free before the end of a 2 MB flash. [#21533999]

How do I open a Tuya TRV heater device with the WXU/XR806 module without damaging the display or board?

Open it in four careful steps. 1. Pull off the plastic turning wheel with steady force. 2. Remove the round battery cover underneath it. 3. Unclip the display with a small screwdriver. 4. Remove the 3 top screws and lift out the board. This sequence was reported as "very easy to open" and was used successfully before board removal and flashing work. [#21429214]

What is the Tuya WXU module, and how is it related to the XR806 chip used in thermostats and TRVs?

The Tuya WXU module is an embedded Wi‑Fi and BLE module that appears XR806-based in these thermostats. "WXU is an embedded wireless module that provides Wi‑Fi and Bluetooth Low Energy connectivity, and in this thread its boot logs matched XR806 SDK builds, clocks, and radio firmware." The strongest evidence was real boot output showing XR806 SDK, 160 MHz CPU, 40 MHz HF clock, and TuyaOS on a WXU-equipped TRV. [#21429243]

What is TuyaMCU, and why does it matter when replacing firmware on a WXU/XR806-based thermostat?

TuyaMCU is the separate device-side controller that exchanges commands with the Wi‑Fi module over UART. "TuyaMCU is a microcontroller-side protocol layer that handles thermostat logic and sensors while the Wi‑Fi module exposes cloud or custom firmware features, usually over serial links such as 115200 baud." It matters because the original TRV used TuyaMCU, so OpenBeken must match that serial behavior before core heating functions work correctly. [#21429324]

Why does flashing a dumped WXU firmware image onto an XR809 boot fail even though OpenBeken itself boots on XR809?

It fails because the dumped firmware targets XR806-class hardware, not XR809. A direct test flashed the WXU backup to XR809 successfully, but the board showed no life, no current draw, and no output on RX0 or RX1. In contrast, flashing OBK back onto XR809 restored a normal boot log on RXD0. That result strongly points to platform mismatch rather than a bad dump or bad flashing process. [#21429353]

XR806 vs XR809: what are the practical differences for SDK compatibility, flashing pins, and OpenBeken porting?

They are similar enough for HAL reuse, but different enough to break direct firmware swaps. The thread found XR809 HAL code was about 99.9% reusable, and GPIO examples looked very similar between SDKs. The important practical differences were boot-pin behavior, build-system details, flash layout, and at least one efuse field difference such as EFPG_FIELD_MAC. That is why OpenBeken could be ported, yet still needed XR806-specific fixes. [#21435819]

How do I put an XR806 or Tuya WXU module into download mode, and which boot pins actually need to be grounded?

Ground PB02 to enter XR806 download mode. Early testing assumed PB02 and PB03 both had to be grounded, mirroring XR809 habits. Later notes in the same work said only PB02 needs to be pulled low on XR806, including successful flash reads from a WXU after grounding PB02. That makes XR806 easier to place in download mode than expected. [#21502313]

Why do I get a sync or 'synchron waiting' error when trying to read or flash an XR806, and how should TX/RX be wired?

Sync errors usually came from using the wrong UART pair or wiring TX/RX the wrong way. One tester fixed an XR-series sync issue after realizing the correct lines were UART0, not UART1. Another note added that for one XR case, RX had to go to RX and TX to TX for boot-log capture. If you see "synchron waiting," verify UART0 pins first and avoid assuming classic cross-over wiring. [#21429353]

Which UART on the XR806/WXU is used for flashing and which one outputs the boot log?

They are not always the same UART in practice. A key test showed an XR806 sample did work, but its output appeared on the flashing UART rather than the log UART the tester first monitored. Earlier stock-firmware work also captured boot text from RXD0. The safe rule is to probe both serial paths before assuming the board is dead. [#21430698]

How do I build XR806 SDK examples like hello_demo, wlan_demo, or at_demo with make menuconfig under WSL?

Build them from WSL with the SDK root as your working directory. 1. Install prerequisites such as build-essential and ncurses development packages. 2. Set the ARM GCC path in gcc.mk to the toolchain under sdk/tools. 3. Copy a demo defconfig, run make menuconfig, then make build or make image. This flow worked under WSL2 after GCC and ncurses were fixed. [#21432260]

What causes the lwip/netif.h missing error or OTA-related build failures in the XR806 SDK demos, and which menuconfig options fix them?

Those errors came from disabled network components in menuconfig, not from broken demo code alone. The lwip/netif.h failure appeared while building at_demo, and enabling lwIP, WLAN, AP/STA options, and OTA made the build progress. The thread also called out CONFIG_WLAN_AP, CONFIG_WLAN_STA, CONFIG_WLAN_MONITOR, and PRJCONF_NET_EN as required for full WLAN command support. [#21430812]

Why did OpenBeken on XR806 initially open port 80 but return no web GUI or empty HTTP responses?

The HTTP server thread was alive, but replies were blocked before a usable page reached the browser. Tests showed port 80 open on 192.168.51.1, accepted clients on fd 3, and received packets of about 453 to 479 bytes. Yet browsers reported ERR_CONNECTION_TIMED_OUT or ERR_EMPTY_RESPONSE. That proved the failure was in request handling or response generation, not in AP mode or TCP accept itself. [#21524592]

How was the XR806 HTTP issue tracked down to web authentication, and what changed to make the custom OpenBeken page finally load?

It was traced to HTTP auth logic, then fixed by disabling the XR806 auth block path. Debug builds showed packet receipt, then repeated HTTP packet with auth fail messages. After changing the XR806 auth behavior, logs switched to XR auth disabled and postany: send ..., and the custom OpenBeken page finally loaded. That was the first confirmed custom HTTP page running on XR806 in the thread. [#21524634]

Where should the sysinfo/config flash offset be placed on XR806 so OpenBeken settings are saved correctly without breaking XR809 or XR872?

Place XR806 sysinfo at 0x1FC000 and gate it with an XR806-specific platform check. Direct testing showed OpenBeken started saving config correctly at 0x1FC000, with about 12 KB left before the 2 MB flash end at 0x200000. The thread explicitly warned not to hardcode that address globally, because XR809 and XR872 use different layouts and need separate handling. [#21533999]

What is PhoenixMC, and how is it used with XR806 firmware images or upgrade commands during development?

PhoenixMC is the flashing utility used in this thread to parse, read, and write XR806 images. It successfully parsed SDK-built images, flashed stock and test binaries, and was later discussed as the possible path for an upgrade command that could avoid manual boot-pin grounding. In practice, it was the main tool for dumping firmware, restoring backups, and verifying whether new XR806 builds booted. [#21430654]

What are the remaining blockers for a fully working OpenBeken/OpenXR806 port on Tuya WXU devices, especially unstable Wi-Fi, MAC handling, config saving, and TuyaMCU support?

The main blockers were unstable Wi‑Fi behavior, wrong MAC handling, incomplete config persistence before the sysinfo fix, and unfinished TuyaMCU integration. One tester reported OpenBeken booted, exposed the web UI, but did not keep settings, did not enter STA mode, and still showed MAC inconsistencies. Another recurring issue was Wi‑Fi association without completing the full connection flow. By May 2025, XR806 builds existed, but the port was still a development target, not a finished daily-driver firmware. [#21524739]
Generated by the language model.
ADVERTISEMENT