title: How does my ESP8266/NodeMCU communicate with my GSM Module SIM800L?
body: <p>so I want to connect my SIM800L GSM Module to my NodeMCU. I bought a LM2596 DC-DC voltage regulator to convert the output voltage to ~4V for the SIM800L. Input voltage for the regulator is 9V/1A.</p>
  <p>Everything is connected: RX from GSM to D5 (GPIO14), TX to D6 (GPIO12) and RST to D7 (GPIO13). The GPIOs are deliberately chosen, since I've read online, that the RX/TX Pins on the NodeMCU are used internally. I tried matching RX/TX pins before, but it's the same result (that's why I am certain, it has to be my code that is defect). A SIM card is also inserted in the GSM Module (with PIN).</p>
  <p>I'm coding on the Arduino IDE and I'm using the GSMSim and SoftwareSerial libraries for connecting to the GSM Module. I've tried the example sketches from the GSMSim to communicate to the GSM Module, but I'm not getting any answer on my serial monitor.</p>
  <p>I also tried manually sending commands to the GSM Module.</p>
  <pre><code>#include &lt;GSMSim.h&gt;
  #include &lt;SoftwareSerial.h&gt;
  
  // You can use any Serial interface. I recommended HardwareSerial. Please use the library with highiest baudrate.
  // In examples, i used HardwareSerial. You can change it anymore.
  
  #define RX 14
  #define TX 12
  #define RESET 13
  
  SoftwareSerial serial(RX, TX);
  GSMSim gsmModule(serial, RESET);
  
  void setup() {
    serial.begin(115200); // If you dont change module baudrate, it comes with auto baudrate.
    while(!serial) ;
    Serial.begin(115200); // Serial for debug...
    while(!Serial) ;
  
    Serial.println(&quot;&quot;);
    Serial.println(&quot;serial begin&quot;);
    
      // Init module...
      gsmModule.init(); // use for reseting module. Use it if you dont have any valid reason.
    delay(100);
  
    gsmModule.sendATCommand(&quot;AT+GMR&quot;);
    if(serial.available()) Serial.println(serial.readString());
    Serial.println(&quot;Sent AT&quot;);
  
  }
  </code></pre>
  <p>OUTPUT:</p>
  <pre><code>serial.begin
  Sent AT
  </code></pre>
  <p>Another example with the modified GSMSim_HTTP sketch:</p>
  <pre><code>#include &lt;GSMSim.h&gt;
  #include &lt;SoftwareSerial.h&gt;
  
  // You can use any Serial interface. I recommended HardwareSerial. Please use the library with highiest baudrate.
  // In examples, i used HardwareSerial. You can change it anymore.
  
  #define RX 14
  #define TX 12
  #define RESET 13
  
  SoftwareSerial serial(RX, TX);
  GSMSim http(serial, RESET);
  static volatile int num = 0;
  
  void setup() {
    serial.begin(115200); // If you dont change module baudrate, it comes with auto baudrate.
  
    while(!serial) {
      ; // wait for module for connect.
    }
  
    Serial.begin(115200); // Serial for debug...
  
    // Init module...
    http.init(); // use for init module. Use it if you dont have any valid reason.
  
    Serial.print(&quot;Set Phone Function... &quot;);
    Serial.println(http.setPhoneFunc(1));
    //delay(1000);
  
    Serial.print(&quot;is Module Registered to Network?... &quot;);
    Serial.println(http.isRegistered());
    //delay(1000);
  
    Serial.print(&quot;Signal Quality... &quot;);
    Serial.println(http.signalQuality());
    //delay(1000);
  
    Serial.print(&quot;Operator Name... &quot;);
    Serial.println(http.operatorNameFromSim());
    //delay(1000);
  
  
    //Serial.print(&quot;GPRS Init... &quot;);
    //Serial.println(http.gprsInit(&quot;internet&quot;)); // Its optional. You can set apn, user and password with this method. Default APN: &quot;internet&quot; Default USER: &quot;&quot; Default PWD: &quot;&quot;
    //delay(1000);
  
  
    Serial.print(&quot;Connect GPRS... &quot;);
    Serial.println(http.connect());
    //delay(1000);
  
    Serial.print(&quot;Get IP Address... &quot;);
    Serial.println(http.getIP());
    delay(1000);
    
   
    Serial.print(&quot;Get... &quot;);
    Serial.println(http.get(&quot;sera.erdemarslan.com/test.php&quot;));
    delay(1000);
  
    Serial.print(&quot;Get with SSL and read returned data... &quot;);
    Serial.println(http.getWithSSL(&quot;erdemarslan.com/test.php&quot;, true));
    delay(1000);
  
    Serial.print(&quot;Post... &quot;);
    Serial.println(http.post(&quot;sera.erdemarslan.com/test.php&quot;, &quot;name=Erdem&amp;surname=Arslan&quot;, &quot;application/x-www-form-urlencoded&quot;));
    delay(1000);
  
    Serial.print(&quot;Post with SSL and read returned data... &quot;);
    Serial.println(http.post(&quot;erdemarslan.com/test.php&quot;, &quot;name=Erdem&amp;surname=Arslan&quot;, &quot;application/x-www-form-urlencoded&quot;, true));
    delay(1000);
  
    Serial.print(&quot;Close GPRS... &quot;);
    Serial.println(http.closeConn());
    //delay(1000);
  
    // For other methods please look at readme.txt file.
  
  }
  
  void loop() {
    
    // Use your Serial interface...
    if(serial.available()) {
        String buffer = &quot;&quot;;
        buffer = Serial1.readString();
        num = num + 1;
        Serial.print(num);
        Serial.print(&quot;. &quot;);
        Serial.println(buffer);
    }
    
    // put your main code here, to run repeatedly:
  }
  </code></pre>
  <p>OUTPUT:</p>
  <pre><code>serial.begin
  Set Phone Function... 0
  is Module Registered to Network?... 0
  Signal Quality... 99
  Operator Name... NOT CONNECTED
  Connect GPRS... 0
  Get IP Address... 
  Get module date time... ERROR:NOT_GET_DATETIME
  Set timezone and time server... 0
  Sync date time from server... AT_COMMAND_ERROR
  Get module date time after sycn... ERROR:NOT_GET_DATETIME
  Close GPRS... 0
  </code></pre>
  <p>I hope it's something obvious, since I am not familiar with AT commands at all.</p>
  <p>Thanks!</p>