logo elektroda
logo elektroda
X
logo elektroda

[Solved] Issues Flashing Tongou TO-Q-SY1_163JWT 63A Breaker with Openbk Using CH340G-2

Wobbie 2715 12
ADVERTISEMENT
  • #1 21168280
    Wobbie
    Level 3  
    Posts: 8
    Hello, I have a question about this Tongou TO-Q-SY1_163JWT 63 Amp Breaker.

    I am having difficulty flashing it with Openbk. I am familiar with the process and have successfully flashed other switch devices eg: [BK7231N] Aubess Mini Switch 16A.

    I use a USB / TTL serial device from China CH34
    USB to TTL CH340G adapter with connecting cables.
    0G-2 which has worked well in the past plus I swapped it out with an identical spare to confirm functionality.

    I am using the latest flasher bk7231flasher_1.3.3

    Attempts at flashing in place were unsuccessful so I decided to remove the CBU from the main board but still unsuccessful! Resetting the module by earthing CEN does not start the flash sequence (have tried many many times). Also trying another 3.3 v power source, swapping rx1 and tx1 on uart1 just in case but to no avail! I have a log output from uart2 but won't post it here as it may contain private details!

    Attaching it to Tuya Smart app all works OK, noticing the firmware is V 1.0.20. Is it possible that Tuya have disabled flashing (bootloader rom) somehow? I do notice on their web site "Flash and Authorize CB Modules"
    https://developer.tuya.com/en/docs/iot/CB-series-module?id=Kbruyciad6154


    Any tips or advice appreciated
    R
    Tongou TO-Q-SY1_163JWT 63 Amp switch circuit board with visible capacitors and CBU module. Close-up of the circuit board from the Tongou TO-Q-SY1_163JWT 63 Amp switch. Device update screen showing no updates available for Main Module and MCU version 1.0.20.
  • ADVERTISEMENT
  • Helpful post
    #2 21168693
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12357
    I think this device may be using RX/TX to communicate with another chip. What is the marking on the SOIC chip on the other side of the board? Is it BL0937?

    Can you check with multimeter where RX/TX connects?

    Maybe you need to desolder either CBU or the SOIC chip...
    Helpful post? Buy me a coffee.
  • Helpful post
    #3 21168807
    divadiow
    Level 38  
    Posts: 4852
    Help: 424
    Rate: 857
    Sounds like @Wobbie has already removed CBU.

    How about a different USB-TTL adaptor?
  • ADVERTISEMENT
  • #4 21168820
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12357
    Ah sorry, I see. Well, then maybe the CBU needs a better 3.3V power supply.
    https://www.youtube.com/watch?v=L6d42IMGhHw&l...CZDbczAXT94BuSGrd_GoM&ab_channel=Elektrodacom
    Helpful post? Buy me a coffee.
  • #5 21169437
    Wobbie
    Level 3  
    Posts: 8
    Thanks @p.kaczmarek2 and @divadiow
    As mentioned I have tried a different 3v3 power source.

    What USB-TTL adaptor do you suggest?

    Part of the captured uart2 output:
    V:BK7231N_1.0.1
    REG:cpsr spsr r13 r14
    SVC:000000D3 00401C1C 000033AC
    IRQ:000000d2 00000010 00401e0c a19cdfd3
    FIR:000000d1 00000010 00401ffc b887f1e0
    SYS:000000df 0040192c 00000158
    ST:00000000
    J 0x10000
    bk_misc_init_start_type 0 0
    prvHeapInit-start addr:0x411448, size:125880
    [Flash]id:0xeb6015
    [01-01 18:12:15 TUYA I][lr:0xa54bd] mqc app init ...
    [01-01 18:12:15 TUYA I][lr:0xb04ef] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
    [01-01 18:12:15 TUYA I][lr:0xb04ef] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
    [01-01 18:12:15 TUYA D][lr:0xb037b] Thread:sys_timer Exec Start. Set to Running Stat
    [01-01 18:12:15 TUYA D][lr:0xa53d7] mq_pro:5 cnt:1
    [01-01 18:12:15 TUYA D][lr:0xa53d7] mq_pro:31 cnt:2
    [01-01 18:12:15 TUYA D][lr:0xd5f5b] svc online log init success
    [01-01 18:12:15 TUYA D][lr:0xcd37f] read m:0 f:0 l:0
    [01-01 18:12:15 TUYA I][lr:0xb04ef] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
    [01-01 18:12:15 TUYA E][lr:0xb43c9] wd_protected_read fails gw_bi -23
    [01-01 18:12:15 TUYA D][lr:0xb463b] gw base read finish:-23
    [01-01 18:12:15 TUYA D][lr:0xd3b17] ty bt cmmod regist ok:1
    ...
    ...secret stuff!
    ...
    [PLATFORM DEBUG]UNKNOW EVENT:16
    [01-01 12:00:04 TUYA E][lr:0x5ac01] ERR BL0942 read
    [01-01 12:00:05 TUYA E][lr:0xd6b29] uf_open netcfg_log err 8
    [01-01 12:00:05 TUYA E][lr:0x5ac01] ERR BL0942 read.

    can send the entire log via PM if you like?
  • ADVERTISEMENT
  • #6 21169538
    divadiow
    Level 38  
    Posts: 4852
    Help: 424
    Rate: 857
    Wobbie wrote:
    What USB-TTL adaptor do you suggest


    I was clutching at straws with that idea really. I think maybe a different USB TTL has only made a difference once or twice for me in the past and that was probably when I wasn't soldering contacts or had the cables too long. Not needed to swap for a long time.

    What is your PSU now?
    Got any pics of your setup?

    Added after 58 [minutes]:

    here's a backup/flash I've just done from CBU using a CH340 USB-TTL and external 3.3v PSU

    Screenshot of BK7231 Easy UART Flasher program showing write success. Home setup for flashing a circuit using CH340 USB-TTL and an external 3.3V power supply. CH340 USB-TTL adapter connected to an external 3.3V power supply. Screenshot of USB-SERIAL CH340 properties window.
  • #7 21170683
    Wobbie
    Level 3  
    Posts: 8
    Well my flasher just ignores the fact that I either earth CEN or re-power the CBU! (multiple times)
    I'm using the same driver

    PSU is an adjustable one set to 3v3 (using a multimeter)
    Here is my setup
    Electronic setup with a microcontroller connected to several wires on a dark surface. Electronic setup with power supply, cables, and module.
  • #8 21170739
    divadiow
    Level 38  
    Posts: 4852
    Help: 424
    Rate: 857
    Ah. Are you able to shorten your wires as much as possible?
  • #9 21170837
    Wobbie
    Level 3  
    Posts: 8
    Yes, I tried that this afternoon with no luck.
    I also connected a tuya IR Blaster which I converted a year ago successfully and did a firmware read or backup using the same hardware, went perfectly.
    Not sure what's going on!
    Is it possible tuya have upped their game more? Locked the bootloader somehow?
  • ADVERTISEMENT
  • #10 21170906
    miegapele
    Level 16  
    Posts: 173
    Help: 15
    Rate: 29
    Use shorter wires, especially for power, and you can also use higher 3.6V voltage
  • #11 21170916
    divadiow
    Level 38  
    Posts: 4852
    Help: 424
    Rate: 857
    I'm not entirely sure how but I have seemingly killed tx and rx on a CB3S before. It boots into OBK fine but Rx and tx are dead for any USB TTL or any cables or any adaptor.

    Worst-case you could replace the CBU for another, assuming something similar has happened to yours?
  • #12 21171045
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14412
    Help: 650
    Rate: 12357
    I have flashes hundreds of devices and I haven't seen any with "locked bootloader". I would keep investigating the circuit.

    I'd suggest trying the USB to UART converter that I use:



    Wiring diagram for USB to UART highlighting reset paths.

    Try alternate RESET method:
    - connect only RX, TX, GND and 3.3V
    - start flasher
    - disconnect 3.3V from CBU
    - temporary short the GND to the 3.3V pin of CBU
    - disconnect the short of CBU 3.3V to gnd
    - connect 3.3V from supply to CBU
    It may sound strange but it worked for me in some cases where the little current sinked by TX/RX lines alone (without VDD) was enough to keep CBU alive so it didn't reboot on power off/on
    Helpful post? Buy me a coffee.
  • #13 21179077
    Wobbie
    Level 3  
    Posts: 8
    Thanks everyone, found my problem; RX connection got broken going into the CBU when removing from the main board (not enough flux I think)! Managed to fix it so happy ending.

