• Ahh, so I have to throw away the 'ATE0' response because echo is not off at the time of issuing the command to turn echo off.

    at.cmd('', 10000, function cb(data) {
          if (data && data!="ready") return cb;
          at.cmd('ATE0\r\n', 10000, function cb(data) {
            if (data=="ATE0") return cb;
            console.log(data);
            // ask for version
            at.cmd('AT+GMR\r\n', 10000, function(data) {
              console.log(data);
            });
          });
        });
        // power up
    

    ] "\nAi-Thinker Technology Co.,Ltd.\r\n\r\nready\r\n" <--- "\nAi-Thinker Technology Co.,Ltd.\r\n\r\nready\r\n"
    ["ATE0\r\n"
    ] "ATE0\r\r\n\r\nOK\r\n" <--- "ATE0\r\r\n\r\nOK\r\n"
    OK
    ["AT+GMR\r\n"
    ] "AT version:0.40.0." <--- "AT version:0.40.0."
    ] "AT version:0.40.0.0(Aug 8 2015 14:45:58)\r\nSDK " <--- "0(Aug 8 2015 14:45:58)\r\nSDK "
    AT version:0.40.0.0(Aug 8 2015 14:45:58)
    ] "SDK version:1.3.0\r\nAi-Thinker Technology Co.,Ltd.\r\nBuild:1.3.0.2 Sep" <--- "version:1.3.0\r\nAi-Thinker Technology Co.,Ltd.\r\nBuild:1.3.0.2 Sep"
    ] "Build:1.3.0.2 Sep 11 2015 11:48:04\r\nOK\r\n" <--- " 11 2015 11:48:04\r\nOK\r\n"

About

Avatar for dave_irvine @dave_irvine started