Avatar for user111618


Member since Apr 2020 • Last active Aug 2020
  • 3 conversations

Most recent activity

  • in ESP8266
    Avatar for user111618

    Here is the test data (short version):

  • in ESP8266
    Avatar for user111618

    And I tried to send data piece by piece, on "drain" event of the socket, but still got LOW_MEMORY error.

  • in ESP8266
    Avatar for user111618

    But even it won't reboot, does the IR signal works? I mean 38khz carrier pulse.

  • in ESP8266
    Avatar for user111618

    I had a problem with WebSocket when I try to send a long string(1688 Bytes in my case). I got error
    "Execution Interrupted during event processing.
    New interpreter error: LOW_MEMORY,MEMORY".

    Then I modified the ws module, made the send function can accept a json object, to prevent string copy. But in another for loop, it still make a copy of source, I made comment down below.

    g.prototype.send = function(a, b) {
        let c, f, d, e;
        try {
            if (
                ((c = a.value.length),
                    125 < a.value.length && (c = 126),
                        h(void 0 === b ? 129 : b, c + (this.masking ? 128 : 0))
                    126 == c &&
                    (this.socket.write(h(a.value.length >> 8)),
            ) {
                for (c = [], f = "", d = 0; 4 > d; d++) {
                    (e = Math.floor(255 * Math.random())), (c[d] = e), (f += h(e));
                for (d = 0; d < a.value.length; d++) {
                    //here will make a copy of source
                    f += h(a.value.charCodeAt(d) ^ c[3 & d]);
            } else this.socket.write(a);//2
        } catch (e) {
            (c = d = f = e = null), this.initializeConnection();

    I tried 5 methods(like using flash as buffer or turn source string in to array at first and exchange char in it in for loop) to fix it ,but none of them work.

    I wish to use the second method to send data, but server will emit error "MASK must be set".

    Anyone know how to deal with this? Thank you.

  • in ESP8266
    Avatar for user111618

    Man, your reply is too long that I can't understand it cause I not a native English speaker, sorry.

  • in ESP8266
    Avatar for user111618

    Yeah, whatever it will reboot at here. I still using Arduino to drive IR LED by now.