Topic summary

✨ The discussion revolves around difficulties encountered while flashing the Tongou TO-Q-SY1_163JWT 63A breaker using Openbk and a CH340G-2 USB/TTL serial device. The user has successfully flashed other devices but faces challenges with this specific model, including issues with RX/TX connections and power supply. Various suggestions are made, including checking the SOIC chip, using different USB-TTL adapters, ensuring a stable 3.3V power supply, and shortening wire lengths. Ultimately, the user identifies a broken RX connection as the root cause of the problem, which was resolved, leading to a successful flashing process.
Generated by the language model.

FAQ

TL;DR: Struggling to flash a BK7231N breaker? After "hundreds of devices" flashed, an expert says "I haven't seen any with 'locked bootloader'." Fixes: solid 3.3 V, very short leads, isolate RX/TX, and use the alternate reset. [Elektroda, p.kaczmarek2, post #21171045]

Why it matters: This FAQ helps DIY tinkerers quickly diagnose OpenBK flashing failures on Tongou TO-Q-SY1_163JWT using CH340-based UART tools.

Quick Facts

How do I force the BK7231N CBU into flashing mode when CEN reset doesn’t work?

Use the alternate reset. Start the flasher, wire only RX, TX, GND, 3.3 V. Then force a hard reset. 1. Disconnect 3.3 V from CBU. 2. Briefly short CBU 3.3 V to GND, then remove the short. 3. Reconnect 3.3 V and let the flasher catch boot. This overcomes TX/RX leakage that keeps the CBU alive. Keep cables short and stable. [Elektroda, p.kaczmarek2, post #21171045]

Is Tuya locking the bootloader on BK7231N in this breaker?

No. “I haven’t seen any with ‘locked bootloader’.” Investigate wiring, power, and isolation instead. Use the alternate reset, ensure a clean 3.3 V, and minimize connections during flashing. Hardware issues, not firmware locks, typically block flashing. [Elektroda, p.kaczmarek2, post #21171045]

Which USB‑TTL adapter works best for OpenBK on this CBU?

A CH340-based USB‑TTL works well. One user backed up and flashed the CBU successfully using a CH340 plus an external 3.3 V supply. Keep wires short to reduce noise and voltage drop. This setup is reliable for BK7231N modules. [Elektroda, divadiow, post #21169538]

What voltage and wiring should I use for reliable flashing?

Provide a regulated 3.3 V directly to the CBU and keep all wires short. If the module still resists entry, try 3.6 V briefly. Short leads reduce IR drop and noise, improving bootloader timing. This small voltage bump can help marginal cases. [Elektroda, miegapele, post #21170906]

My flasher ignores CEN resets and power cycles. What should I try next?

Use the alternate reset sequence to fully discharge the module before reapplying power. Start the flasher first, then perform the short 3.3 V to GND pulse. Connect only RX, TX, GND, and VCC to avoid parasitic powering from other lines. This often restores the boot handshake. [Elektroda, p.kaczmarek2, post #21171045]

Could RX/TX be tied to another chip like BL0937/BL0942, blocking flash?

Yes. The UART lines may also connect to a companion SOIC (e.g., metering IC). Check continuity with a multimeter from the CBU pins. If shared, desolder either the CBU or the SOIC to isolate the UART before flashing. This prevents bus contention. [Elektroda, p.kaczmarek2, post #21168693]

I see logs on UART2 but still can’t flash. What does that indicate?

It confirms the module boots (e.g., BK7231N_1.0.1 appeared in logs). Focus on reset timing, wiring, and isolation rather than the logging UART. Avoid posting sensitive log details publicly. Ensure your flashing UART and ground references are correct. [Elektroda, Wobbie, post #21169437]

Can swapping to a different USB‑TTL adapter solve stubborn cases?

Sometimes, but it’s uncommon. Success was shown with a CH340 and external 3.3 V. Issues often stem from poor connections or long cables, not the adapter itself. Shorten leads and re‑solder joints before changing hardware. [Elektroda, divadiow, post #21169538]

What’s an edge case where the device boots but flashing still fails?

Damaged UART pins can break flashing. A CB3S case booted into OBK, yet TX/RX were dead to any adapter. If UART lines fail electrically, replace the module. This hardware failure mimics a software lock but is different. [Elektroda, divadiow, post #21170916]

How do I detect and fix a broken RX/TX trace or pad?

Probe continuity from the header to the CBU pins with a multimeter. Rework the joint with ample flux and thin solder. One user found a broken RX connection after removing the CBU; repairing it restored flashing immediately. [Elektroda, Wobbie, post #21179077]

Should I desolder the CBU from the main board to flash it?

Try in-circuit first. If UART lines are shared or power rails are noisy, remove the CBU for isolation. Alternatively, desolder the companion SOIC to free the UART. Reconnect only essential lines for flashing. [Elektroda, p.kaczmarek2, post #21168693]

What flasher version was reported working with BK7231N here?

The user reported using bk7231flasher_1.3.3. Ensure drivers are installed and the serial port matches. Start the flasher before doing the reset sequence so it catches the boot window. [Elektroda, Wobbie, post #21168280]

What stock firmware version was seen on the Tuya app for this breaker?

Firmware V1.0.20 was reported while the device functioned in the Tuya Smart app. Firmware presence does not imply a locked bootloader; focus on hardware flashing steps. [Elektroda, Wobbie, post #21168280]

Any final checklist before giving up on flashing?

Confirm stable 3.3–3.6 V at the CBU under load, ultra‑short leads, and clean solder joints. Isolate UART from other ICs, then use the alternate reset sequence. As an expert put it, locks weren’t observed across hundreds of devices. [Elektroda, p.kaczmarek2, post #21171045]
Generated by the language model.
ADVERTISEMENT