Elektroda.com
Elektroda.com
X

Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N

knust 990 11
  • Hello,
    I would like to present a simple teardown of a "USB Smart Adapter HC-S050-WIFI". It's a small device to control power to a USB socket built around a BK7231N. To open the case, apply some gentle force around the edge to open the lid.
    For flashing via UART connect TP5 as RX and TP4 as TX.


    Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N
    Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N

    Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N

    Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N

    Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N

    Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N

    
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "USB Smart Adapter HC-S050-WIFI",
      "model": "HC-S050-WIFI"",
      "chip": "BK7231N",
      "board": "TODO",
      "flags": "1024",
      "keywords": [
        "5V",
        "MOSFET"
      ],
      "pins": {
        "6": "WifiLED_n;0",
        "7": "Rel;1",
        "8": "Btn_Tgl_All;0",
        "24": "Btn;1"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/5839545100_1692292748_thumb.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=20697534#20697534"
    }

    Cool? Ranking DIY
    About Author
    knust
    Level 2  
    Offline 
    knust wrote 2 posts with. Been with us since 2023 year.
  • #2
    p.kaczmarek2
    Moderator Smart Home
    That's really something new. I haven't seen such device yet. Where did you buy it?

    It doesn't seem to have much components, so I wonder how much it costs.
  • #3
    knust
    Level 2  

    I got it from AliExpress for ~4 Euro. My listing does not exist anymore, but just search for "Tuya Smart Micro USB Adapter Switch".
  • #4
    honorjlh
    Level 2  
    Hey, I managed to "flash" it using the latest BK7231N_QIO firmware, but after flashing or after a power cycle, it goes back to its old firmware. Did you experience something similar?
  • #6
    honorjlh
    Level 2  
    I tried flashing it using BekenWriter V1.60 and BK7231 Easy UART Flasher with the latest BK7231N UART firmware. I have successfully used these programs to flash other Tuya devices in the past, so it should have worked.
    Using BK7231 Easy UART Flasher, I was able to "successfully" flash the device on my first try. However, even though the software said flashing has been successful, the device was still running the default firmware and was even controllable through the Tuya smart app. But I was able to read the OBK / Tuya config, which is identical to the one posted above.
    After trying this multiple times with different firmware versions and replugging it multiple times, I tried using Beken Writer V1.60. It managed to write the new firmware, but failed verifying it, and it was still running the default firmware and usable from the app.
    I then used BK7231 Easy... to "Erase all", once again this software was able to "successfully" flash the device, and Beken Writer... now also successfully verifies the written binary. The device now finally doesn't load its default firmware, but sadly now does nothing when powered on.
  • #7
    p.kaczmarek2
    Moderator Smart Home
    I'd say it's impossible for original firmware to "come back", but maybe, just maybe, you had somehow something in the OTA partition and it had OTA'ed back to Tuya... who knows...
    Did you pair it with Tuya before flashing?

    Anyway, that's very strange.

    Are you sure that you've chosen correct platform (N or T)?

    What does the UART 2 (TX2) log say now? Can you capture the log data so we can tell where the firmware is failing?

    Do you have original 2MB flash backup?
  • #8
    anthonythomas
    Level 8  
    I've just received one of these. I'll try to flash it soon.
  • #9
    anthonythomas
    Level 8  
    Flashed. Original firmware is 1.3.10 so can't be exploited via cloudcutter.

    I tried flasher v 1.1.1 but it kept crashing. Went back to 1.0.6 which worked.
    Took a few attempts at disconnecting and turning on/off to get it to flash but got there eventually.

    Seems to have held its flash for me with no issue.

    Integrated into Home Assistant with no issues.


    The cover is glued on, but easy to removed without damage. When you put it back together be careful not to push the device out of the case when plugging in a USB device if you haven't put some glue back on the cover.


    Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N Tuya USB Smart Adapter HC-S5050-WIFI - teardown, OpenBeken flashing guide for BK7231N
  • #11
    anthonythomas
    Level 8  
    I can't find any log. Where should it be located?
  • #12
    p.kaczmarek2
    Moderator Smart Home
    OpenBeken log can be viewed by going to:
    Launch Web Application -> Logs