logo elektroda
logo elektroda
X
logo elektroda

Identify Tuya Mini WiFi Relay Module with TR6260 Chip - Encountered by Anyone?

ferbulous 7872 81
Best answers

What is the TR6260 chip in a Tuya mini WiFi relay module, and has anyone found a way to flash or replace it?

The TR6260 is a different chip from the usual Beken parts, and it is not the same as RTL8710; the project originally needed a UART flashing method to support it [#20968593] Later, the SDK and UTP flash tool were found, and reading/flashing works by grounding GPIO14/TOUT2 at power-on to enter spi-flash boot mode, then using `boot_nocrc.bin` with a 1 MB image length [#21310036][#21310437] The build environment appears to be an Andes `nds32le-elf` toolchain, and `make st_tr6260s1_diff` produces binaries such as `xip.bin` [#21312766] After that, an OpenBeken port was brought up: GPIO output, PWM, flash vars, config, LFS, I2C scanning and other basics worked, but the chip only has 128 KB SRAM so memory is tight [#21339241][#21345516]
Generated by the language model.
ADVERTISEMENT
  • #1 20499099
    ferbulous
    Level 18  
    Posts: 419
    Help: 8
    Rate: 56
    Hi, so i bought a tuya mini wifi relay module. I was expecting another beken device but this is the chip that it came with.

    Anyone has encountered this?
    Googling the chip name leads to this doc

    https://fccid.io/2AUUL-TR6260/User-Manual/User-Manual-4520594

    Identify Tuya Mini WiFi Relay Module with TR6260 Chip - Encountered by Anyone?
  • ADVERTISEMENT
  • #2 20499279
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14400
    Help: 650
    Rate: 12330
    It seems that TR6260 was mentioned at least once here:
    https://www.elektroda.pl/rtvforum/topic3960571.html#20459827
    It's swappable to ESP, but I will have to look for SDK in order to support it and furthermore I would need to get at least one piece somehow.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20499837
    ferbulous
    Level 18  
    Posts: 419
    Help: 8
    Rate: 56
    p.kaczmarek2 wrote:
    It seems that TR6260 was mentioned at least once here:
    https://www.elektroda.pl/rtvforum/topic3960571.html#20459827
    It's swappable to ESP, but I will have to look for SDK in order to support it and furthermore I would need to get at least one piece somehow.


    Thanks, I intend to do that soon since i have a few esp02s
  • #4 20584129
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14400
    Help: 650
    Rate: 12330
    I've got a device with TR6260, but I am unable to find a suitable flasher/SDK for it yet.

    Boot log:
    
          рШ°АЖЖЮ`ЖfАцЮ■Ю~fЮцЮШрШ``°fЮцЖxрЮАц°Ю рцЮ■~ ШЮцЮxfЖ[00:00:00.681][01-01 18:12:15 TUYA Err][light_main.c:47] led_init LED_DRIVER_PWM_CW product_type: 0x5507
     [00:00:00.690][01-01 18:12:15 TUYA Err][cmd_rgb.c:70] ++++++++++++++++++++++++ <light_cmd_init_rgb> +++++++++++++++++++++++++
    
     [00:00:00.702][01-01 18:12:15 TUYA Err][tuya_main.c:219] sdk info: < TUYA IOT SDK V:1.0.10 BS:40.00_PT:2.2_LAN:3.3_CAD:1.0.2_CD:1.0.0 >
    < BUILD AT:2020_10_20_21_23_01 BY embed FOR ty_iot_wf_rtos_sdk AT tr6260 >
    IOT DEFS < WIFI_GW:1 DEBUG:1 KV_FILE:0 SHUTDOWN_MODE:0 LI      L╣  └╚      ─╒! иг  L╣  аг     p╦  p╦  L╣  h╦     └╣  SYSTEM Task                                                  еееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееее[01-01 18:12:15 TUYA Err][tuya_main.c:108] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     [00:00:00.764][01-01 18:12:15 TUYA Err][tuya_main.c:109] +++++++++++ BUILD: 2021-12-16-11:24:04: +++++++++++
     [00:00:00.774][01-01 18:12:15 TUYA Err][tuya_main.c:110] +++++++++++ FNAME: line_rgb_wifi_user_2.2.10 +++++++++++
     [00:00:00.783][01-01 18:12:15 TUYA Err][tuya_main.c:111] +++++++++++ FKEY: keygdg4gpysneder +++++++++++
     [00:00:00.792][01-01 18:12:15 TUYA Err][tuya_main.c:112] +++++++++++ PID: euxjqrqtzgrr2bdk +++++++++++
     [00:00:00.801][01-01 18:12:15 TUYA Err][tuya_main.c:115] +++++++++++ KEY_EN: 0, IR_EN: 1, BOOT_CNT_EN: 1, BOOT_SMART: 0, BOOT_AP: 0, CFG_FOREVER: 0, CFG_FADE: 0, LTIME: 0, WFC_LED_ON: 0, C_CS: 0, C_ON: 0, RS: 2, MIC: 1, MAGIC: 0 +++++++++++
     [00:00:00.823][01-01 18:12:15 TUYA Err][driver_pwm.c:229] ++++++++++++ RGB channel r: 0, g: 1, b: 2, pn: 0 +++++++++++
     [00:00:00.832][01-01 18:12:15 TUYA Err][tuya_main.c:117] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     [00:00:00.846][01-01 18:12:15 TUYA Err][tuya_main.c:124] led power on cnt: 6, nc_type: 1
     [00:00:00.852]
    ************************************** WF_START_AP_FIRST *****************************************
     [00:00:01.645][01-01 18:12:15 TUYA Err][light_main.c:47] led_init LED_DRIVER_PWM_CW product_type: 0x5507
     [00:00:01.655][01-01 18:12:15 TUYA Err][cmd_rgb.c:70] ++++++++++++++++++++++++ <light_cmd_init_rgb> +++++++++++++++++++++++++
    
     [00:00:01.667][01-01 18:12:15 TUYA Err][tuya_main.c:219] sdk info: < TUYA IOT SDK V:1.0.10 BS:40.00_PT:2.2_LAN:3.3_CAD:1.0.2_CD:1.0.0 >
    < BUILD AT:2020_10_20_21_23_01 BY embed FOR ty_iot_wf_rtos_sdk AT tr6260 >
    IOT DEFS < WIFI_GW:1 DEBUG:1 KV_FILE:0 SHUTDOWN_MODE:0 LI      L╣  └╚      ─╒! иг  L╣  аг     p╦  p╦  L╣  h╦     └╣  SYSTEM Task                                                  еееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееее[01-01 18:12:15 TUYA Err][tuya_main.c:108] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     [00:00:01.728][01-01 18:12:15 TUYA Err][tuya_main.c:109] +++++++++++ BUILD: 2021-12-16-11:24:04: +++++++++++
     [00:00:01.738][01-01 18:12:15 TUYA Err][tuya_main.c:110] +++++++++++ FNAME: line_rgb_wifi_user_2.2.10 +++++++++++
     [00:00:01.748][01-01 18:12:15 TUYA Err][tuya_main.c:111] +++++++++++ FKEY: keygdg4gpysneder +++++++++++
     [00:00:01.756][01-01 18:12:15 TUYA Err][tuya_main.c:112] +++++++++++ PID: euxjqrqtzgrr2bdk +++++++++++
     [00:00:01.765][01-01 18:12:15 TUYA Err][tuya_main.c:115] +++++++++++ KEY_EN: 0, IR_EN: 1, BOOT_CNT_EN: 1, BOOT_SMART: 0, BOOT_AP: 0, CFG_FOREVER: 0, CFG_FADE: 0, LTIME: 0, WFC_LED_ON: 0, C_CS: 0, C_ON: 0, RS: 2, MIC: 1, MAGIC: 0 +++++++++++
     [00:00:01.787][01-01 18:12:15 TUYA Err][driver_pwm.c:229] ++++++++++++ RGB channel r: 0, g: 1, b: 2, pn: 0 +++++++++++
     [00:00:01.796][01-01 18:12:15 TUYA Err][tuya_main.c:117] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     [00:00:01.810][01-01 18:12:15 TUYA Err][tuya_main.c:124] led power on cnt: 6, nc_type: 2
     [00:00:01.819]tuya_hal_get_serialno------------------------------------------
     [00:00:01.825]--tuya_hal_wifi_set_country_code:735--  [CN]
     [00:00:01.914][01-01 18:12:15 TUYA Err][boot_cnt.c:16] ******** boot count set: 6 ********
    
     [00:00:01.939][01-01 18:12:15 TUYA Err][light_irda.c:1373] ++++++++++++++++++++++++ <hal_ir_init> +++++++++++++++++++++++++
    
     [00:00:01.950][01-01 18:12:15 TUYA Err][light_irda.c:1360] ##<ir_config_init>ir_port: 21,ir_key_cnt: 24
    
     [00:00:01.959][01-01 18:12:15 TUYA Err][light_mic.c:377] ++++++++++++++++++++++++ <music_local_mic_init> +++++++++++++++++++++++++
    
     [00:00:01.971]--tuya_hal_wifi_set_work_mode:435--workmode 4
     [00:00:01.976]sniffer stop, crcerr_close
     [00:00:01.979]Ap Start Info, ssid:SmartLife-26CD passwd:[] channel:6 hidden_ssid:0 authmode:0
     [0000ff59]OK
     [00:00:01.988]
     [0000ffb4]OK 
     [0000ffe3]OK
     [00:00:01.992]
     [00010038]OK
     [00:00:02.001]
     [0001008d]OK
     [00:00:02.004]
     [000100e1]OK
     [00:00:02.006]
     [00010143]OK
     [00:00:02.009]
     [00010197]OK
     [00:00:02.012]
     [000101eb]OK
     [00:00:02.014]
     [00010241]OK
     [00:00:02.017]
     [00:00:02.019]wpa state:DISCON->SCAN.
     [00:00:02.022]vif_id:1, scanning:true
     [00:00:02.027]create task name[udp_ap_v3], stack[3584], func[40c45f8e], ret[1], handle[0024b200], prio[5]
     [00:00:02.037]vif[1],event[27]
     [00:00:03.325]vif_id:1, scanning:false
     [00:00:03.341]wpa state:SCAN->COMPLETED.
     [00:00:03.349]vif[1],event[1]
     [00:00:03.352]vif[1],event[27]
     [00:00:03.354]vif[1],event[15]
     [00:00:12.018][01-01 18:12:25 TUYA Err][boot_cnt.c:16] ******** boot count set: 0 ********
    
     [00:03:01.534][01-01 18:15:16 TUYA Err][wifi_cfg.c:31] ****** wifi_cfg_timeout_cb, boot_cnt: 0 ******
    
     [00:03:01.542]sniffer stop, crcerr_close
     [00:03:01.546][01-01 18:15:16 TUYA Err][cmd_status.c:184] app_status_clear, reason: 1
     [00:05:05.501]wait channel time. [1|4194303]
     
    

    There are some interesting results when searching for ty_iot_wf_rtos_sdk, but nothing solid yet
    Helpful post? Buy me a coffee.
  • #5 20585437
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14400
    Help: 650
    Rate: 12330
    It seems that this dev board:
    
    HLK-M20 Serial Port 2.4G WiFi Wireless Module IOT Serial to WiFi Transparent Transmission Low Power SDK M20 Development Board Ki
    

    is using TRS:
    Screenshot of an AliExpress listing for the HLK-M20 WiFi module.
    TR6260S1 WiFi module on a PCB.
    TRS6260S1
    Development board with TR6260 WiFi module on a white background. Image of two WiFi modules with the TR6260S1 microcontroller. Set of boards with a WiFi module and pin labels. Specifications of the HLK-M20 module with TR6260 chip.
    Helpful post? Buy me a coffee.
  • #6 20587026
    ferbulous
    Level 18  
    Posts: 419
    Help: 8
    Rate: 56
    That’s quite interesting although I haven’t seen much of tuya device running on this chip
  • #7 20587056
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14400
    Help: 650
    Rate: 12330
    Still no possible flasher tool in the sight. My board had Boot and RX and TX, and in general, datasheet looks kinda like ESP8266 (options to boot from SD, UART, SPI...?), but I haven't managed to get any more progress yet.
    Helpful post? Buy me a coffee.
  • #8 20812359
    karwo
    Level 31  
    Posts: 1542
    Help: 151
    Rate: 356
    Board Language: polish
    The mentioned TR6260S1 chip is found in the "ELM 327 WiFi diagnostic interface" ELM 327 Wi-Fi diagnostic adapter with casing and label. Close-up of circuit board featuring TR6260S1, MC4063A, and LM393 components. Open ELM 327 WiFi diagnostic interface with visible circuit board featuring TR6260S1 chip Open ELM 327 WiFi diagnostic interface with visible circuit board featuring TR6260S1 chip Electronic module with various integrated circuits on a wooden surface. In addition to the aforementioned TR6260, there are MC4063A and LM393 in the interface.
    This is how it came into my hands by chance - maybe such information will be useful to someone.
  • #9 20968506
    morgan_flint
    Level 14  
    Posts: 251
    Help: 4
    Rate: 59
    p.kaczmarek2 wrote:
    There are some interesting results when searching for ty_iot_wf_rtos_sdk, but nothing solid yet

    Hello!

    A device based on TR6260 fell into my hands (a friend gave it to me to see if I could repair it) and I found this new (for me ) chip in it. I started searching to see if it was compatible with open beken, but I see that, unfortunately, that's not still the case and it seems it won't be in the near future.

    Just out of curiosity, I searched "ty_iot_wf_rtos_sdk" and found this other more recent thread here in elektroda (ty_iot_wf_rtos_sdk appeared in the "code" embedded in the first post), but the device on that thread is based on a different chip (RTL8710) that, according to your post in that thread, has a greater possibility of being "opened", as you've already done some work on it.

    So, my question is: Does the coincidence of having "ty_iot_wf_rtos_sdk" in their boot logs mean that these two chips (TR6260 and RTL8710) have something in common?

    If that was the case, maybe the possible future "opening" of RTL8710 could also benefit TR6260...

    Thank you in advance!
  • #10 20968593
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14400
    Help: 650
    Rate: 12330
    No, it's a different chip. See: https://github.com/openshwprojects/OpenBK7231T_App/issues/1020
    We need to find an UART way to flash it.
    Helpful post? Buy me a coffee.
  • #11 20968688
    morgan_flint
    Level 14  
    Posts: 251
    Help: 4
    Rate: 59
    Ok, thanks!

    Hope the method for flashing is found soon; as somebody said elsewhere, these Chinese manufacturers change chips faster than other people do with girlfriends!
  • #12 21290001
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    HLK-M20 datasheets in Chinese provided by Hi-Link Tech. Google Translate English also.
    Attachments:
    • EN_HLK-M20使用手册 V1.0.pdf (2.31 MB) You must be logged in to download this attachment.
    • EN_HLK-M20规格书 V1.0.pdf (1.38 MB) You must be logged in to download this attachment.
    • EN_HLK-M20 WiFi透传模块 AT命令说明 V1.0.pdf (463.33 KB) You must be logged in to download this attachment.
    • HLK-M20使用手册 V1.0.pdf (1.57 MB) You must be logged in to download this attachment.
    • HLK-M20规格书 V1.0.pdf (996.91 KB) You must be logged in to download this attachment.
    • HLK-M20 WiFi透传模块 AT命令说明 V1.0.pdf (216.7 KB) You must be logged in to download this attachment.
  • #13 21290330
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    Christmas has come early!

    TR6260 SDK and flash tool "UTP" attached. This is from Skylab who are behind the LSC6260 module.

    Screenshot of Skylab's flash tool UTP.
    Attachments:
    • 烧录工具.zip (10.22 MB) You must be logged in to download this attachment.
    • lcs6260.zip (10.02 MB) You must be logged in to download this attachment.
  • #14 21291368
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14400
    Help: 650
    Rate: 12330
    Nice, what is the difference between "DownLoader" and "Flash Upload"? Can it both read and write?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #15 21291411
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    potentially. the file path field is a save path, so it looks to be.
    I don't yet have any TR6260 devices to test. ELM327 and HLK-M20 in post
    Screenshot of a program with an open window for saving a binary file.

    Screenshot of UTP software interface with options and file path to testdump.bin.

    the readme file is useless

    Added after 57 [seconds]:

    do you still have the Transa Semi LED controller to test with?
  • #16 21292707
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    Maybe @morgan_flint and @ferbulous have theirs
  • #17 21292851
    morgan_flint
    Level 14  
    Posts: 251
    Help: 4
    Rate: 59
    >>21292707 I still have it, I could give it a try.
  • #18 21297056
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    >>20812359

    boo. my ELM327 came with an SV6060P

    Circuit board with an electronic chip and components.
  • #19 21297598
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14400
    Help: 650
    Rate: 12330
    That sounds like a totally new chip, can you open separate topic and we will look for SDK?

    I should still have TR6260 somewhere...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #21 21300908
    ferbulous
    Level 18  
    Posts: 419
    Help: 8
    Rate: 56
    I still have it, already desoldered
  • Helpful post
    #22 21305048
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    I've received my HLK-M20 module but not worked out the UTP program yet. The HLK-M20 does broadcast an AP. I'm expecting it to be similar to their other shipped firmwares. AT command tests and such (detailed in HLK-M20 PDFs).

    Screen to connect to HLK-M20_10AA Wi-Fi network.

    I attach the annoyingly difficult to obtain HLK-M20.7z mentioned here https://ask.hlktech.com/question/1039.html as well as the natively-English FCC PDF for the HLK-M20

    Code: Text
    Log in, to see the code
    Attachments:
    • HLK-M20.7z (78.73 MB) You must be logged in to download this attachment.
    • 2AD56HLK-M20-FCCID-UserManual-4846822.pdf (880.96 KB) You must be logged in to download this attachment.
  • #23 21307862
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    >>21290330 >>21290330

    toolchain
    Attachments:
    • nds32le-elf-mculib-v3-GCC8.2.txz.zip (25.7 MB) You must be logged in to download this attachment.
  • Helpful post
    #24 21310036
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    I have good news. Flash can be read to file as follows:

    GPIO14/TOUT2 needs to be grounded at power-on. Like LN882H this needs to be before power to USB-TTL. Just resetting the device (RST->GND) with GPIO14 grounded will bring it up in spi-flash boot mode, that being standard boot, NOT uart boot mode:

    Screenshot showing a console set to a baud rate of 57600 with messages entry BootRom and spi-flash boot mode.

    If you're watching TX then the correct procedure will give this output:

    Fragment of a terminal window displaying boot mode messages with a selected baud rate of 57600.

    then configure the UTP program as follows, using the boot_nocrc.bin from the 烧录工具.zip file posted above. The flash is 1mb so length is 0x100000

    PC Local Filepath is just where you want to save the file

    Screenshot of the UTP application showing flash upload settings.

    And so attached is the HLK-M20 factory firmware backup. It took 2-3 mins so could well be transferring at the 57600 baud used to capture log out.

    On the HLK-M20 module GPIO14/TOUT pad is the location of EN on ESP-12F, so if using an ESP universal adaptor it's just a case of grounding EN header.

    Diagram of an electronic module with highlighted pins

    HLK-M20 module mounted on a PCB with pin labels and wiring.

    The LSC6260 module is a little different (pic only added to show TOUT2 location difference - ignore the grounding of RST depicted)
    Close-up of an electronic module with visible pins labeled as TMS, TCK, IO21, IO20, and others.

    GPIO pin assignment table for the HLK-M20 module.

    I've not moved onto flashing yet. We could do with a backup or two from some Tuya devices.
    Attachments:
    • HLK-M20_factory.bin (1 MB) You must be logged in to download this attachment.
  • Helpful post
    #25 21310437
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    And to flash firmware:

    If flashing a backup taken from 0x0 then up to 0x4000 needs to be removed from the file using a hex editor. File 1 needs to be the boot_nocrc.bin file starting from 0x0 then the rest of the trimmed flash from 0x4000

    Screenshot of a firmware flashing tool with the Downloader tab open.

    If you flash the whole factory backup file from 0x4000 then it doesn't detect the partition table where it's supposed to start - 0x6000

    Screenshot from a hex editor showing data in hexadecimal format with addresses and highlighted entries.

    and the programmer complains with [INFO]Please add partition:
    Screenshot of firmware flashing software with file list and operation log.
    and the failed boot log out:

    Code: Text
    Log in, to see the code


    and finally, a blank English translation of the Downloader tab
    Screenshot of firmware flashing application interface with the Downloader tab visible.
  • #26 21310648
    micbanand
    Level 6  
    Posts: 13
    so I just wire up. my TR6260S1 with 3v3, gnd, rx, tx.
    and GPIO14 to ground (instead of missing gpio0 pin) when inserting my programmer
    Like I did with the replacement ESP-02S module?
    if I will try to make a dump in the weekend :)
  • #27 21310652
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    That certainly sounds correct, yes.

    (common grounds and short cables of course ;) )
  • #28 21311788
    jekader
    Level 7  
    Posts: 9
    Help: 1
    Rate: 9
    Thanks @divadiow for gathering this valuable info! The SDK was the missing piece for this platform, worth sharing it on GitHub at some point.

    The toolchain seems to be a standard one from Andes - multiple versions are available here https://github.com/andestech/Andes-Development-Kit/releases
    The sources are available here: https://github.com/andestech/nds-gnu-toolchain

    Didn't manage to find much application-level source code, just some demos for a third-party SDK:
    https://github.com/Akeeta/Akeeta-SDK-TR6260/tree/master/akeeta_tr6260/test_example
  • #29 21311807
    divadiow
    Level 38  
    Posts: 4846
    Help: 421
    Rate: 853
    Sure. Cool
    What does that mean for ever making a working OpenTR6260 I wonder

    Added after 1 [hours] 25 [minutes]:

    jekader wrote:
    Didn't manage to find much application-level source code, just some demos for a third-party SDK:https://github.com/Akeeta/Akeeta-SDK-TR6260/tree/master/akeeta_tr6260/test_example

    ah. I knew I'd seen the partition table laid out nicely somewhere. Here's it a bit tidier

    Table showing the partitioning of 1M Flash into various partitions with start and end addresses and notes.

    Added after 2 [minutes]:

    jekader wrote:
    worth sharing it on GitHub at some point

    https://github.com/divadiow/TR6260
  • #30 21312766
    jekader
    Level 7  
    Posts: 9
    Help: 1
    Rate: 9
    Tested the SDK and it does work (does produce a binary at least).

    Steps are:
    1) download toolchain, extract it and add the bin subdirectory to PATH
    To verify, this command should display the compiler version: nds32le-elf-cpp --version
    I used this official release but the one attached to this thread should work as well. On Windows, cygwin might be needed too.
    2) Install GNU make depending on the OS used
    3) Download the SDK and extract it, then go to the scripts directory and run make st_tr6260s1_diff
    4) grab the binaries from the out/tr6260s1/standalone folder of the SDK, xip.bin seems to be the one

    The application itself built by the makefile is in ref_design/standalone/standalone.c of the SDK - hope this helps bootstrap further porting progress.

Topic summary

✨ The discussion centers on the identification and development efforts related to the Tuya mini WiFi relay module equipped with the TR6260 chip, which differs from the expected Beken devices. The TR6260, including variants like TR6260S1, is a relatively new SoC used in devices such as the HLK-M20 WiFi module and ELM 327 WiFi diagnostic interface. Initial challenges included the lack of a known flasher tool and SDK, but progress was made with the discovery of the Skylab-provided TR6260 SDK and UTP flash tool. Users shared detailed boot logs, pin mappings, and hardware reverse engineering insights, including GPIO14/TOUT2 grounding for entering flash mode. The SDK was successfully compiled and tested, producing working binaries and enabling basic functionality such as GPIO output, PWM, flash variable storage, and WiFi connectivity with some limitations due to the chip's 128KB SRAM. Peripheral support like I2C, DS18B20, and BMP280 sensors was partially achieved, though some issues remain with sensor communication and memory constraints. The community contributed to porting OpenBeken firmware to TR6260, achieving stable operation with web server functionality and reboot handling on WiFi disconnects. Ongoing work includes refining drivers, improving memory management, and preparing detailed flashing guides. The thread concludes with plans to consolidate information into a dedicated topic and continued development collaboration.
Generated by the language model.

FAQ

TL;DR: Community devs cracked the Tuya-branded TR6260: 128 KB on-chip SRAM, OpenBeken v1464 now runs and reaches the web GUI in 7 s. “Still no possible flasher tool in sight” became history once the UTP utility leaked [Elektroda, p.kaczmarek2, #20587056; Elektroda, divadiow, #21310036].

Why it matters: The fix turns previously-locked Wi-Fi relays into fully hackable IoT nodes without hardware swaps.

Quick Facts

• MCU core: Andes 32-bit NDS32 ISA, 160 MHz typical clock [Transa Semi DS]. • Memory: 1 MB SPI flash, 128 KB SRAM confirmed by boot logs [Elektroda, insmod, post #21327279] • Wi-Fi: 2.4 GHz 802.11 b/g/n, AP SSID appears as “SmartLife-xxxx” in factory firmware [Elektroda, p.kaczmarek2, post #20584129] • Default baud rate: 57 600 bps for console & flashing [Elektroda, divadiow, post #21310036] • UTP flash tool v1.9 supports read/write; bootloader image “boot_nocrc.bin”, 0x4000 offset [Elektroda, divadiow, post #21310437]

What exactly is the TR6260 / TR6260S1 chip?

TR6260 is a 2.4 GHz Wi-Fi SoC from Transa Semi using an Andes NDS32 core. The S1 suffix denotes the 28-pin QFN module variant found on HLK-M20 and Tuya mini-relays [Transa Semi DS; Elektroda, p.kaczmarek2, #20585437].

Can I swap a TR6260 module for an ESP8266/ESP-02S?

Yes, pads match the common ESP-02S footprint; several users desoldered TR6260 and fitted ESP02S successfully [Elektroda, ferbulous, post #20499837] You lose the chance to test new firmware, so flashing in-situ is now preferred.

Is an official SDK available?

A complete SDK, Andes toolchain and the proprietary "UTP" flasher were published by Skylab in Nov 2024 [Elektroda, divadiow, post #21290330] It builds sample binaries; OpenBeken uses the same headers.

How do I enter flashing mode?

  1. Ground GPIO14 (labelled TOUT2 on LSC6260 modules).
  2. Apply 3.3 V power while keeping it low.
  3. Start UTP, load boot_nocrc.bin at 0x0 and full image at 0x4000, then click “GetFromChip” or “Download”. Users report 0x100000 length for 1 MB flash [Elektroda, divadiow, post #21310036]

Which pins are safe for GPIO work?

Usable lines are 1–6, 14–15, and 20–22 on the S1 package. Others connect to RF or crystal and should stay untouched [Elektroda, insmod, post #21341050]

Why does DS18B20 sometimes fail on this chip?

The TR6260 usleep() runs ten times faster than nominal, so 1-Wire slots shorten and CRC mismatches occur [Elektroda, max4elektroda, post #21341667] Patch the driver with a 10× delay multiplier.

What happens if flashing the full dump from 0x0?

UTP reports “Please add partition” and the chip drops to UART boot with ‘spi-flash bad magic’. Trim the first 0x4000 bytes or prepend boot_nocrc.bin [Elektroda, divadiow, post #21310437]

Where can I find datasheets and ready binaries?

Datasheets for TR6260, LSC6260 module and HLK-M20, plus pre-built OpenBeken images, are collected at github.com/divadiow/TR6260 [Elektroda, divadiow, post #21315543]

What's the memory footprint after loading web and MQTT?

OpenBeken reports ~29 KB free heap with both GUI and log page open, dropping to 24 KB after 5 minutes, then stabilising [Elektroda, divadiow, post #21349195]
Generated by the language model.
ADVERTISEMENT