logo elektroda
logo elektroda
X
logo elektroda

[BK7231N/CB2S] KMC Smart Tap Mini Teardown and configuration

mjspez 4941 54
ADVERTISEMENT
  • Remove 4 screws from back.
    plate appears to be clipped in place but its not. only friction holds it on.
    use something to gently pry along the edge and lift over the plug.
    remove the 2 screws from the circuit board and take it out of the case.
    remove the CB2S chip from the board with a soldering iron, and solder wick or a heat gun.
    careful not to damage the pads as shown in the photo
    circuit interferes with chip flashing.
    it might be possible to remove a capacitor or other component for same affect
    Pins on CB2S chip are clearly labeled.
    attach serial programmer to 3.3 GND TX and RX as usual.
    Flash chip and reassemble.

    Pin configuration
    P6 (PWM0) Rel 5
    P11 (TXD1) WifiLED_n
    P24 (PWM4) Rel 0
    P26 (PWM5) Rel 2


    [BK7231N/CB2S] KMC Smart Tap Mini Teardown and configuration [BK7231N/CB2S] KMC Smart Tap Mini Teardown and configuration [BK7231N/CB2S] KMC Smart Tap Mini Teardown and configuration [BK7231N/CB2S] KMC Smart Tap Mini Teardown and configuration [BK7231N/CB2S] KMC Smart Tap Mini Teardown and configuration [BK7231N/CB2S] KMC Smart Tap Mini Teardown and configuration [BK7231N/CB2S] KMC Smart Tap Mini Teardown and configuration

    Cool? Ranking DIY
    About Author
    mjspez
    Level 1  
    Offline 
    mjspez wrote 1 posts with rating 2. Been with us since 2023 year.
  • ADVERTISEMENT
  • #2 20444331
    p.kaczmarek2
    Moderator Smart Home
    Hello, your configuration specifies 3 relays and WiFi led, but the device seem to have 4 relays. Is your configuration complete?

    It is also worth to note the device marking:
    - Model 30407
    - FCC ID 2AFNL-TYWE3S
    It's interesting that FCC ID indicates wrong WiFi module.
    Helpful post? Buy me a coffee.
  • #3 20803474
    omniron
    Level 10  
    Hi there,
    I purchased another KMC set which now have the stupid Tuya cbs2 clone.
    The KMC-30407 were nice an sturdy units as they could be screwed into the socket (instead of just inserted).
    However the Tuya chip cancer has changed these, too!

    As mentioned here
    it says on the case
    FCC ID 2AFNL-TYWE3S
    but it has a CB2S with the stupid BK7231N chip!
    So these are *NOT* approved by the FCC!
    All of the approved units were using TYWE3S units as documented and pictured on FCC
    Tuya claims that the CB2S is FCC approved, but they cannot just slap their stupid Tuya chips on those units and keep FCC compliance.

    I am sooo dissapointed, this is the third newly bought unit which was changed to BK7231.
    Shame on you Tuya!

    I tried to flash them OTA (can't remove the CBS2), but it has the same issues as mentioned here:
    https://github.com/tuya-cloudcutter/tuya-cloudcutter/issues/514

    I thought that at least these KMC-30407 are supported by OpenBK7231??
    mjspez, what firmware did you use?

    Hinzugefügt nach 4 [Minuten]:

    Photo of the interior of the KMC-30407 electrical circuit with visible components. Circuit board with electronic components, including capacitors and an RF module. Close-up of an internal part of an electronic device with a visible CB2S chip. Smart plug PCB with YONGWEI relays. Close-up of a circuit board with YONGWEI Y32F relays. Close-up of internal circuitry on a PCB with electronic components. Open casing of KMC Smart Tap Mini showing internal components with a leaflet beside it. Label on KMC device model 30407 with electrical information and warning. [/img]

    Hinzugefügt nach 41 [Sekunden]:

    https://github.com/tuya-cloudcutter/tuya-clou...s/kmc-30407-smart-tap-mini-4-outlet-plug.json

    kmc-30407-smart-tap-mini-4-outlet-plug

    CB2S RF chip BK7231N

    Pin configuration
    P6 Rel2
    P24 Rel1
    P26 Rel 3
    RX1 button
    TX1 LED

    Notes:
    ALL 3 relays turn on and off at the same time!
    The relays cannot be controlled indiviually.
    They switch on/off when the button is RELEASED (not pressed).
    Two of the realys are rated for 15A, the other 12A.
    Maybe a better software than the existing stupid Tuya can control the relays individually?
    The circuit supports three individual controls.
    RX1 has an RC to GND.

    Definitions:
    VCC 3.3V of KP15052 DC/DC converter, KP1505X_REV1.04_EN.pdf
    GND minus of MB10F

    J1 15A Relais, switches plug 2
    J2 12A Relais, switches plug 3
    J3 15A Relais, switches plug 1

    SM2 mini button

    R5,7,9,12 1K
    R4,6,8 10K
    R13 4K7
    Q1-3 J3Y Transistor
    C4 small ceramic capacitor

    Partial Circuit:

    P6--R9-bQ1c-J2
    GND-R8-bQ1e-GND

    P24-R7-bQ2c-J1
    GND-R6-bQ2e-GND

    P26-R5-bQ3c-J3
    GND-R4-bQ3e-GND

    RX1-R13-aSM2a-C4-GND
    SM2b-VCC

    TX1-cLED
    RX1-R12-aLED
  • #4 20803524
    p.kaczmarek2
    Moderator Smart Home
    Everything in OBK is fully scriptable, you can easily support that device and script it for each relay to work with single click, double click, or triple click. We already have examples for that in our docs.
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20804642
    omniron
    Level 10  
    Wow that's impressive, didn't know that, thanks!

    My problem is that I cannot remove the small boards and must flash OTA.
    I was able to flash all ESP devices with Tasmota OTA, no problem.
    But most of the new bought devices are now with BK7231 and I cannot flash them anymore!
    The Schuko SWP86 (now BK7231)
    Xenon SM-PW801-U2 (new design, now BK7231)
    and even the
    KMC 30407 profile: https://github.com/tuya-cloudcutter/tuya-clou...s/kmc-30407-smart-tap-mini-4-outlet-plug.json
    fail.
    What am I doing wrong, especially since the KMC 30407 actually has a profile here?
    Can you please help me to get these going OTA?

    admin@raspberrypi:~/tuya-cloudcutter $ sudo ./tuya-cloudcutter.sh
    Building cloudcutter docker image
    [+] Building 4.4s (13/13) FINISHED                                                                                                                                      docker:default
     => [internal] load .dockerignore                                                                                                                                                 0.3s
     => => transferring context: 2B                                                                                                                                                   0.0s
     => [internal] load build definition from Dockerfile                                                                                                                              0.7s
     => => transferring dockerfile: 460B                                                                                                                                              0.0s
     => [internal] load metadata for docker.io/library/python:3.9.12-slim-buster                                                                                                      1.7s
     => [base 1/2] FROM docker.io/library/python:3.9.12-slim-buster@sha256:830e161433edfe047a23ebc99c12ee0eb1dc0a50e6b5f1c98e869ac271786632                                           0.0s
     => [internal] load build context                                                                                                                                                 0.3s
     => => transferring context: 3.02kB                                                                                                                                               0.0s
     => CACHED [base 2/2] RUN apt-get -qq update && apt-get install -qy --no-install-recommends git hostapd rfkill dnsmasq build-essential libssl-dev iproute2 mosquitto              0.0s
     => CACHED [python-deps 1/4] RUN pip install --upgrade pipenv                                                                                                                     0.0s
     => CACHED [python-deps 2/4] COPY src/Pipfile /src/                                                                                                                               0.0s
     => CACHED [python-deps 3/4] COPY src/Pipfile.lock /src/                                                                                                                          0.0s
     => CACHED [python-deps 4/4] RUN cd /src && PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy                                                                                      0.0s
     => CACHED [cloudcutter 1/2] COPY src /src                                                                                                                                        0.0s
     => CACHED [cloudcutter 2/2] WORKDIR /src                                                                                                                                         0.0s
     => exporting to image                                                                                                                                                            0.2s
     => => exporting layers                                                                                                                                                           0.0s
     => => writing image sha256:00c95fef6751041c2d9df9eea78cda2592a9c7fc9dce879a7541d0db5eee295c                                                                                      0.1s
     => => naming to docker.io/library/cloudcutter                                                                                                                                    0.1s
    Successfully built docker image
    1) Detach from the cloud and run Tuya firmware locally
    2) Flash 3rd Party Firmware
    [?] Select your desired operation [1/2]: 2
    Loading options, please wait...
    [?] How do you want to choose the device?: By manufacturer/device name
     > By manufacturer/device name
       By firmware version and name
       From device-profiles (i.e. custom profile)
    [?] Select the brand of your device: KMC
       Horevo
       Hykolity
       IWIIK
       Immax
       Jiangsu Barep
       KHSUIN
     > KMC
       KOGAN
       Kanlux
       Klarstein
       Kobi
       Kuled
       LEDLUMEN
    [?] Select the article number of your device: 30407 Smart Tap Mini 4 Outlet Plug
       30153 Smart Plug Mini
     > 30407 Smart Tap Mini 4 Outlet Plug
    [?] Select the firmware version and name: 1.1.8 - BK7231T / oem_bk7231s_rnd_switch
     > 1.1.8 - BK7231T / oem_bk7231s_rnd_switch
    Performing safety checks to make sure all required ports are available
    Checking UDP port 53... Available.
    Checking UDP port 67... Available.
    Checking TCP port 80... Available.
    Checking TCP port 443... Available.
    Checking TCP port 1883... Occupied by mosquitto with PID 662.
    Port 1883 is needed to run MQTT
    Do you wish to terminate mosquitto? [y/N] y
    Attempting to stop mosquitto.service
    Checking TCP port 8886... Available.
    Safety checks complete.
    [?] Select your custom firmware file for BK7231T chip: OpenBeken-v1.17.262_bk7231t.ug.bin
       ESPHome-Kickstart-v23.08.29_bk7231t_app.ota.ug.bin
     > OpenBeken-v1.17.262_bk7231t.ug.bin
    Selected Device Slug: kmc-30407-smart-tap-mini-4-outlet-plug
    Selected Profile: oem-bk7231s-rnd-switch-1.1.8-sdk-1.0.2-40.00
    Selected Firmware: OpenBeken-v1.17.262_bk7231t.ug.bin
    ================================================================================
    Place your device in AP (slow blink) mode.  This can usually be accomplished by either:
    Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times.  Some devices need 4 or 5 times on each side of the pause
    Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
    See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    ================================================================================
    Scanning for open Tuya SmartLife AP
    .....
    Found access point name: "SmartLife-4CA3", trying to connect...
    Device 'wlan0' successfully activated with '9ea4e1c7-1a1d-4d26-a15f-d49fc6eac10c'.
    Connected to access point.
    Waiting 1 sec to allow device to set itself up...
    Running initial exploit toolchain...
    Exploit run, saved device config too!
    output=/work/configured-devices/Cdh3UcKVKTtE.deviceconfig
    Saved device config in /work/configured-devices/Cdh3UcKVKTtE.deviceconfig
    ================================================================================
    Power cycle and place your device in AP (slow blink) mode again.  This can usually be accomplished by either:
    Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times.  Some devices need 4 or 5 times on each side of the pause
    Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
    See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    ================================================================================
    Scanning for open Tuya SmartLife AP
    Found access point name: "SmartLife-4CA3", trying to connect...
    (process:2703): GLib-GIO-WARNING **: 16:14:15.149: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/193 but no object proxy exists
    (process:2703): GLib-GIO-WARNING **: 16:14:15.153: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/194 but no object proxy exists
    Device 'wlan0' successfully activated with '016f0fae-cf0c-45bb-bc3e-a168c54a77e7'.
    Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got
    192.168.175.1
    .
    Found access point name: "SmartLife-4CA3", trying to connect...
    (process:2917): GLib-GIO-WARNING **: 16:14:50.171: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/231 but no object proxy exists
    (process:2917): GLib-GIO-WARNING **: 16:14:50.172: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/232 but no object proxy exists
    (process:2917): GLib-GIO-WARNING **: 16:14:50.172: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/233 but no object proxy exists
    Device 'wlan0' successfully activated with '7c96d8ff-de93-4143-8ed9-99ed7ff2f5e5'.
    Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got
    192.168.175.1
    .
    Found access point name: "SmartLife-4CA3", trying to connect...
    (process:3128): GLib-GIO-WARNING **: 16:15:03.230: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/257 but no object proxy exists
    Device 'wlan0' successfully activated with '5948016d-786a-454e-bede-701b8daac995'.
    Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got
    192.168.175.1
    .
    Found access point name: "SmartLife-4CA3", trying to connect...
    (process:3340): GLib-GIO-WARNING **: 16:15:16.266: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/281 but no object proxy exists
    (process:3340): GLib-GIO-WARNING **: 16:15:16.270: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/282 but no object proxy exists
    (process:3340): GLib-GIO-WARNING **: 16:15:16.270: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/283 but no object proxy exists
    (process:3340): GLib-GIO-WARNING **: 16:15:16.273: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/284 but no object proxy exists
    (process:3340): GLib-GIO-WARNING **: 16:15:16.277: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/285 but no object proxy exists
    Device 'wlan0' successfully activated with '843c8d01-6c9e-4b2d-bf11-16a987431877'.
    Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got
    192.168.175.1
    .
    Found access point name: "SmartLife-4CA3", trying to connect...
    (process:3552): GLib-GIO-WARNING **: 16:15:29.479: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/305 but no object proxy exists
    Device 'wlan0' successfully activated with 'e1a67b46-4cc0-4f53-814b-bed4ad0559c3'.
    Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got
    192.168.175.1
    Error, could not connect to SSID.
    Failed to connect, please run this script again
    admin@raspberrypi:~/tuya-cloudcutter $ 
    ******************************************************************************************************************
    new try with inline command
    ******************************************************************************************************************
    admin@raspberrypi:~/tuya-cloudcutter $ sudo ./tuya-cloudcutter.sh -s tasmo 12345678 -p kmc-30407-smart-tap-mini-4-outlet-plug
    Building cloudcutter docker image
    [+] Building 4.4s (13/13) FINISHED                                                                                                                                      docker:default
     => [internal] load build definition from Dockerfile                                                                                                                              0.3s
     => => transferring dockerfile: 460B                                                                                                                                              0.0s
     => [internal] load .dockerignore                                                                                                                                                 0.7s
     => => transferring context: 2B                                                                                                                                                   0.0s
     => [internal] load metadata for docker.io/library/python:3.9.12-slim-buster                                                                                                      2.1s
     => [base 1/2] FROM docker.io/library/python:3.9.12-slim-buster@sha256:830e161433edfe047a23ebc99c12ee0eb1dc0a50e6b5f1c98e869ac271786632                                           0.0s
     => [internal] load build context                                                                                                                                                 0.2s
     => => transferring context: 3.02kB                                                                                                                                               0.0s
     => CACHED [base 2/2] RUN apt-get -qq update && apt-get install -qy --no-install-recommends git hostapd rfkill dnsmasq build-essential libssl-dev iproute2 mosquitto              0.0s
     => CACHED [python-deps 1/4] RUN pip install --upgrade pipenv                                                                                                                     0.0s
     => CACHED [python-deps 2/4] COPY src/Pipfile /src/                                                                                                                               0.0s
     => CACHED [python-deps 3/4] COPY src/Pipfile.lock /src/                                                                                                                          0.0s
     => CACHED [python-deps 4/4] RUN cd /src && PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy                                                                                      0.0s
     => CACHED [cloudcutter 1/2] COPY src /src                                                                                                                                        0.0s
     => CACHED [cloudcutter 2/2] WORKDIR /src                                                                                                                                         0.0s
     => exporting to image                                                                                                                                                            0.1s
     => => exporting layers                                                                                                                                                           0.0s
     => => writing image sha256:00c95fef6751041c2d9df9eea78cda2592a9c7fc9dce879a7541d0db5eee295c                                                                                      0.0s
     => => naming to docker.io/library/cloudcutter                                                                                                                                    0.1s
    Successfully built docker image
    Loading options, please wait...
    Performing safety checks to make sure all required ports are available
    Checking UDP port 53... Available.
    Checking UDP port 67... Available.
    Checking TCP port 80... Available.
    Checking TCP port 443... Available.
    Checking TCP port 1883... Available.
    Checking TCP port 8886... Available.
    Safety checks complete.
    Selected Device Slug: kmc-30407-smart-tap-mini-4-outlet-plug
    Selected Profile: oem-bk7231s-rnd-switch-1.1.8-sdk-1.0.2-40.00
    ================================================================================
    Place your device in AP (slow blink) mode.  This can usually be accomplished by either:
    Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times.  Some devices need 4 or 5 times on each side of the pause
    Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
    See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    ================================================================================
    Scanning for open Tuya SmartLife AP
    ...
    Found access point name: "SmartLife-4CA3", trying to connect...
    (process:4451): GLib-GIO-WARNING **: 18:12:02.231: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/796 but no object proxy exists
    (process:4451): GLib-GIO-WARNING **: 18:12:02.234: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/797 but no object proxy exists
    (process:4451): GLib-GIO-WARNING **: 18:12:02.237: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/799 but no object proxy exists
    (process:4451): GLib-GIO-WARNING **: 18:12:02.240: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/798 but no object proxy exists
    Device 'wlan0' successfully activated with '73c260b5-90f3-41b1-b08a-d98c1553863e'.
    Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got
    192.168.175.1
    .
    Found access point name: "SmartLife-4CA3", trying to connect...
    (process:4665): GLib-GIO-WARNING **: 18:12:15.224: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/823 but no object proxy exists
    (process:4665): GLib-GIO-WARNING **: 18:12:15.225: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/824 but no object proxy exists
    (process:4665): GLib-GIO-WARNING **: 18:12:15.225: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/825 but no object proxy exists
    (process:4665): GLib-GIO-WARNING **: 18:12:15.226: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/826 but no object proxy exists
    (process:4665): GLib-GIO-WARNING **: 18:12:15.226: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/827 but no object proxy exists
    (process:4665): GLib-GIO-WARNING **: 18:12:15.226: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/828 but no object proxy exists
    Error: Connection activation failed: (53) The Wi-Fi network could not be found.
    (process:4678): GLib-GIO-WARNING **: 18:12:42.489: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/838 but no object proxy exists
    (process:4678): GLib-GIO-WARNING **: 18:12:42.500: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/839 but no object proxy exists
    (process:4678): GLib-GIO-WARNING **: 18:12:42.500: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/841 but no object proxy exists
    (process:4678): GLib-GIO-WARNING **: 18:12:42.503: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/843 but no object proxy exists
    (process:4678): GLib-GIO-WARNING **: 18:12:42.504: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/849 but no object proxy exists
    (process:4678): GLib-GIO-WARNING **: 18:12:42.504: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/844 but no object proxy exists
    (process:4678): GLib-GIO-WARNING **: 18:12:42.505: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/845 but no object proxy exists
    .
    Found access point name: "SmartLife-4CA3", trying to connect...
    (process:4736): GLib-GIO-WARNING **: 18:12:52.877: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/860 but no object proxy exists
    (process:4736): GLib-GIO-WARNING **: 18:12:52.880: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/861 but no object proxy exists
    (process:4736): GLib-GIO-WARNING **: 18:12:52.882: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/862 but no object proxy exists
    Device 'wlan0' successfully activated with 'fb87b045-dbbe-4b71-ac47-48f2642a5080'.
    Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got
    192.168.175.1
    .
    Found access point name: "SmartLife-4CA3", trying to connect...
    Device 'wlan0' successfully activated with 'd0d79135-01f9-4c5d-b567-c86c9c0cb33f'.
    Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got
    192.168.175.1
    .
    Found access point name: "SmartLife-4CA3", trying to connect...
    (process:5160): GLib-GIO-WARNING **: 18:13:19.109: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/901 but no object proxy exists
    (process:5160): GLib-GIO-WARNING **: 18:13:19.112: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/902 but no object proxy exists
    (process:5160): GLib-GIO-WARNING **: 18:13:19.114: ../../../gio/gdbusobjectmanagerclient.c:1589: Processing InterfaceRemoved signal for path /org/freedesktop/NetworkManager/AccessPoint/903 but no object proxy exists
    Device 'wlan0' successfully activated with '30008094-4e69-4120-8340-c2164a3f5e46'.
    Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got
    192.168.175.1
    Error, could not connect to SSID.
    Failed to connect, please run this script again
    admin@raspberrypi:~/tuya-cloudcutter $
  • ADVERTISEMENT
  • #6 20804682
    p.kaczmarek2
    Moderator Smart Home
    Tuya-cloudcutter works per device build and profile may not match if Tuya has changed something or updated to newer version. What's your device version according to Tuya app?

    I did SWP86 teardown and flashing guide: https://www.elektroda.pl/rtvforum/topic3994030.html
    Helpful post? Buy me a coffee.
  • #9 20829428
    p.kaczmarek2
    Moderator Smart Home
    I don't know if mjspez submitted the 2MB firmware dump anywhere, but in my opinion, this OTA method is not reliable and it's faster to just solder by wires.

    Why can't you desolder CB2S? Maybe I can somehow advice you how to desolder that?
    Helpful post? Buy me a coffee.
  • #10 20829497
    omniron
    Level 10  
    My hands shake too much, also don't have the tools and only 2 hands.
    I have 6 of these, 2 of the switches and I rather pay more for ESP units which work OTA than solder/destroy around.
    Sorry.
    That's why I'm focused on OTA only.
    The switch was an exception, had a guest who could solder that for me. But she left and I cannot undo the solder points, must wait when she visits again.
  • #11 20829546
    p.kaczmarek2
    Moderator Smart Home
    Ok then you have to try cloudcutter profiles one by one, like it's said in the post I linked.
    I could flash the devices for you, but I think that shipping from Germany may be too expensive for that to make sense.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #12 20830161
    omniron
    Level 10  
    Ok, will try, when you talk about profile, do you mean the pin assignment?
    Or is it about the actual program being sent to the unit?
    Happy Thanksgiving to your side of the world....
  • #13 20836512
    omniron
    Level 10  
    I was unable to flash OTA!
    Tried all options.
    So I opened the unit and was finally able to get the flash.
    Attached is the 2MB flash.
    I made a schematic of the logic part, to see if the stupid CB2S needs to be removed like OP did.
    I could access it by scratching open a trace.

    Circuit diagram of the KMC 30407 V1.1 device with components like diodes, resistors, and transistors.

    Hope you can now help me flash the other units via OTA.
    Thanks!
  • #14 20836816
    p.kaczmarek2
    Moderator Smart Home
    Thank you, this schematic is very informative.
    I'll see what I can do about OTA for that device and reply here again. If I don't reply, please remind me.

    Added after 7 [hours] 9 [minutes]:

    Quote:

    Looks like they swapped from the WB2S to a CB2s. Renamed the old to include the chip type, and added the new.

    The new profile for OTA has been added.
    Helpful post? Buy me a coffee.
  • #15 20837868
    omniron
    Level 10  
    Happy the schematic could help, made it double worthwhile, thanks.
    Will try out your fine code later.
    Didn't know these came with WB2S. OP and me have the CB2S.
    Originally these came with ESP TYWE3S, as noted on their FCC ID, pictured above.

    Added after 4 [hours] 9 [minutes]:

    I tried to flash OTA, but it failed again.
    Also tried both N and T version in case you got the naming wrong.
    Maybe my OTA setup on Raspberry Pi 3B is wrong?
    I followed this:
    https://github.com/tuya-cloudcutter/tuya-cloudcutter/blob/main/HOST_SPECIFIC_INSTRUCTIONS.md
    and then this:
    https://github.com/tuya-cloudcutter/tuya-cloudcutter/blob/main/INSTRUCTIONS.md
    Please see attached
  • #16 20839299
    p.kaczmarek2
    Moderator Smart Home
    I've had to consult about that problem, but now I know that you need to run it with the -r flag, you have NetworkConnection profiles that are not getting properly removed.

    Added after 1 [minutes]:

    Excerpt from an article explaining the issue with incorrect network profiles in NetworkManager.
    Helpful post? Buy me a coffee.
  • #17 20839694
    omniron
    Level 10  
    You are AMAZING!
    How did you find that?
    I searched myself and could not find anything, bravo!!

    So I removed many many files from system-connections.
    But then somehow Docker wasn't working, hat to resinstall, and now it WORKED!!
    It got through it all (see attached).

    But now the unit plays dead.
    pressing the button long/short etc doesn't change anyhting.
    Probably the pin assignment is not loaded yet?

    But it boots into AP mode, I see the WiFi hotspot but cannot connect, tried http and https.
    I can ping the unit so it's definetly there, it just simply choses to ignore me...
    Sorry
  • #18 20840762
    p.kaczmarek2
    Moderator Smart Home
    Does the problem happen on only one device? So IP 192.168.4.1 is not reachable?

    Can you try to connect to AP with other device?
    Helpful post? Buy me a coffee.
  • #19 20840967
    omniron
    Level 10  
    I opened another of these, but added the AP info
    sudo ./tuya-cloudcutter.sh -r -s tasmot 12345678

    It didn't connect to tasmot, but at least this unit does react to the switch.
    All realys turn still on at the same time.
    Since switch was working I could get into AP mode.

    I got 192.168.4.100, but 192.168.4.1 did not respond
    Then AP timed out and after that I got
    192.168.175.100 (!), and again, 192.168.175.1 did not react.

    Screenshot showing Windows network status with no internet connection.
    Screenshot of Dipiscan program with network connection information.

    Did I do something wrong?
  • #20 20840972
    omniron
    Level 10  
    it says
    wlan0: Could not connect to kernel driver
    ??

    Added after 7 [minutes]:

    The 30407 actually got an IP from tasmot!
    I can ping it, it's very slow, ~40-60ms, but it reacts.
    However if I go to it's IP (http and https) it times out

    Added after 5 [minutes]:

    in my (DHCP) router the 30407's name is wlan0 !!!???
  • #21 20841176
    p.kaczmarek2
    Moderator Smart Home
    Sorry, can you provide more information on what's wrong?
    Are you saying that device flashed by Tuya-cloudcutter have network issues but the one flashed by wires works?

    For testing, can you set a static IP like 192.168.4.10 for your PC, when you connect to OBK WiFi AP for configuration?
    Helpful post? Buy me a coffee.
  • #22 20841273
    omniron
    Level 10  
    https://www.elektroda.com/rtvforum/topic3958242.html#20839694:
    After you magically found that the NetworkConnection profiles are not getting properly removed, I removed them manually.
    Then I tried flashing the 30407 via cloudcutter again.
    This time the flash went through without an error like in the past.
    But without showing the byte counts etc, and the 30407 seemed dead.
    It would not react to the switch.
    I contributed that to not having a pin assignment.
    BUT the 30407 set up a hotspot, so it must have been in an AP mode somehow.
    My computer got an IP .4.100 and I could ping .4.1
    However I could not get into .4.1, neither http or https worked.


    https://www.elektroda.com/rtvforum/topic3958242.html#20840762
    Then you asked me to try to connect to AP with other device?
    I thought you meant trying to flash another 30407.


    https://www.elektroda.com/rtvforum/topic3958242.html#20840967
    I opened another of these, but this time added my home WiFi info "-s tasmot 12345678"
    sudo ./tuya-cloudcutter.sh -r -s tasmot 12345678
    SSID tasmot , pw 12345678

    This second 30407 also set up a hotspot, got IP 192.168.4.1, but 192.168.4.1 still did not respond
    AP timed out and after using the (functioning switch) to get into AP mode I got
    192.168.175.100 (!) from the 30407 hotspot, but again, 192.168.175.1 would not react.

    In the attachment I zipped for you it it says
    wlan0: Could not connect to kernel driver
    I had noticed that with both 30407.

    I tried portscanner etc but it would not respond and constantly time out.

    Then I checked and saw to my suprise that this second 30407 requested and received an IP from my home router.
    So the "-s tasmot 12345678" seemed to have worked (but no response).

    I also noticed the the name under which it requested from the home "tasmot" SSID was:
    wlan0

    So I guess that something went wrong with wlan0?

    Added after 10 [hours] 25 [minutes]:

    As you wished, today I set my Laptop to a fixed IP in the 30407's AP mode subnet range of 192.168.175.xx (not 192.168.4.xx)
    Tried to get via webbrowser to 192.168.175.1 but it times out.

    Ping to 192.168.175.1 is successful, with ping times of just 2ms (was much higher in the beginnig).

    As can be seen, the AP mode hotspot name is
    A-5ADD
    and not cloudcutterflash.

    Screenshot of network settings and a connection error message.

    Thanks!
  • #23 20846050
    omniron
    Level 10  
    Hi again, just wanted to follow up on the OTA issues.
    I know you recommend direct wiring, but I have physical barriers which make it extremely difficult to solder these tiny 2mm apart spots with a hot soldering gun.
    Also, I would need to flash several units, so I need to OTA the few units I bought or return them within the next days.

    These were meant as gifts for friends, as an intorduction to "app-free" use of such devices.
    The last KMC devices I bought were still ESP based, and I would use KMC with Tasmota and Tuya Convert, which was always a breeze.

    But these units now have the dreaded Tuya chips and I was not able to flash even one OTA.

    I wonder if the issue lies with tuya-cloudcutter?
    Considering that your fine code works when wired?
  • #24 20846084
    p.kaczmarek2
    Moderator Smart Home
    I have read your previous message but I am afraid I do not have much experience with Tuya-cloudcutter. I have barely used it once or twice in the past, already over a year ago or so, back then where it was hard to make device profiles.

    As far as I know, it should make no difference how do you flash firmware, but still, I flashed many, many devices via wires and it always worked. Hmm...

    I remember that I had some reports from users, from maybe 2 or 3 users ever, saying that their devices didn't want to connect to their specific router. I don't know if it was ever solved, but it sounded like BK7231 didn't like one particular model of router. That's why I suggested trying another access point.



    But you know what...
    omniron wrote:

    AP timed out and after using the (functioning switch) to get into AP mode I got
    192.168.175.100 (!) from the 30407 hotspot, but again, 192.168.175.1 would not react.

    In the attachment I zipped for you it it says
    wlan0: Could not connect to kernel driver
    I had noticed that with both 30407.

    I tried portscanner etc but it would not respond and constantly time out.

    Then I checked and saw to my suprise that this second 30407 requested and received an IP from my home router.
    So the "-s tasmot 12345678" seemed to have worked (but no response).

    I also noticed the the name under which it requested from the home "tasmot" SSID was:
    wlan0

    So I guess that something went wrong with wlan0?

    Added after 10 [hours] 25 [minutes]:

    As you wished, today I set my Laptop to a fixed IP in the 30407's AP mode subnet range of 192.168.175.xx (not 192.168.4.xx)
    Tried to get via webbrowser to 192.168.175.1 but it times out.

    Ping to 192.168.175.1 is successful, with ping times of just 2ms (was much higher in the beginnig).

    As can be seen, the AP mode hotspot name is
    A-5ADD
    and not cloudcutterflash.

    Screenshot of network settings and a connection error message.

    Thanks!

    This means that you didn't flash OBK. This means your device is still on Tuya firmware. OBK will never create access point like:
    
    As can be seen, the AP mode hotspot name is 
    A-5ADD
    and not cloudcutterflash.
    

    OBK will also never listen for connections on that IP:
    
    Ping to 192.168.175.1 is successful, with ping times of just 2ms (was much higher in the beginnig).
    

    On BK7231 platform, OBK waits for connections on 192.168.4.1 and not on any other IP.

    So, to sum up, I would say that the device you are trying to configure didn't flash OBK correctly and it's still on Tuya firmware.
    Helpful post? Buy me a coffee.
  • #25 20846484
    omniron
    Level 10  
    Thanks for your reply,
    do you mean with "trying another access point" another raspberry Pi?
    I use it all the time for flashing and don't have any other Pi or PC with Linux unfortunately.

    Just the fact that something changed with the 30407 (tuya device) shows that there is some flashing happening?

    After flashing, the AP mode of the 30407 does transmit with SSID "A-5ADD" .
    The 30407's own IP is then 192.168.175.1
    My my laptop is getting 192.168.175.100 from 30407' AP mode
    So some flashing/initializing did work via cloutcutter here, don't you think?

    Then there is the Raspberry Pi AP (SSID tasmot), it is always on and expects the 30407 to connect to after flashing.
    The second 30407 (30407B) I flashed (where I could restart tuya's AP mode) does connect to the Raspberry Pi as "wlan0".
    The same "wlan0" which was listed as an error.
    But I cannot talk to the 30407be it via my laptop or PC (with a different WiFi radio).
    Both computers get IP's from the Raspberry Pi also, but I cannot get into the 30407B, be it via 30407B's own AP, or via Raspberry Pi's AP (static or DHCP).

    Could it be that the "wlan0" error causes a one way communication?
  • #26 20846492
    p.kaczmarek2
    Moderator Smart Home
    omniron wrote:

    do you mean with "trying another access point" another raspberry Pi?

    I was referring to the problem of OBK not connecting properly, but later I changed my mind and now I think that you haven't flashed correctly OBK yet. As I said in previous message, your device is not flashed with OBK yet, tuya-cloudcutter must have failed.

    Can you retry flashing with tuya-cloudcutter and provide here full log so we can tell whether the flashing has succeeded?
    Helpful post? Buy me a coffee.
  • #27 20846537
    omniron
    Level 10  
    Tried it again, same result. You are right, this "wlan0" is a cloudcutter issue, will contact the maintainer.
    Thanks!
  • #28 20846588
    p.kaczmarek2
    Moderator Smart Home
    Please post the solution here once you got it. Good luck
    Helpful post? Buy me a coffee.
  • #29 20847780
    omniron
    Level 10  
    Hi there,
    finally flashing your fine code via OTA worked!
    It was a complicated journey and could be much easier if the documentaion of tuya-cloudcutter would have been a bit different organized.
    Posting of how etc will follow, but before that I ask you to help me to get the initialization of the KMC 30407 right.
    Now each relay can be controlled individually by website, but the actual switch of the unit turns all of them on/off at the same time, instead of cycling through them.
    What do I need to do to fix that?
    1x switch = flip relay 1
    2x switch = flip relay 2
    3x switch = flip relay 3
    like similar switches...

    Also a medium timed (ca 1.5-2 sec) switch closure has no effect. Meaning keeping the switch pressed for ca 2 seconds results in nothing!

    AND, the switches flip AFTER button release, which is really weird.

    Also, in order to flash to the newest firmware right away, can I just rename your newest "OTA" version under
    https://github.com/openshwprojects/OpenBK7231T_App/releases

    BK7231N OTA Update
    "OpenBK7231N_1.17.334.rbl"

    to

    https://github.com/tuya-cloudcutter/tuya-cloudcutter/tree/main/custom-firmware
    "OpenBeken-v1.17.334_bk7231n.ug.bin"
    ?


    Thanks!!
  • #30 20847786
    p.kaczmarek2
    Moderator Smart Home
    omniron wrote:

    What do I need to do to fix that?
    1x switch = flip relay 1
    2x switch = flip relay 2
    3x switch = flip relay 3
    like similar switches...

    As usual, the answer is in our docs, we have script for that:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    Configuration for 4x socket + 1x USB power strip with a single button (double click, triple, etc)

    omniron wrote:

    Also a medium timed (ca 1.5-2 sec) switch closure has no effect. Meaning keeping the switch pressed for ca 2 seconds results in nothing!

    I am not sure if I understand yet.


    omniron wrote:

    AND, the switches flip AFTER button release, which is really weird.

    It's a known problem, you can make button react faster but it will break click and double click events.
    Screenshot of a document excerpt with a question and answer about speeding up wall switch response.
    Source: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/faq.md



    omniron wrote:

    Also, in order to flash to the newest firmware right away, can I just rename your newest "OTA" version under
    https://github.com/openshwprojects/OpenBK7231T_App/releases

    BK7231N OTA Update
    "OpenBK7231N_1.17.334.rbl"

    to

    https://github.com/tuya-cloudcutter/tuya-cloudcutter/tree/main/custom-firmware
    "OpenBeken-v1.17.334_bk7231n.ug.bin"
    ?


    No, this would brick your device. You need to get UG file from our Github, make sure to get UG for your platform, so UG T for T, and N for N.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the teardown and configuration of the KMC Smart Tap Mini (model KMC-30407) featuring the CB2S chip and BK7231N module. Users share their experiences with the device's flashing process, highlighting issues with OTA (Over-The-Air) updates and the challenges posed by the CB2S chip. Several users express frustration over the device's inability to connect to WiFi after flashing, and the need for proper pin assignments to control relays individually. Solutions include using the Tuya-cloudcutter tool for flashing and configuring the device through scripts in the autoexec.bat file. Users also discuss the importance of ensuring correct timing settings for button presses to avoid misinterpretation of relay commands. The conversation emphasizes the need for reliable documentation and user experiences to facilitate successful flashing and configuration of these devices.
Summary generated by the language model.
ADVERTISEMENT