You are reading a single comment by @net-tobi and its replies. Click here to read the full conversation.
  • Hello Gordon,

    I have a problem with the use of at.register('>') in the following code of the GPRS driver:

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

    How can it handle multiple sockets with it? In the AT lib I can just register for some chars once. The next call of the send function for another (or for the same) socket tries to register for '>' again or sends a new AT+CIPSEND without waiting for ">" which leads the communication to an inconsistent state. I tried to set the socket to "Wait" until ">" comes in for the particular socket, but requests for other sockets were still able to send.

    In the ESP8266 driver the problem was not existing because you send the data directly after AT+CIPSEND, which is - unfortunately - not working with the SIM900.

    Do you have an idea how to solve the problem?



  • No, it is a problem on ESP8266 as well; the moment more than one connection is open at once, everything hits the fan.


Avatar for net-tobi @net-tobi started