logo elektroda
logo elektroda
X
logo elektroda

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

Wobbie 1431 12
ADVERTISEMENT
  • #1 21168280
    Wobbie
    Level 3  
    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
    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.
  • ADVERTISEMENT
  • Helpful post
    #3 21168807
    divadiow
    Level 34  
    Sounds like @Wobbie has already removed CBU.

    How about a different USB-TTL adaptor?
  • #4 21168820
    p.kaczmarek2
    Moderator Smart Home
    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  
    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 34  
    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  
    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 34  
    Ah. Are you able to shorten your wires as much as possible?
  • #9 21170837
    Wobbie
    Level 3  
    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 15  
    Use shorter wires, especially for power, and you can also use higher 3.6V voltage
  • #11 21170916
    divadiow
    Level 34  
    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
    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  
    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.
Summary generated by the language model.
ADVERTISEMENT