logo elektroda
logo elektroda
X
logo elektroda

QS-wifi-S10-CT02 (CB2S) Flashing Guide for Offline Firmware Installation

jannie_doedel 1305 21
ADVERTISEMENT
  • #1 21611185
    jannie_doedel
    Level 2  
    I have recently bought a "2 gang wifi single phase clamp".
    model QS-wifi-S10-CT02
    It is based on a CB2S and used for monitoring power without disconnecting (via clamp)
    I was wondering if there is a flash instruction for new firmware that disconnects from internet?
    AI: Do you have a specific firmware in mind that you want to flash onto the QS-wifi-S10-CT02, like Tasmota, ESPHome, or something else?
    tasmota
    AI: Are you able to access the device's hardware for flashing (like using serial pins), or are you looking for a way to flash the firmware over the air (OTA)?
    yes
  • ADVERTISEMENT
  • #2 21611268
    p.kaczmarek2
    Moderator Smart Home
    Well, that's a device using BL0942 for power metering, right? I think you can just flash it easily with our flasher:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    Do you have any specific questions? Flasher should discover GPIO config automatically.
    Helpful post? Buy me a coffee.
  • #3 21611332
    jannie_doedel
    Level 2  
    [postid:b1eceb341b][/postid:b1eceb341b]
    I think it does. But doesn't it matter that there are only clamps? Or is that just a calibration I have to perform?

    QS-wifi-S10-CT02 (CB2S) Flashing Guide for Offline Firmware Installation
  • ADVERTISEMENT
  • #4 21611845
    jannie_doedel
    Level 2  
    used the flasher from your link.
    all looks fine. I can't access device via 192.168.4.1, I cannot find the AP
    What did I do wrong?

    QS-wifi-S10-CT02 (CB2S) Flashing Guide for Offline Firmware Installation
  • #5 21612049
    p.kaczmarek2
    Moderator Smart Home
    BL0942 is communicating with WiFi module via UART, so it does not matter that there is a current transformer on BL0942 side.

    Did you do full power off and on cycle?
    Helpful post? Buy me a coffee.
  • #6 21613761
    jannie_doedel
    Level 2  
    >>21612049 Yes I did full power cycle but still no AP
  • #7 21762729
    josemr
    Level 4  
    Good morning.
    I have this meter and I installed the OpenBK7231N_UG_1.18.47 firmware, but it only shows one meter reading.
    I also installed the OpenBK7231N_1.18.217 firmware, and the same thing happens: only one meter appears.
    I traced the circuits to both BL0942 transistors, and both have their TX and RX pins connected to the TX and RX pins of the CB2S.
    How can I get readings from both clamps?
    
    logtype none
    BL0942opts 3
    startDriver BL0942
    startDriver NTP
    ntp_timeZoneOfs 2:00
    SetupEnergyStats 1 60 5 
    ntp_setServer 0.kr.pool.ntp.org 


    Thank you
    OpenBK7231N control panel with energy, Wi-Fi, and MQTT state details
  • #8 21762793
    p.kaczmarek2
    Moderator Smart Home
    This topic is about single phase, but ok... how your device looks like? Dual bl0942?

    @XJ_ has made such driver and it works well I think.

    Related topic:
    https://www.elektroda.com/rtvforum/topic4086343-90.html#21454909

    You need a custom binary, but we have online builds system, so you don't need a toolchain. All can be done in Github.
    https://www.elektroda.com/rtvforum/topic4033833.html
    I think the define is:
    Code: C / C++
    Log in, to see the code

    ENABLE_BL_TWIN must be enabled (not commented)
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #9 21762809
    josemr
    Level 4  
    Hello again.
    The QS-wifi-S10-CT02 in this thread is a dual meter.
    It's exactly the same model I have. It has two BL0942s, one for each clamp.
    The difference with the model you mentioned is that this model communicates with two BL0942s via a UART port on the cB2S, while the one you mentioned communicates with each BL0942 via UART1 and UART2.
    Thanks for replying.
  • #10 21763803
    josemr
    Level 4  
    Good morning.
    I've run several tests.
    The first was with startDriver BL0942. I calibrated the BL0942, and it only gave me the result for one clamp (read the result of clamp number 2).
    Diagnostic panel of OpenBK with BL0942 data, showing power parameters and periodic stats.
    The second was with startDriver BL0942SPI. I calibrated the BL0942, and it gave me the result for both clamps, but it's not calculating the parameters correctly.
    Screenshot of OpenBK7231N interface showing BL0942 sensor data
    I don't know where to go from here. Any help would be appreciated.

    Added after 2 [hours] 15 [minutes]:

    Hello again.
    I've tried compiling a binary with ENABLE_BL_TWIN must be enabled.
    I'm unable to do so.
    I need a binary compiled with ENABLE_BL_TWIN must be enabled.
    How can I achieve this?

    Thanks
  • #11 21764249
    toufou54
    Level 2  
    >>21763803 Hi josemr,

    I've been working non-stop on this exact issue for the past 48 hours, and I can now confirm the root cause of the dual-channel problem.

    Hardware Architecture Confirmation:

    After carefully reading through this thread, I found the key information: the QS-wifi-S10-CT02 has two BL0942 chips communicating via a SINGLE shared UART port on the CB2S - NOT via separate UART1 and UART2 like other dual-meter designs. This specific hardware architecture is exactly what's causing our issues.

    What I Tested:

    I compiled a custom OpenBK7231N firmware with:
    - ENABLE_BL_TWIN explicitly enabled in obk_config.h
    - Both ENABLE_DRIVER_BL0942 and ENABLE_DRIVER_BL0942SPI active
    - Firmware compiled and flashed successfully via OTA

    Test Results (with 230V mains connected and loads on both clamps):
    - Voltage/frequency readings display on the web interface (likely default/cached values: 240V, 50Hz)
    - Zero current/power readings despite active loads connected to both clamps
    - Persistent checksum errors flooding the logs:

    Warn:EnergyMeter:Failed to read reg 03: bad checksum 00 wanted A4
    Warn:EnergyMeter:Failed to read reg 04: bad checksum 00 wanted A3
    Warn:EnergyMeter:Failed to read reg 06: bad checksum 00 wanted A1
    Warn:EnergyMeter:Failed to read reg 07: bad checksum 00 wanted A0
    Warn:EnergyMeter:Failed to read reg 08: bad checksum 00 wanted 9F


    Analysis:

    These errors prove that:
    1. Both BL0942 chips ARE physically responding to queries
    2. Their UART data frames collide and overlap when transmitted simultaneously on the shared bus
    3. The driver receives corrupted data (checksum 00 = no valid data/collision)
    4. Registers 03-08 (current, power, energy) cannot be read due to continuous frame corruption

    Root Cause:

    The ENABLE_BL_TWIN flag in OpenBK7231N was designed for hardware architectures where each BL0942 has its own dedicated UART (UART1 for chip 1, UART2 for chip 2).

    Our QS-wifi-S10-CT02 has a fundamentally different design: both BL0942s share the SAME UART bus. Without a proper addressing/polling protocol, when the firmware queries a register, both chips respond simultaneously → collision → unreadable data.

    The current OpenBK7231N driver lacks:
    - Individual chip addressing mechanism
    - Collision detection/avoidance
    - Sequential polling for shared-UART configurations

    Other Firmware Options:

    I also investigated alternatives:
    - ESPHome: Has an open GitHub issue (#10137) titled "bl0942 component doesn't work with multiple (2-3-4)" confirming the same limitation for multiple BL0942s on shared UART
    - Tasmota: BL0942 support exists but only for single-chip configurations; no shared-UART multi-chip support found

    Conclusion:

    This appears to be a fundamental limitation across ALL current open-source firmware options (OpenBK7231N, ESPHome, Tasmota). The shared-UART dual-BL0942 architecture of the QS-wifi-S10-CT02 is not supported by any existing open-source drivers.

    Available Options:
    1. Hardware modification: Physically disable one BL0942 (desolder or cut VCC trace) to eliminate collisions and get one working channel
    2. Wait for driver development: Submit feature requests to firmware projects for "twin BL0942 on shared UART" support (requires significant driver rewrite with addressing protocol)
    3. Accept limitation: Use device with single clamp only

    Question for the community: Has anyone successfully gotten both channels working simultaneously with this exact QS-wifi-S10-CT02 model using ANY firmware? If so, please share details!

    I'm documenting all findings and will submit detailed feature requests to the relevant GitHub repositories.
  • #12 21764305
    josemr
    Level 4  
    >>21764249 Hello, toufou54
    Thank you for your detailed response.
    The TX pins of the BL0942 are shared with the RX pins of the CB2S. One RX pin of the BL0942 connects to the TX pin of the CB2S, and the second RX pin of the BL0942 connects to pin P24 of the CB2S.
    Button P6 and led P7 the CB2S.
    QS-wifi-S10-CT02 (CB2S) Flashing Guide for Offline Firmware Installation


    Close-up of a PCB with BL0942 chip, capacitors, and screw terminal block
    CB2S module with visible pins labeled TX2, RX2, TX1, RX1, and P24
    Close-up of a PCB with two ICs and various surface-mounted components
    PCB with two IC chips, visible traces, resistors, and labeled components on grid background.
    CB2S module with visible pins and model marking on the label

    Could you explain how to send feature requests to firmware projects for dual BL0942 compatibility on a shared UART? Sorry for the English; it's a Google translation.
    Thank you.
  • ADVERTISEMENT
  • #13 21765482
    toufou54
    Level 2  
    ¡Sí, José, buen trabajo, gracias por los detalles y los esquemas! :D

    I'm a newbie here. This was my first post. I have to manage how to deal with the GitHub; for the moment I did a fork to build a firmware with good options enabled, and for now I have no time to consume on this project; my Windows is out of service and I'll take a lot of my time in the next days.

    I'm seriously considering sending it back to China, since I received another model that's fully compatible with the OpenBeken firmware...
  • #14 21766295
    p.kaczmarek2
    Moderator Smart Home
    i see, so that's new to me. I haven't seen that kind of connection yet.

    Your best chance is probably to use this modification and just alter code to work fon your pins:
    https://github.com/search?q=repo%3Aopenshwpro...penBK7231T_App%20ENABLE_BL_TWIN&type=code
    But I am suprised. Are you sure about P24?
    Part of an electronic schematic showing a BL0942 chip and label “P24 CBS”
    These are UART pins:
    
    6	P10/UART1_RXD
    27	P11/UART1_TXD
    28	P1/UART2_RXD/I2C2_SDA
    29	P0/UART2_TXD/I2C2_SCL
    

    P24 is not UART at all. So.... is this even UART? Or maybe SPI? Software SPI?


    How is SEL connected?
    Block diagram of BL0942 chip with UART/SPI interface and labeled output pins
    Diagram of BL0942 with pin 7 SEL highlighted and function table explaining its use
    Helpful post? Buy me a coffee.
  • #15 21766332
    josemr
    Level 4  
    >>21766295
    Thank you for your detailed response.
    SEL ---------------not connected
    CF1--------------not connected
    SCLK_BPS-------not connected
    TX----------------P24 CB2S
    RX----------------TX CB2S
    TX----------------RX CB2S
    RX----------------TX CB2S
    The provided link is unavailable.
    Thank you
  • #16 21766368
    p.kaczmarek2
    Moderator Smart Home
    So we would need a software UART? Very strange. @insmod any insights?
    Helpful post? Buy me a coffee.
  • #17 21766371
    josemr
    Level 4  
    >>21766368
    Screenshot of UART documentation with highlighted text about IC address settings
    Is it possible two BL0942 in one UART?
    I have the original backup and another device with the firmware unchanged, in case that's helpful.
  • #18 21766444
    p.kaczmarek2
    Moderator Smart Home
    Are your BL0942 in TSSOP14L package (14 pins)?
    Helpful post? Buy me a coffee.
  • #19 21766510
    josemr
    Level 4  
    Good morning.
    Please excuse my ignorance.
    BL0942 is a TSSOP-10 (10 pins).
    I looked up the datasheet and thought of that solution, but I see now that it's for a TSSOP-14L.

    If you're interested in this project, I'd be happy to help.

    My electronics and programming skills are very basic.

    I can't even manage to change the ENABLE_BL_TWIN setting and compile to run tests.

    Thank you for your help.
  • #21 21780804
    josemr
    Level 4  
    >>21780726
    Good evening.
    Thank you for your interest in this project.
    This energy meter has two BL0942 chips, but they are not connected to the two UARTs of the CB2S. The TX pins of the BL0942 chips are shared with the RX pin of the CB2S. One RX pin of the BL0942 chip is connected to the TX pin of the CB2S, and the other RX pin of the second BL0942 chip is connected to pin P24 of the CB2S.
    The firmware with ENABLE_BL_TWIN enabled does not work on this meter.
    I'll try bridging UART2 to BL0942 and testing the firmware with ENABLE_BL_TWIN enabled.

    However, this solution wouldn't be feasible for those without soldering skills.
  • #22 21780930
    XJ_
    Level 12  
    >>21780804
    Maybe you can try changing BL0942_UART_ADDR from 0 to 1..3 to test if on the same UART the second BL0942 will respond instead of the first.

    Added after 2 [minutes]:

    josemr wrote:
    the other RX pin of the second BL0942 chip is connected to pin P24 of the CB2S.

    I only noticed this now. So changing BL0942_UART_ADDR won't do anything, I think. It's only for the 14-pin version.

Topic summary

The QS-wifi-S10-CT02 is a 2 gang WiFi single-phase clamp meter based on the CB2S platform, designed for non-intrusive power monitoring using current clamps. The device employs the BL0942 chip for power metering. For flashing new firmware such as Tasmota to disable internet connectivity, the recommended method is using the BK7231GUIFlashTool, which can automatically detect GPIO configurations. Access to the device's hardware, including serial pins, is required for flashing. Calibration considerations arise due to the clamp-only measurement method.
Summary generated by the language model.
ADVERTISEMENT