logo elektroda
logo elektroda
X
logo elektroda

How To Flash T34-Based Smart Switch from Aliexpress With Tasmota/Esphome style firmware OBK

Mati Crawn 13338 78
ADVERTISEMENT
  • #61 21355560
    divadiow
    Level 35  
    your RX/TX cables look quite long. I tend to keep mine <10cm.

    So your primary source of power is the 3V3 from the USB-TTL adaptor going to here on this component?

    Close-up of a circuit board with various electronic components and a red marker.
  • ADVERTISEMENT
  • #63 21355587
    divadiow
    Level 35  
    well, my success is always with soldering short cables and using an external 3.3v PSU, not the USB-TTL power. Common grounds PSU<->USB-TTL
  • ADVERTISEMENT
  • #64 21355634
    no_cloud
    Level 6  
    >>21355587 ok I try, thanks

    Added after 10 [hours] 16 [minutes]:

    @divadiow Big thanks for your help.
    I have change TX and RX, i have short wire and add a other 3V3 power and soldering the TX and RX on circle.
    But flash don't run :-\

    I have make a video of complete installation.... i have no idea.


  • #65 21357215
    p.kaczmarek2
    Moderator Smart Home
    I would say your circut have no chances to work. You've made at least two mistakes:
    - your wires are way too long, it has been proved many times on this forum that shortening the wires helps a lot
    - you seem to be powering your device from 3.3V directly from USB to TTL, it does not have enough current to power WiFi module well
    If you really don't want to use external LDO like I do on my videos https://www.youtube.com/@elektrodacom , you can consider taking 5V from USB and connecting it to the INPUT of AMS1117-3.3V on the board, so the WiFi module still gets 3.3V from AMS1117-3.3V output. This method may or not may work, depending on the capacitors on the board...
    Helpful post? Buy me a coffee.
  • #66 21357381
    no_cloud
    Level 6  
    >>21357215
    Hello, thank you for your recommendation.
    I have tested with a little wire of 15 cm and I have made an external power by esp32 but nothing.
    I'm lost.... I don't understand.
    I have made flashing with your help for T34, perfectly but with this board, I don't understand ...
  • #68 21423820
    p.kaczmarek2
    Moderator Smart Home
    So how is this RF chip connect? It sounds like we need to have RF driver...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #69 21423826
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    So how is this RF chip connect? It sounds like we need to have RF driver...

    I've yet to explore further. RF remotes are added through the app with this device, unlike some, so there must be some comms to work out

    Added after 11 [minutes]:

    App interface for managing a WiFi and RF switch. App settings screen with relay status and RF remote control setup options. RF remote control setup screen with countdown timer and cat icon. App screen for RF remote control setup with two entries. Device update screen showing no available updates.

    Added after 9 [minutes]:

    any interesting driver clues?

    Screenshot showing a section of code with various file paths and functions related to RF drivers.
  • #70 21423938
    divadiow
    Level 35  
    Close-up of an integrated circuit labeled H3308 H0744 with the date 2024/08/20. Close-up of a circuit board with visible electronic components and an integrated circuit. Close-up of a circuit board with an electronic component marked H3308 H0744.Close-up of a green circuit board with various electronic components and labels.

    can't find any info on that RF chip - H3308 H0744
  • #71 21424393
    p.kaczmarek2
    Moderator Smart Home
    So it's a receiver?
    This is probably something like that:
    https://tasmota.github.io/docs/RF-Protocol/#receiving-rf-codes

    Added after 2 [minutes]:

    This is probably something like SYN531R C77785
    Circuit diagram of SYN531R application for RF signal reception.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #72 21424407
    divadiow
    Level 35  
    interesting. I have one of the cheapie logic analysers but not really engaged with it properly. Is that the next step? to sniff what it's up to?
  • #73 21424420
    p.kaczmarek2
    Moderator Smart Home
    You can try, later we could compare it with Tasmota RF receiver code and check if it 's the same protocol.

    Maybe that's it ?
    https://github.com/arendst/Tasmota/blob/0ba22.../tasmota_xdrv_driver/xdrv_17_rcswitch.ino#L86
    Would that mean that we need to port this?
    https://github.com/sui77/rc-switch/
    Helpful post? Buy me a coffee.
  • #74 21427559
    divadiow
    Level 35  
    seems I need to watch some basic Sigrok YouTube vids again.

    Screenshot from PulseView software displaying a logic analyzer with visible digital signals on multiple channels.
  • #75 21427880
    p.kaczmarek2
    Moderator Smart Home
    I'd say change the sampling rate, 20kHz in the dropdown, change it to higher frequency, maybe?
    Helpful post? Buy me a coffee.
  • #76 21468393
    iot_blanken
    Level 1  
    I received a different version of the mini smart switch. I was unable to flash the board over the air with tuya cloudcutter. As you can see the T34 pins are hidden. I understand that I can get 3.3V and ground pins from the AMS1117 chip but I have no idea where to get TX and RX from. Does anyone have the same board and was successful in flashing it?

    Mini smart switch with visible components held in hand. Mini smart switch PCB with hidden T34 pins.
  • #77 21523814
    viniciusvbf
    Level 1  
    For the new chips, it's almost impossible to do it without microsoldering. The pad for the pin 25 is pulled up with a 10k resistor and a capacitor, I don't know why. I had to remove both. Also, the pad for the pin 26 is not connected to anything. I had to remove the chip, add a fake pad, resolder the chip and finally flash firmware.
    Images for reference. I'll only buy modules from the "brand" Avatto from now on. They're much simpler to flash and to work with, and the build quality is better than the Tuyas. If you're buying modules to flash new firmware, I highly recommend buying from this brand. Cheers!
    Macro photo of a PCB fragment with SMD components and an empty spot for an integrated circuit.
    Close-up of a blue printed circuit board with SMD components and an empty socket for an integrated circuit.
    Close-up of a PCB with two thin wires soldered to specific pads and secured with glue.
  • Helpful post
    #78 21528802
    pppp73
    Level 11  
    Hello,
    I also have Smart switches like the one described at the beginning of the topic and I also have problems with them like many of the writers, except that I have found a workaround for the problem.
    In a nutshell:
    - layout, connection as in this post
    - problem with reading and writing via BK7231Flasher (Ubuntu 24, wine), the program reads keys and efuse and crashes on reading memory, writing erases memory and reports an error.

    I am using cables about 20cm, power was from a USB adapter, later I changed to a power bank saute biting directly 3.2V (e.g. https://pl.aliexpress.com/item/1005006403572331.html) but it did not help much.

    In the end instead of BK7231Flasher I used hid_download_py for both read and write memory. As a batch I used OpenBK7231N_QIO_1.18.92.bin downloaded on previous attempts by BK7231Flasher. The module started, it works, it integrates with the HA without any problem, even the pin configuration loaded automagically.

    I attach a snapshot of the clean (unconfigured) module and cobbled together logs from my failed attempts to use BK7231Flasher.
  • #79 21534712
    ausalex
    Level 3  
    >>21468393

    Did you find a solution, just had the same delivered today and trying to find how to get esphome on it?

Topic summary

The discussion focuses on flashing T34-based smart switches purchased from AliExpress, which use the BK7231N chip, with custom firmware such as OpenBeken (OBK), Tasmota, or ESPHome-style firmware. Two hardware variants were identified: one with the pushbutton on the back and another on the front, both sharing the same baseboard design. Users encountered challenges flashing these devices using the Tuya Cloudcutter due to firmware version 1.3.10 being non-flashable via cloud methods. Successful flashing requires direct UART access, often achieved by soldering or using needle pins on test pads or chip pins 25 (RX) and 26 (TX). A pull-down resistor labeled BR4 on the PCB aids in accessing the TX pin. Power supply stability is critical; USB-TTL adapters often lack sufficient current, so external 3.3V power supplies or powering through the AMS1117-3.3V regulator input are recommended. Short, direct wiring and proper connection of RX/TX lines (crossed correctly) are essential to avoid communication errors. Flashing tools like BK7231Flasher sometimes fail due to power or connection issues; alternatives like hid_download_py have proven more reliable. Some users reported needing to overwrite the bootloader to restore UART functionality. For newer or different board revisions, microsoldering and hardware modifications (removing resistors/capacitors) may be necessary. The community shared various soldering techniques, including solder-less needle pin methods and glue gun fixtures for stable connections. MQTT integration with Home Assistant works well after flashing, though some configuration flags may need adjustment to enable full telemetry. Additionally, a variant with an unmarked RF chip (possibly SYN531R) was discussed, with suggestions to analyze its protocol for remote control support. Overall, the thread provides detailed practical advice on hardware identification, wiring, power considerations, flashing procedures, and firmware configuration for T34/BK7231N smart switches from AliExpress.
Summary generated by the language model.
ADVERTISEMENT