• Power not via USB.
    I work with Web IDE via wifi and everything works fine. When Disconnected from the Web IDE, ESP12f rebooted and serial1 to communicate with SIM800L not working.
    The problem is serial1. How to fix?

    Here in this place, the module hangs and restarts.

    function Start_modem(){
    digitalWrite(D5, false);
    var connection = setInterval(function(){ Serial1.println("AT+COPS?");},300);
    Serial1.on('data', function (data) {

         print("<Serial1> "+data);
    if(data.indexOf("+COPS:")>-1){
       clearInterval(connection);
       //print("modem start");
       init_modem();
       digitalWrite(D5, true);
     }
    if(data.indexOf("+CUSD: 0, ")>-1){
       list_balanse(data);
       //print("SMS OK");
       digitalWrite(D5, true);
    }
    

    });
    }

About

Avatar for Alexander @Alexander started