logo elektroda
logo elektroda
X
logo elektroda

Eswin ECR6600 flashing guide, datasheet, pinout, 100% local setup, Home Assistant

p.kaczmarek2 5508 102
ADVERTISEMENT
📢 Listen (AI):
  • #91 21594708
    DeDaMrAz
    Level 20  
    ECR6600 test

    SendGet http://example.com/ myFile.html


    Info:CMD: CMD_SendGET received with args http://example.com/ myFile.html
    Info:HTTP_CLIENT:HTTPClient_Async_SendGet for http://example.com/, sizeof(httprequest_t) == 160!
    Info:CMD:[WebApp Cmd 'SendGet http://example.com/ myFile.html' Result] OK
    Info:HTTP_CLIENT:Parse url http://example.com/
    Info:HTTP_CLIENT:host: 'example.com', port: 80
    Info:HTTP_CLIENT:HAL_TCP_Establish: created socket 2
    
    Error:HTTP_CLIENT:success to establish tcp, fd=2
    Info:HTTP_CLIENT:httpclient_recv 255 bytes has been read
    Info:HTTP_CLIENT:httpclient_recv 236 bytes has been read
    Info:HTTP_CLIENT:httpclient_recv 255 bytes has been read
    Info:HTTP_CLIENT:httpclient_recv 255 bytes has been read
    Info:HTTP_CLIENT:httpclient_recv 255 bytes has been read
    Info:HTTP_CLIENT:httpclient_recv 255 bytes has been read
    Info:HTTP_CLIENT:httpclient_recv 7 bytes has been read
    Info:MAIN:Time 225, idle 0/s, free 188384, MQTT 0(14), bWifi 1, secondsWithNoPing 158, socks 2/20 



    Screenshot of system logs showing an HTTP GET request sent to example.com.
  • ADVERTISEMENT
  • #92 21594735
    p.kaczmarek2
    Moderator Smart Home
    I will try to clear this up, I also think that hal_machw_time could be moved to HAL:
    - by default, it would use:
    Code: C / C++
    Log in, to see the code

    On ECR:
    Code: C / C++
    Log in, to see the code

    On Beken, hal_machw_time

    To be honest, I am not even sure how big precision do we need for that timer for HTTP, maybe we could get away with using g_timeMs globally, without HAL call

    I'll try to make those changes today and try to test as far as I can, I'll ask you for a review later

    Added after 1 [minutes]:

    This whole HTTP Client looks more or less suspicious. This:
    Code: C / C++
    Log in, to see the code

    is used as it returns time offset, but in reality, it returns either 0 or 1
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #93 21615836
    walligatorw
    Level 3  
    Hi guys!
    I bought several switches MCL-Y10-L-03W in this store:
    https://aliexpress.ru/item/1005008813709294.h...2.1426903569.1753361948-1554502598.1753361948
    (not an advertisement)
    Want to cut them off from the Tuyas cloud and make them local in Home Assistant.
    Found this topic with your work and firmware. Thank you for your great work!
    I disassembled one switch and saw the AXYU board.
    Flashed one switch as written in the instructions. Everything went well.
    Now I need to configure the pins, but I have no experience in how to do this. But I have a great desire!
    I don’t know how to determine all the pins. Maybe you can help me?
    I am attaching photos and the dump file with the factory firmware.

    Eswin ECR6600 flashing guide, datasheet, pinout, 100% local setup, Home Assistant
    Eswin ECR6600 flashing guide, datasheet, pinout, 100% local setup, Home Assistant
    Eswin ECR6600 flashing guide, datasheet, pinout, 100% local setup, Home Assistant
    Eswin ECR6600 flashing guide, datasheet, pinout, 100% local setup, Home Assistant
    Eswin ECR6600 flashing guide, datasheet, pinout, 100% local setup, Home Assistant
  • #94 21615922
    insmod
    Level 26  
    >>21615836
    Well, you've already determined button pins.
    All that remains are relay pins.
    Put everything back together, connect it to mains and experiment in GPIO Doctor (Web app -> GPIO Finder).
    Check unconfigured pins by setting output high/low, and when relay clicks - you will know what pin it is.
  • #95 21615944
    walligatorw
    Level 3  
    >>21615922
    Thank you! I'll try it now.
    But I still need the pins of the six LEDs.
    In the factory logic, they glow white when off and glow blue when on. On each switch.
    I do it ...
  • ADVERTISEMENT
  • #96 21615947
    insmod
    Level 26  
    >>21615944
    Leds are usually on the same pin as relays.
    At least it was that way on almost all switches i've seen (except moes zigbee no-neutral no-capacitor switch).
    But if not, they can be found the same way.
  • #97 21615948
    walligatorw
    Level 3  
    Now, with all zero pins, all blue LEDs are lit. That is, the relays are in the on states.
  • #98 21616010
    divadiow
    Level 35  
    device boot log on IO13 from fw dump (on test device)
    Code: Text
    Log in, to see the code
  • #99 21616102
    walligatorw
    Level 3  
    Thank you, insmod!
    Thank you, divadiow!
    I found these pins and they work!

    "pins": {
    "0": "Btn;1",
    "2": "Btn;2",
    "14": "Rel;1",
    "15": "Rel_n;1",
    "16": "LED_n;2",
    "17": "Btn;3",
    "20": "LED_n;3",
    "21": "LED_n;1",
    "22": "Rel;2",
    "23": "Rel_n;2",
    "24": "Rel;3",
    "25": "Rel_n;3"
    },

    I haven't figured out the purpose of pin 3 and pin 4 yet.
    And also, when relay 1 is triggered, the switch restarts. :(

    I dig further...
  • #101 21633440
    p.kaczmarek2
    Moderator Smart Home
    Yes, this enumeration comes from ECR SDK, you can probably find it by searching for "RST_TYPE_UNKOWN" there.

    Added after 24 [seconds]:

    Btw thx for reminding me, we need to move reset reason to HAL
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #103 21636152
    divadiow
    Level 35  
    REST ECR6600 OTA is successful but

    Console screenshot showing OTA success and a detailed crash report with stack dump and system halt message.

    Code: Text
    Log in, to see the code
📢 Listen (AI):

Topic summary

The discussion focuses on the Eswin ECR6600 WiFi+Bluetooth SoC module used in IoT devices, particularly smart plugs with integrated BL0937 energy metering chips. Key topics include detailed pinout configurations, firmware flashing procedures via UART, and local firmware development to enable cloud-free operation with Home Assistant using Tasmota/esphome-like firmware ports. Users report initial issues with the BL0937 driver not functioning due to its exclusion from firmware builds, which was later resolved by including the driver and verifying correct pin assignments. Attempts to extract and decrypt Tuya configuration keys from original firmware backups reveal challenges due to changed secondary keys and CRC errors, complicating full firmware analysis and key extraction. The community explores using Tuya Wind IDE on Linux for SDK access, and reverse engineering efforts with Ghidra face difficulties due to the ECR6600’s NDS32 architecture and base address uncertainties. Firmware disassembly and key extraction are ongoing, with partial success in identifying key material and decrypting some blocks. Additional tests confirm the ECR6600 supports WiFi 6 (2.4 GHz only) and HTTP GET/POST commands for local network control, including file downloads via HTTP client functionality. Integration efforts include porting missing HAL functions like hal_machw_time and lwip_close_force for timing and socket management. Various ECR6600-based devices, including plugs ordered from AliExpress (e.g., TNCE 16A power monitors and E103-W11 modules), are tested for firmware backup, flashing, and local control capabilities. The discussion also covers SDK build issues, firmware memory mapping, and the need for improved tooling and documentation to fully support ECR6600 development and integration with open-source platforms.
Summary generated by the language model.
ADVERTISEMENT