You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ok, turns out there's a very annoying bug in the interpreter! > is used as a character that prefixes internal variables that users don't want to see, and it means it gets ignored when it's in an array. I've just pushed out a new AT module with a workaround in.

    Try:

    send : function(sckt, data) {
        if (at.isBusy() || socks[sckt]=="Wait") return 0;
        if (!socks[sckt]) return -1; // error - close it
        var f = function(d) {
          at.unregister(">");
          if (d!="SEND OK") console.log("Send got: "+d);
        };
        at.register(">", function() {
          at.write(data);
          return "";
        });
        at.cmd('AT+CIPSEND='+sckt+','+data.length+'\r\n', 10000, f);
        return data.length;
      }
    
About

Avatar for Gordon @Gordon started