logo elektroda
logo elektroda
X
logo elektroda

Flashing Tuya S06Pro IR Remote with CB3S Module via USB-to-TTL—Not Detected?

coherence_trio 135 1
ADVERTISEMENT
  • #1 21739353
    coherence_trio
    Level 2  
    I bought this Tuya S06Pro (Smart IR remote control with temperature and humidity sensors) from Aliexpress:
    https://www.aliexpress.com/item/1005006286419043.html

    I expected a micro-usb connection, but a USB-C cable was included (no power supply).

    ZY S06 PRO IR remote control box with temperature and humidity sensor
    Universal IR remote control with temperature and humidity sensor packaging
    Black USB-A to USB-C cable on wooden surface next to blue mat
    Paper instruction manual for IR remote control with temperature and humidity sensor
    Instruction manual for a smart IR remote with setup steps and feature descriptions.

    I tried to use `tuya-cloudcutter` but none of the Tuya Generic IR devices worked. I decided to open the case.

    It contains a CB3S, _not_ a WB3S like in this post: https://www.elektroda.com/rtvforum/topic3926882.html#21344074 The pins can be seen here: https://docs.libretiny.eu/boards/cb3s/ The board is labelled `S06ProT-T-CB3S_V1.1: 2025-06-20`

    I tried to use the front soldier pads. I soldered GND, 3V3, TXD and RXD, which I connected to a USB-to-TTL.

    S06ProT-T-CB3S PCB with connected wires and USB-C port on wooden surface

    I tried to read the firmware by running `ltchiptool --timed --verbose flash info beken-7231n --timeout 10`. The command fails to connect though. Here are the logs:
    
    ❯ ltchiptool --timed --verbose flash info beken-7231n --timeout 10
    D [      0.001] (+0.001s) Found Local data snapshot (v1.9.1) - .venv/lib/python3.12/site-packages/ltchiptool
    I [      0.002] (+0.000s) Available COM ports:
    I [      0.005] (+0.004s) |-- cu.usbserial-1110 - USB2.0-Serial - None (1A86/7523)
    I [      0.005] (+0.000s) |   |-- Selecting this port. To override, use -d/--device
    I [      0.005] (+0.000s) |-- cu.debug-console - n/a
    I [      0.005] (+0.000s) |-- cu.wlan-debug - n/a
    I [      0.021] (+0.016s) Connecting to 'Beken 7231N' on /dev/cu.usbserial-1110 @ 115200
    D [      0.021] (+0.000s) Linking: stage 0
    D [      1.541] (+1.519s) Linking: stage 1
    D [      2.556] (+1.015s) Linking: stage 2
    D [      4.280] (+1.724s) Linking: stage 3
    I [      4.287] (+0.007s) Connect UART1 of the BK7231 to the USB-TTL adapter:
    I [      4.287] (+0.000s)
    I [      4.287] (+0.000s)     --------+        +--------------------
    I [      4.287] (+0.000s)          PC |        | BK7231
    I [      4.287] (+0.000s)     --------+        +--------------------
    I [      4.287] (+0.000s)          RX | ------ | TX1 (GPIO11 / P11)
    I [      4.287] (+0.000s)          TX | ------ | RX1 (GPIO10 / P10)
    I [      4.287] (+0.000s)             |        |
    I [      4.287] (+0.000s)         GND | ------ | GND
    I [      4.287] (+0.000s)     --------+        +--------------------
    I [      4.287] (+0.000s)
    I [      4.287] (+0.000s) Using a good, stable 3.3V power supply is crucial. Most flashing issues
    I [      4.287] (+0.000s) are caused by either voltage drops during intensive flash operations,
    I [      4.287] (+0.000s) or bad/loose wires.
    I [      4.287] (+0.000s)
    I [      4.287] (+0.000s) The UART adapter's 3.3V power regulator is usually not enough. Instead,
    I [      4.287] (+0.001s) a regulated bench power supply, or a linear 1117-type regulator is recommended.
    I [      4.287] (+0.000s)
    I [      4.287] (+0.000s) To enter download mode, the chip has to be rebooted while the flashing program
    I [      4.287] (+0.000s) is trying to establish communication.
    I [      4.288] (+0.000s) In order to do that, you need to bridge CEN pin to GND with a wire.
    E [     24.807] (+20.519s) TimeoutError: Timed out attempting to link with chip
    E [     24.807] (+0.000s) |-- File ".venv/lib/python3.12/site-packages/bk7231tools/serial/linking.py", line 23, in connect
    


    I tried to short the CEN pin on the CB3S with the ground while the tool `ltchiptool` was showing the line `In order to do that, you need to bridge CEN pin to GND with a wire.`, but it didn't change anything.

    I then decided to try to solder directly on the CB3S module instead:

    Electronic module with CB3S chip on blue PCB with USB-C connector
    CB3S Bluetooth module on blue PCB with connected colored wires

    I ran the same `ltchiptool` command as above, even trying to short CEN-GND, but I got the exact same result: The tool cannot connect to the CB3S module.

    Am I doing something wrong? I'm out of ideas to try...

    Note 1: The PCB has a small "extending arm" which I believe are the temperature and humidity sensors (see bottom right of the back picture where we see the CB3S module). It's probably on this "arm" to isolate it thermally from the rest (that's my guess). This arm is really fragile! Be careful! I unfortunately broke it when connecting the USB-C cable. I only see two copper lanes going to the sensors, so maybe I could soldier some kind of bridge, but if I can't flash anything on this I won't be using it anyway...

    Note 2: My goal is to integrate this into Home Assistant, ideally using ESPHome on it. I want to be able to control my heat pumps' wall units.

    Thank you for any help!
  • ADVERTISEMENT
  • #2 21748777
    coherence_trio
    Level 2  
    >>21739353 I was able to read and write. I had to desolder two pins from the TuyaMCU. I used a multimeter to check continuity between the TX/RX pads (white and blue cable in the picture) and the TuyaMCU pins. The two pins were the two middle ones from the side near the USB-C connection.
    Close-up of an IC and PB3 label on a blue PCB with USB port and soldered wire


    Once the two pins were desoldered, running `ltchiptool` worked fine. Once it reached the message "In order to do that, you need to bridge CEN pin to GND with a wire", I shorted the CEN pin with GND as requested (see the pinouts here: https://docs.libretiny.eu/boards/cb3s/) and `ltchiptool` was able to pursue!

    Here's the logs when reading the chip info:
    Spoiler:

    
    ❯ ltchiptool --timed --verbose flash info beken-7231n --timeout 10
    D [      0.002] (+0.002s) Found Local data snapshot (v1.9.1) - .venv/lib/python3.12/site-packages/ltchiptool
    I [      0.002] (+0.000s) Available COM ports:
    I [      0.007] (+0.005s) |-- cu.usbserial-1110 - USB2.0-Serial - None (1A86/7523)
    I [      0.007] (+0.000s) |   |-- Selecting this port. To override, use -d/--device
    I [      0.025] (+0.018s) Connecting to 'Beken 7231N' on /dev/cu.usbserial-1110 @ 115200
    D [      0.025] (+0.000s) Linking: stage 0
    D [      1.550] (+1.525s) Linking: stage 1
    D [      2.569] (+1.019s) Linking: stage 2
    D [      4.294] (+1.725s) Linking: stage 3
    I [      4.301] (+0.007s) Connect UART1 of the BK7231 to the USB-TTL adapter:
    I [      4.301] (+0.000s)
    I [      4.301] (+0.000s)     --------+        +--------------------
    I [      4.301] (+0.000s)          PC |        | BK7231
    I [      4.301] (+0.000s)     --------+        +--------------------
    I [      4.301] (+0.000s)          RX | ------ | TX1 (GPIO11 / P11)
    I [      4.301] (+0.000s)          TX | ------ | RX1 (GPIO10 / P10)
    I [      4.301] (+0.000s)             |        |
    I [      4.301] (+0.000s)         GND | ------ | GND
    I [      4.301] (+0.000s)     --------+        +--------------------
    I [      4.301] (+0.000s)
    I [      4.301] (+0.000s) Using a good, stable 3.3V power supply is crucial. Most flashing issues
    I [      4.301] (+0.000s) are caused by either voltage drops during intensive flash operations,
    I [      4.301] (+0.000s) or bad/loose wires.
    I [      4.301] (+0.000s)
    I [      4.301] (+0.000s) The UART adapter's 3.3V power regulator is usually not enough. Instead,
    I [      4.301] (+0.000s) a regulated bench power supply, or a linear 1117-type regulator is recommended.
    I [      4.301] (+0.000s)
    I [      4.301] (+0.000s) To enter download mode, the chip has to be rebooted while the flashing program
    I [      4.301] (+0.000s) is trying to establish communication.
    I [      4.301] (+0.000s) In order to do that, you need to bridge CEN pin to GND with a wire.
    D [     13.305] (+9.004s) BK72xx connected - protocol: FULL, chip: BK7231N, bootloader: BK7231N_1_0_1, chip ID: 0x7231c, boot version: None
    I [     13.310] (+0.005s) |-- Success! Chip info: BK7231N
    I [     13.310] (+0.000s) Reading chip info...
    I [     13.310] (+0.000s) Chip: BK7231N
    D [     13.310] (+0.000s) Reading 4k page at 0x1D0000 (0.00%)
    D [     13.685] (+0.375s) Flash size - detecting...
    D [     14.045] (+0.360s)  - Checking wraparound at 0x211000
    D [     14.405] (+0.360s) Flash size detected - 0x200000
    I [     14.723] (+0.318s) +-----------------------+-------------------------------------+
    I [     14.723] (+0.000s) | Name                  | Value                               |
    I [     14.723] (+0.000s) +-----------------------+-------------------------------------+
    I [     14.723] (+0.000s) | Protocol Type         | FULL                                |
    I [     14.723] (+0.000s) | Chip Type             | BK7231N                             |
    I [     14.723] (+0.000s) | Bootloader Type       | BK7231N 1.0.1                       |
    I [     14.723] (+0.000s) | Chip ID               | 0x7231c                             |
    I [     14.723] (+0.000s) | Boot Version String   | N/A                                 |
    I [     14.723] (+0.000s) |                       |                                     |
    I [     14.723] (+0.000s) | MAC Address           | XX:XX:XX:XX:XX:XX                   |
    I [     14.723] (+0.000s) |                       |                                     |
    I [     14.723] (+0.000s) | Flash ID              | C8 40 15                            |
    I [     14.723] (+0.000s) | Flash Size (by ID)    | 2 MiB                               |
    I [     14.723] (+0.000s) | Flash Size (detected) | 2 MiB                               |
    I [     14.723] (+0.000s) |                       |                                     |
    I [     14.723] (+0.000s) | Encryption Key        | XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX |
    I [     14.724] (+0.001s) +-----------------------+-------------------------------------+
    I [     14.724] (+0.000s) |-- Finished in 14.717 s
    



    Here's the log when reading the firmware (took around 3 minutes):
    Spoiler:

    
     13:04:54 ❯ ltchiptool --timed --verbose flash read beken-7231n --timeout 10 s06pro_original_fw.bin
    D [      0.002] (+0.002s) Found Local data snapshot (v1.9.1) - .venv/lib/python3.12/site-packages/ltchiptool
    I [      0.002] (+0.000s) Available COM ports:
    I [      0.008] (+0.005s) |-- cu.usbserial-1110 - USB2.0-Serial - None (1A86/7523)
    I [      0.008] (+0.000s) |   |-- Selecting this port. To override, use -d/--device
    I [      0.025] (+0.017s) Connecting to 'Beken 7231N' on /dev/cu.usbserial-1110 @ 115200
    D [      0.025] (+0.000s) Linking: stage 0
    D [      0.563] (+0.538s) BK72xx connected - protocol: FULL, chip: BK7231N, bootloader: BK7231N_1_0_1, chip ID: 0x7231c, boot version: None
    I [      0.568] (+0.006s) |-- Success! Chip info: BK7231N
    I [      0.568] (+0.000s) Reading Flash (2 MiB) to 's06pro_original_fw.bin'
      [----------------------------------------------------------------]    0%D [      0.572] (+0.004s) Reading 4k page at 0x000000 (0.00%)
    D [      0.933] (+0.360s) Reading 4k page at 0x001000 (0.20%)
    D [      1.293] (+0.360s) Reading 4k page at 0x002000 (0.39%)
      [----------------------------------------------------------------]    0%  00:03:03D [      1.653] (+0.360s) Reading 4k page at 0x003000 (0.59
    %)
    D [      2.014] (+0.361s) Reading 4k page at 0x004000 (0.78%)
      [----------------------------------------------------------------]    0%  00:03:02D [      2.374] (+0.360s) Reading 4k page at 0x005000 (0.98
    %)
      [----------------------------------------------------------------]    1%  00:03:02D [      2.735] (+0.361s) Reading 4k page at 0x006000 (1.17
    %)
    [...]
    D [    187.140] (+0.360s) Checking CRC @ 0x1F0000..0x1F8000
      [###############################################################-]   98%  00:00:02D [    187.220] (+0.081s) Reading 4k page at 0x1F8000 (98.4
    4%)
    D [    187.580] (+0.360s) Reading 4k page at 0x1F9000 (98.63%)
    D [    187.940] (+0.360s) Reading 4k page at 0x1FA000 (98.83%)
      [###############################################################-]   99%  00:00:01D [    188.301] (+0.360s) Reading 4k page at 0x1FB000 (99.0
    2%)
    D [    188.661] (+0.360s) Reading 4k page at 0x1FC000 (99.22%)
    D [    189.021] (+0.361s) Reading 4k page at 0x1FD000 (99.41%)
      [###############################################################-]   99%  00:00:00D [    189.382] (+0.360s) Reading 4k page at 0x1FE000 (99.6
    1%)
    D [    189.742] (+0.360s) Reading 4k page at 0x1FF000 (99.80%)
    D [    190.102] (+0.360s) Checking CRC @ 0x1F8000..0x200000
      [################################################################]  100%
    I [    190.182] (+0.080s) |-- Finished in 190.174 s
    



    Writing the firmware took around 2 minutes:
    Spoiler:

    
    ❯ ltchiptool --timed --verbose flash write --timeout 10 ir-blaster-01_20251111_13h26.uf2
    I [      0.002] (+0.002s) Available COM ports:
    I [      0.005] (+0.003s) |-- cu.usbserial-1110 - USB2.0-Serial - None (1A86/7523)
    I [      0.005] (+0.000s) |   |-- Selecting this port. To override, use -d/--device
    D [      0.005] (+0.000s) Found Local data snapshot (v1.9.1) - .venv/lib/python3.12/site-packages/ltchiptool
    D [      0.005] (+0.000s) Detection: Detection(name='ir-blaster-01_20251111_13h26.uf2', size=2922496, type=<Type.VALID_UF2: 'UF2'>, file_type='
    UF2 - esphome 2025.10.4', offset=0, skip=0, length=2922496, family=<Family: BK7231N(0x7B3EF230), name=beken-7231n, parent=beken-72xx-gen1>, soc
    =None)
    I [      0.006] (+0.000s) Detected file type: UF2 - esphome 2025.10.4
    I [      0.051] (+0.046s) Connecting to 'Beken 7231N' on /dev/cu.usbserial-1110 @ 115200
    D [      0.051] (+0.000s) Linking: stage 0
    D [      0.588] (+0.537s) BK72xx connected - protocol: FULL, chip: BK7231N, bootloader: BK7231N_1_0_1, chip ID: 0x7231c, boot version: None
    I [      0.594] (+0.006s) |-- Success! Chip info: BK7231N
    I [      0.594] (+0.000s) Writing 'ir-blaster-01_20251111_13h26.uf2'
    I [      0.597] (+0.003s) |-- esphome 2025.10.4 @ 2025-11-11 13:25:55 -> cb3s
    Writing (0x011000)  [----------------------------------------------------------------]    0%D [      0.614] (+0.018s) Trying to unprotect flash
     memory...
    D [      0.638] (+0.024s) Erasing and writing at 0x11000 (0.00%)
    D [      0.638] (+0.000s)  - Checking block pre-erase @ 0x11000
    D [      0.653] (+0.015s)  - Trying to erase block @ 0x11000
    D [      0.717] (+0.064s)  - Checking block post-erase @ 0x11000
    D [      0.732] (+0.015s)  - Erase succeeded @ 0x11000
    D [      1.143] (+0.411s) Erasing and writing at 0x12000 (0.46%)
    Writing (0x011000)  [----------------------------------------------------------------]    0%  00:01:50D [      1.618] (+0.475s) Erasing and wri
    ting at 0x13000 (0.92%)
    Writing (0x011000)  [----------------------------------------------------------------]    1%  00:01:49D [      2.092] (+0.474s) Erasing and wri
    ting at 0x14000 (1.38%)
    Writing (0x011000)  [#---------------------------------------------------------------]    1%  00:01:49D [      2.567] (+0.474s) Erasing and wri
    ting at 0x15000 (1.84%)
    Writing (0x011000)  [#---------------------------------------------------------------]    2%  00:01:46D [      3.043] (+0.476s) Erasing and wri
    ting at 0x16000 (2.29%)
    Writing (0x011000)  [#---------------------------------------------------------------]    2%  00:01:45D [      3.520] (+0.477s) Erasing and wri
    ting at 0x17000 (2.75%)
    Writing (0x011000)  [##--------------------------------------------------------------]    3%  00:01:45D [      4.000] (+0.480s) Erasing and wri
    ting at 0x18000 (3.21%)
    Writing (0x011000)  [##--------------------------------------------------------------]    3%  00:01:43D [      4.479] (+0.479s) Erasing and wri
    ting at 0x19000 (3.67%)
    Writing (0x011000)  [##--------------------------------------------------------------]    4%  00:01:43D [      4.957] (+0.477s) Erasing and wri
    ting at 0x1A000 (4.13%)
    Writing (0x011000)  [##--------------------------------------------------------------]    4%  00:01:42D [      5.437] (+0.480s) Erasing and wri
    ting at 0x1B000 (4.59%)
    Writing (0x011000)  [###-------------------------------------------------------------]    5%  00:01:41D [      5.915] (+0.478s) Erasing and wri
    ting at 0x1C000 (5.05%)
    D [      6.393] (+0.478s) Erasing and writing at 0x1D000 (5.51%)
    Writing (0x011000)  [###-------------------------------------------------------------]    5%  00:01:40D [      6.873] (+0.480s) Erasing and wri
    ting at 0x1E000 (5.97%)
    Writing (0x011000)  [####------------------------------------------------------------]    6%  00:01:39D [      7.352] (+0.479s) Erasing and wri
    ting at 0x1F000 (6.43%)
    [...]
    Writing (0x011000)  [#########################################################-------]   90%  00:00:09D [     94.804] (+0.477s) Erasing and wri
    ting at 0xD6000 (90.42%)
    Writing (0x011000)  [##########################################################------]   90%  00:00:09D [     95.280] (+0.476s) Erasing and wri
    ting at 0xD7000 (90.88%)
    Writing (0x011000)  [##########################################################------]   91%  00:00:09D [     95.755] (+0.476s) Erasing and wri
    ting at 0xD8000 (91.34%)
    Writing (0x011000)  [##########################################################------]   91%  00:00:08D [     96.234] (+0.479s) Erasing and wri
    ting at 0xD9000 (91.79%)
    Writing (0x011000)  [###########################################################-----]   92%  00:00:08D [     96.714] (+0.480s) Erasing and wri
    ting at 0xDA000 (92.25%)
    Writing (0x011000)  [###########################################################-----]   92%  00:00:07D [     97.192] (+0.478s) Erasing and wri
    ting at 0xDB000 (92.71%)
    Writing (0x011000)  [###########################################################-----]   93%  00:00:07D [     97.670] (+0.478s) Erasing and wri
    ting at 0xDC000 (93.17%)
    Writing (0x011000)  [###########################################################-----]   93%  00:00:06D [     98.147] (+0.477s) Erasing and wri
    ting at 0xDD000 (93.63%)
    Writing (0x011000)  [############################################################----]   94%  00:00:06D [     98.625] (+0.478s) Erasing and wri
    ting at 0xDE000 (94.09%)
    Writing (0x011000)  [############################################################----]   94%  00:00:05D [     99.104] (+0.479s) Erasing and wri
    ting at 0xDF000 (94.55%)
    D [     99.584] (+0.479s) Erasing and writing at 0xE0000 (95.01%)
    Writing (0x011000)  [#############################################################---]   95%  00:00:04D [    100.061] (+0.478s) Erasing and wri
    ting at 0xE1000 (95.47%)
    D [    100.538] (+0.477s) Erasing and writing at 0xE2000 (95.92%)
    Writing (0x011000)  [#############################################################---]   96%  00:00:03D [    101.015] (+0.477s) Erasing and wri
    ting at 0xE3000 (96.38%)
    D [    101.492] (+0.477s) Erasing and writing at 0xE4000 (96.84%)
    Writing (0x011000)  [##############################################################--]   97%  00:00:02D [    101.968] (+0.476s) Erasing and wri
    ting at 0xE5000 (97.30%)
    D [    102.444] (+0.477s) Erasing and writing at 0xE6000 (97.76%)
    Writing (0x011000)  [##############################################################--]   98%  00:00:01D [    102.922] (+0.478s) Erasing and wri
    ting at 0xE7000 (98.22%)
    Writing (0x011000)  [###############################################################-]   98%  00:00:01D [    103.400] (+0.477s) Erasing and wri
    ting at 0xE8000 (98.68%)
    Writing (0x011000)  [###############################################################-]   99%  00:00:00D [    103.879] (+0.480s) Erasing and wri
    ting at 0xE9000 (99.14%)
    D [    104.359] (+0.480s) Erasing and writing at 0xEA000 (99.60%)
    D [    104.837] (+0.478s) OK!
    Writing (0x129F0A)  [###############################################################-]   99%  00:00:00D [    104.837] (+0.000s) Trying to unpro
    tect flash memory...
    D [    104.862] (+0.025s) Writing unaligned data...
    Booting firmware  [################################################################]  100%
    I [    104.927] (+0.065s) |-- Finished in 104.922 s
    



    The firmware I flashed was ESPHome, inspired by the docs for a S06: https://devices.esphome.io/devices/avatto-s06-ir-remote-no-temp-no-humidity-new-version/

    Notes:
    * Once I shorted CEN and GND, `ltchiptool` was able to read info, firmware and write firmware without having to re-short the pins.
    * I don't have a full ESPHome firmware yet. I'll be playing with the YAML but at least I can now flash it via wifi
    * I tried to solder back the broken arm where I believe the temperature and humidity sensors are located. I had to use a multimeter in continuity mode to track the four copper lanes from the sensors back to the main board. The first picture shows the side of the PCB opposite the C3BS. The green and red annotations track the copper lanes of that side. The second picture shows the side of the PCB with the C3BS. The black line is GND and the yellow line ends up going to the other side of the PCB. It ends up at the SDA pad on the other side; the first picture shows the continuation of the yellow line on that side. The last picture shows the broken arm, with the annotations of the colours.
    * I wasn't able to solder back the green and black (ground) cables on the broken arm as the target is too small. The red and yellow cables were fine.

    PCB with soil moisture sensor and colored wire connections marked
    PCB with CB3S module, annotated GND trace, components and edge connector
    Optical sensor module with color-marked signal paths on a small blue PCB
ADVERTISEMENT