logo elektroda
logo elektroda
X

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

p.kaczmarek2 6927 110
ADVERTISEMENT
📢 Listen (AI):
  • #91 21594708
    DeDaMrAz
    Level 21  
    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 



    Eswin ECR6600 flashing guide, datasheet, pinout, 100% local setup, Home Assistant
  • 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.
  • #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.

    Top view of a PCB labeled K1–K5 with LEDs and three microswitches installed
    PCB with AXYU Wi-Fi module from MCL-Y10-L-03W switch, shown from top view
    Top view of circuit board from MCL-Y10-L-03W switch with relays and terminals
    PCB of the MCL-Y10-L-03W switch with visible electronic components and JP3 connector
    Dismantled MCL-Y10-L-03W wall switch showing PCBs and plastic housing parts
  • #94 21615922
    insmod
    Level 29  
    >>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.
  • ADVERTISEMENT
  • #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 29  
    >>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.
  • ADVERTISEMENT
  • #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 36  
    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.
  • #103 21636152
    divadiow
    Level 36  
    REST ECR6600 OTA is successful but

    Wi-Fi signal excellent, reboot reason: FATAL_EXCEPTION, MQTT not configured

    Code: Text
    Log in, to see the code
  • #104 21640829
    jkwim
    Level 13  
    I do not know whether this is the proper thread to post this question but there aren't many discussions about the SendGet HTTP requests.

    I am trying to pass some data into a Google script using the SendGet command but getting the following status:
    Info:HTTP_CLIENT:host: 'script.google.com', port: 80
    Info:HTTP_CLIENT:HAL_TCP_Establish: created socket 2
    
    Error:HTTP_CLIENT:success to establish tcp, fd=2
    Debug:HTTP_CLIENT:Written 187 bytes


    However on the Google side this request never gets completed. I cannot post the full URL for security reasons but the general format is:
    
    https://<host>/path?parameter1=xxx&parameter2=yyy


    The URL works fine on a command shell in my CYGWIN environment using the command Curl <url>. And works directly via a web browser too.

    There is no authentication required so theoretically OpenBK should be able to handle it.

    My gut feeling is that there may be a timeout issue as I have observed some delay in getting a HTTP response back from Google when using other methods to access the same url.

    Can somebody help me to find out more on how OpenBK behaves here.

    Thanks in advance.
  • #105 21640832
    p.kaczmarek2
    Moderator Smart Home
    You need to build OBK in a version that supports HTTPS (secure) connection. Otherwise, SendGET can only do HTTP.
    Helpful post? Buy me a coffee.
  • #106 21640837
    jkwim
    Level 13  
    p.kaczmarek2 wrote:
    You need to build OBK in a version that supports HTTPS (secure) connection. Otherwise, SendGET can only do HTTP.


    Could you guide me on how to get it built?

    I mean I should have my old notes on how to get a build on the development branch but I need to know what directives to enable.
  • #107 21640858
    p.kaczmarek2
    Moderator Smart Home
    I have never tried enabling SSL personally in OBK, but I am certain we have option for secure MQTT connection on Beken. Regarding other platforms - you'd need to check yourself.

    On a bright side, this is not OBK-specific request. SSL is done on SDK side, you'd need to check how to enable it for LWIP.

    Maybe @insmod knows something more. I used SSL only on ESP, and all I can say is that's very RAM consuming.

    Are you asking in ECR6600 topic for purpose? You want secure connection on ECR6600?
    Helpful post? Buy me a coffee.
  • #108 21640861
    insmod
    Level 29  
    >>21640858
    I've never even used http in OBK.
    But, i know that mbedtls is enabled by default on ECR6600.
  • #109 21640872
    p.kaczmarek2
    Moderator Smart Home
    We may need to go over HTTPS/SSL some day, check it, and add to Platforms.md
    Helpful post? Buy me a coffee.
  • #110 21640897
    jkwim
    Level 13  
    p.kaczmarek2 wrote:

    Are you asking in ECR6600 topic for purpose? You want secure connection on ECR6600?


    Not really.

    I want to know whether it is possible to send a HTTPS GET request out from OBK
  • #111 21650936
    divadiow
    Level 36  
    walligatorw wrote:
    I haven't figured out the purpose of pin 3 and pin 4 yet.
    And also, when relay 1 is triggered, the switch restarts.

    @walligatorw

    did you get any further with your ECR6600?
📢 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