logo elektroda
logo elektroda
X
logo elektroda

Tuya DIY Smart Switch T1-CHL AU5101XA Flashing Issues with OpenBK7238_QIO_1.18.247 Firmware

gparduino 2076 24
Best answers

How do I flash a Tuya DIY smart switch with a T1-CHL AU5101XA/BK7238 chip so OpenBK7238 boots correctly and the RF data ends up in the right place?

Restore the original RF partition from your backup into the correct BK7238 RF location, and use a flashing setup that preserves backup/restore rather than overwriting the bootloader [#21814718] On a later batch, the working sequence was: choose “Backup and flash new” with OpenBK7238 v247, enable “Automatically configure OBK on flash write” and “Allow Backup restore,” and do not overwrite the bootloader [#21814854] Before flashing, set the OBK flash-write settings manually with the correct GPIO data, because automatic GPIO detection did not work for that device [#21814854] After flashing, restore the RF part, and the unit can boot normally on the network [#21814854] That successful setup supported OTA updates, AP mode, GUI MAC changes, MQTT, and Wi‑Fi SSID changes [#21814854]
Generated by the language model.
ADVERTISEMENT
  • #1 21814579
    gparduino
    Level 2  
    Posts: 12
    Rate: 1
    I have 6 new generic Tuya DIY smart Switches with a
    Close-up of PCB with soldered wires labeled GND, RX, TX, 3.3V, and CEN
    T1-CHL AU5101XA chip and some unmarked pads on the bottom that I traced out and identified 3.3 V, GND, Tx, Rx, CEN.

    I am presuming that this is compatible with OpenBK7238_QIO_1.18.247 firmware (I tried several other ones in the repository).

    I've made some progress Screenshot from Tasmota app showing GPIO configuration in JSON format
    Bk7231 GUI Flasher window with JSON configuration displayed
    Bk7231N Easy UFlash Flasher app interface showing partitions and decoding log

    Of course, there are no signs of life after this flash. No access point. No LED.

    I eventually was able to get some signs of life for two of the units by overwriting the bootloader, writing OBK settings for the WiFi network and then finding it on DHCP. The relay responds in the web GUI. The RF section, according to the web app, is all FF FF. The MAC addresses of those two switches were identical. Using the web app, OTA flash seems to work using the overwritten bootloader. GUI MAC change does not; AP access point does not work. "Restore the RF part" from the UART flasher writes a few lines before the rest which, for the most part, are all FF FF FF according to the web app, but the GUI now shows a new random MAC which then appears on the network properly. Didn't get to test MQTT.

    It seems that the offsets may be an issue or I'm completely wrong as to which firmware to use. Any insight on how to set up the flasher for the new offsets would be appreciated. Attaching the read file from a stock device.

    So the sequence that at least gets me a GUI on the network was to: flash the firmware, overwrite the bootloader, then flash OBK separately with WiFi credentials, then restore RF part, apparently not completely to the right place. Once I do this, I get a GUI only on the network and am unable to restore from backup.
    Firmware flashing tool interface for BK7231 with Write success! message visible

    OpenBK7238 interface showing OFF status and MQTT connection data
    FormOBKConfig configuration window with network and GPIO settings
    Attachments:
    • readResult_BK7238_QIO_Tuya1_2026-20-1-12-06-32.bin (2 MB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #2 21814718
    divadiow
    Level 38  
    Posts: 5062
    Help: 438
    Rate: 893
    use your backup to restore original RF to correct location for BK7238. I think ideally Easy Flasher would strongly encourage a backup and restore of RF to correct location or OBK move expected location to match Tuya's, because this will keep coming up

    https://www.elektroda.com/rtvforum/topic4106397.html#21764525
  • #3 21814854
    gparduino
    Level 2  
    Posts: 12
    Rate: 1
    I opened a second batch of switches with the same chip name, but these perform differently when flashing.

    Now the sequence: 1) "Backup and flash new" with OpenBK7238 v247 - "Automatically configure OBK on flash write", "Allow Backup restore", and don't overwrite bootloader. 2) Before doing that, "Change OBK settings for flash write" with the correct GPIO data - as automatic GPIO seems not to work. 3) Restore RF part. Works.

    All the stuff that didn't work on my last two units of hardware works well with this new batch.
    Tested: OTA update with .rbl file, access point, change MAC with GUI, MQTT. Wi‑Fi SSID changes.

    OpenBekenX setup interface with WiFi options and SSID field NaZdrowie

    Thanks for your reply.
  • ADVERTISEMENT
  • #4 21815727
    gparduino
    Level 2  
    Posts: 12
    Rate: 1
    Looking at the forum, it is difficult to keep a database on these generic TUYA switches with the same packaging, same case, no labels on the circuit board, and no model numbers.

    This one works with different pin settings compared to many of the templates.

    "pins": {
    "6": "TglChanOnTgl;1",
    "15": "Btn_Tgl_All;1",
    "17": "LED;1",
    "26": "Rel;1"
    }

    It appears to respond to a PowerSave 1 command properly, based on the log.
  • #5 21815937
    divadiow
    Level 38  
    Posts: 5062
    Help: 438
    Rate: 893
    The JSON below can be seen decrypted from your dump. Easy Flasher doesn't extract enough currently to map pins from it and even then it doesn't know about your pin6, which I guess is either

    Code: JSON
    Log in, to see the code
    or
    Code: JSON
    Log in, to see the code


    Code: JSON
    Log in, to see the code


    do you have any more pictures of your device so one can be added to the device list in a new template?
  • #6 21815965
    gparduino
    Level 2  
    Posts: 12
    Rate: 1
    >>21815937 I'm getting a third batch from this vendor tomorrow. If they behave the same way and look the same on the inside, I'll upload the internal pics. The vendor and product on Amazon are attached.
    Set of 4 Bkiyougo MINI Smart WiFi Switches shown on Amazon product page
  • ADVERTISEMENT
  • #8 21816566
    gparduino
    Level 2  
    Posts: 12
    Rate: 1
    >>21815998
    While I am waiting for the new device package to test out, I made a Node-RED subflow that seems useful specifically for Open Beken flashed devices.

    The usage is a custom node that only requires a topic and a pop-up selection of an MQTT server known to flow. It takes an input from a Dashboard 2.0 switch node and feeds back to the input of the switch node to update its state. There is a status display below the custom node that displays online, offline, on, and off states.

    Example flow usage picture and design of the subflow node. JSON of the subflow node.

    Testing and comments would be appreciated.

    Automation flow with two connected “Office” blocks showing active states
    Data flow diagram in OpenBeken with MQTT and control logic nodes
    Attachments:
    • Beken subflow.json.tar.gz (1.82 KB) You must be logged in to download this attachment.
  • #9 21816898
    gparduino
    Level 2  
    Posts: 12
    Rate: 1
    >>21816566
    The new batch just came in and appears to be the same from this vendor.
    Pics:

    Box labeled “DIY Smart Switch” on a wooden table
    Mini Smart Switch with technical specifications label and screw terminals visible
    JY3FF-SH-DC5V-AK relay module with screw terminals and capacitors
    Relay module with capacitors and terminal block on a wooden surface
    Close-up of a PCB with AU5101XA chip and various surface-mount components.
  • #10 21817865
    gparduino
    Level 2  
    Posts: 12
    Rate: 1
    Updated the subflow to be more bulletproof and packaged it as a module that can be imported via Node-RED palette manager.
    Attachments:
    • node-red-contrib-openbeken-subflow-1.0.0.tgz (3.1 KB) You must be logged in to download this attachment.
  • #11 21911165
    Mushinronsha
    Level 5  
    Posts: 4
    I got a similar device that uses T1-CHL AU5102XA and I cannot flash it, it always fails to recognize the chip even when I power it from my benchtop PSU or shorting CEN to ground. What is baffling me is the fact that all pins seem to be the same, I verified this by continuity testing the testing pads on the PCB against the chip pad descriptions in the T1 datasheet. I also tried different chip types in EasyUartFlasher to no avail. Any thoughts/ideas?
  • ADVERTISEMENT
  • #12 21911220
    divadiow
    Level 38  
    Posts: 5062
    Help: 438
    Rate: 893
    got any pics of your device and wiring?
  • #13 21911854
    Mushinronsha
    Level 5  
    Posts: 4
    First of all, I'm really sorry for such a late reply. Now, as you can see from the pictures, it is literally the same thing except that 2 in the chip marking T1-CHL AU5102XA.
    Everything else, I think, is the same.
    Close-up of a PCB with SMD components, soldered wires, and a small push button Label on a “MINI Smart Switch” module with Wi‑Fi, power specs, and terminal markings..
  • #14 21911899
    divadiow
    Level 38  
    Posts: 5062
    Help: 438
    Rate: 893
    it does appear to be the same device

    Two close-ups of a PCB with soldered wires and labels GND, 3.3V, and CEN


    these strands here, are they fluff or actual solder/wire? are they causing a short?

    Close-up of a PCB showing an IC and a cluster of fine fibers near a soldered area
  • #15 21911974
    Mushinronsha
    Level 5  
    Posts: 4
    They are fluff from the cotton bud I used to clear flux off the chip, in order for the markings to be readable.
  • #16 21912799
    Mushinronsha
    Level 5  
    Posts: 4
    I decided to give it another go again today, and I tried any utilities like BKfil, BKwriter, etc. I could find. I even downloaded EZFlasher build 220, as OP had success with it. All to no avail. I think I wasted enough time with this, moving on.
  • #17 21912836
    divadiow
    Level 38  
    Posts: 5062
    Help: 438
    Rate: 893
    :(

    I'm curious to see the lengths of your wires, how you're powering the device, your rig as a whole.

    No worries if you've drawn a line under it all though and don't want to go back to it.
  • #18 21912999
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12632
    Even some USB to UART converters may be not reliable, it may be worth trying with another one.
    Helpful post? Buy me a coffee.
  • #19 21913034
    Mushinronsha
    Level 5  
    Posts: 4
    divadiow wrote:
    I'm curious to see the lengths of your wires, how you're powering the device, your rig as a whole.


    I removed the previous somewhat bigger whires and soldered a single strand 7 cm wire to each pad. It was not a matter of long wires/intereference or anything hardware related. I even tried using the CEN pad as a Rx and Tx to no avail. I also tried different settings like changing the serial port parity from the adapter's port settings but nothing worked. I ended up burning the chip because somehow I turned the knob to 18 V. Such a shame, not for the 2.5 € I bought the thing for, but for not getting a bin file.

    p.kaczmarek2 wrote:
    Even some USB to UART converters may be not reliable, it may be worth trying with another one.

    I have no reason to disagree with this as a principle since signal integrity is a bitch, but I've used it for flashing many devices, even soldered on bios chips in laptops, and I have nothing but good things to say about this thing.
  • #20 21913377
    iff7378
    Level 6  
    Posts: 10
    Help: 1
    Rate: 2
    Working on the same board, also having a tough time getting my USB UART programmer to dump the firmware. I've used this programmer many times, so I know it's good.

    I know it's getting power, as I can see the SmartHome WiFi network show up. Running
    python uartprogram firmware.bin -d /dev/ttyUSB0 -r
    fails to get the bus despite shorting CEN to ground. Edit: Also no luck with the Easy UART flasher on a Windows VM. I have the same T1-CHL AU5102XA chip.

    Printed a pogo pin adapter for it as well: https://www.printables.com/model/1741438-tuya-diy-smart-switch-pogo-pin-adapter
    Close-up of a black PCB with a tactile switch and SMD components on a wooden surface Wires connected to a USB hub and a small electronics module on a wooden tabletop Circuit board in a white housing and black foam block with metal pins on a wooden table
  • #21 21913407
    divadiow
    Level 38  
    Posts: 5062
    Help: 438
    Rate: 893
    out of interest what chips are your USB-TTL adaptors using? eg CH340G
  • #22 21913865
    iff7378
    Level 6  
    Posts: 10
    Help: 1
    Rate: 2
    >>21913407

    It's the CH340G, the Amazon ESP-01: ESP Prog V1.0 USB to ESP8266 CH340C ESP-01 ESP-01S 4MB Module Prog WiFi Programmer Downloader with Reset Auto-Download Circuit.
  • #23 21913940
    divadiow
    Level 38  
    Posts: 5062
    Help: 438
    Rate: 893
    OK.

    I assume the labelling in the pic in post #1 is correct, but have you verified each pad traces to the expected pin on the T1-CHL?
  • #24 21914045
    iff7378
    Level 6  
    Posts: 10
    Help: 1
    Rate: 2
    Hmm, I rung out the test pads with my multimeter and neither of the Tx ad Rx pads according to the image in the first post seem conected to the T1 chip at all. Cen, Gnd and Vcc all seem correct but no UART pins. Looked at the board through my microscope and those two pads are connected to TX1 (pin 29) and RX1 (pin 28). I have no idea why I'm not seeing a connection. Getting contact to the chip package itself is going to be hard.

    View through an optical eyepiece showing a magnified circuit board area with traces and solder points View through a round lens: close-up of a metal part with two screws
  • #25 21914571
    iff7378
    Level 6  
    Posts: 10
    Help: 1
    Rate: 2
    OK Progress! I got connected to the bus. Looks like my pogo pins weren't making good contact with the pads. I soldered wires on and things got better. However, now easy flasher is failing to set the baud rate? I tried 115200 and 921600. Both failed.

    Looks like the fastest it wants to go is 19200. Oh well, it's reading the chip at least!

    Edit: Got OBK on and working. Connected to a real power supply got faster data speeds.

Topic summary

✨ Six generic Tuya DIY smart switches with T1-CHL AU5101XA chips were tested for compatibility with OpenBK7238_QIO_1.18.247 firmware. Initial flashing attempts resulted in no device activity, no access point, and no LED indication. Partial success was achieved on two units by overwriting the bootloader, configuring OBK WiFi settings, and restoring the RF section, though these units showed identical MAC addresses and invalid RF data (FF FF). A recommended solution involves backing up and restoring the original RF data to the correct BK7238 memory location to avoid RF issues. A second batch of switches with the same chip name exhibited different flashing behavior and was successfully flashed by following a sequence: backing up and flashing with OpenBK7238 v247 while enabling automatic OBK configuration and backup restore without overwriting the bootloader, manually setting correct GPIO data before flashing, and restoring the RF section. This method enabled full functionality including OTA updates, access point creation, MAC address changes via GUI, MQTT, and Wi-Fi SSID changes.
Generated by the language model.
ADVERTISEMENT