hi, i have a nodemcu module and a sim800l , , i trying to checkh my device can conent to internet through GPRS of sim800l or not ,i run this code :
```
#include <SoftwareSerial.h>

SoftwareSerial gsm(4, 5); // RX, TX for SoftwareSerial

void setup() {
  Serial.begin(9600); // Serial for debugging
  gsm.begin(9600);    // Serial for SIM800L

  // Initialize the GSM module
  delay(1000);
  sendATCommand("AT\r\n", "OK");            // Test AT startup
  sendATCommand("AT+CPIN?\r\n", "READY");   // Check SIM card presence
  sendATCommand("AT+CSQ\r\n", "+CSQ");      // Check signal quality
  sendATCommand("AT+CREG?\r\n", "+CREG");   // Network registration status
  sendATCommand("AT+CGATT?\r\n", "OK");     // Check GPRS attach

  delay(1000);

  // Configure the PDP context
  sendATCommand("AT+CSTT=\"mcinet\"\r\n", "OK"); // Set APN
  sendATCommand("AT+CIICR\r\n", "OK");             // Bring up wireless connection
  sendATCommand("AT+CIFSR\r\n", "");               // Get IP address (prints IP, no need to check response)

  // Start TCP connection
  if (sendATCommand("AT+CIPSTART=\"TCP\",\"www.example.com\",\"80\"\r\n", "CONNECT OK")) {
    Serial.println("Connected to server successfully.");

    // Send HTTP GET request
    if (sendATCommand("AT+CIPSEND\r\n", ">")) {
      String httpRequest = "GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n";
      gsm.print(httpRequest);
      Serial.println("HTTP Request Sent");
      gsm.write(26); // Ctrl+Z to send
      delay(2000);

      // Wait for response
      while (gsm.available()) {
        String response = gsm.readString();
        Serial.println("HTTP Response:");
        Serial.println(response);
        if (response.indexOf("200 OK") != -1) {
          Serial.println("HTTP Request was successful.");
        } else {
          Serial.println("HTTP Request failed.");
        }
      }
    }
  } else {
    Serial.println("Failed to connect to server.");
  }
}

void loop() {
  // Keep listening to responses
  if (gsm.available()) {
    Serial.write(gsm.read());
  }
}

bool sendATCommand(const char *command, const char *expectedResponse) {
  Serial.print("Sending AT Command: ");
  Serial.println(command);
  gsm.print(command);
  delay(1000);

  // Read response
  String response = "";
  while (gsm.available()) {
    response += (char)gsm.read();
  }

  Serial.print("Received Response: ");
  Serial.println(response);

  // Check if expected response is contained in the actual response
  return (response.indexOf(expectedResponse) != -1);
}
```
and this is my response i get in serial::
```
18:59:17.322 -> ��9K圡��J�Sending AT Command: AT
18:59:18.426 -> 
18:59:19.402 -> Received Response: 
18:59:19.435 -> OK
18:59:19.435 -> 
18:59:19.435 -> Sending AT Command: AT+CPIN?
18:59:19.467 -> 
18:59:20.409 -> Received Response: 
18:59:20.442 -> +CPIN: READY
18:59:20.442 -> 
18:59:20.442 -> OK
18:59:20.474 -> 
18:59:20.474 -> Sending AT Command: AT+CSQ
18:59:20.507 -> 
18:59:21.418 -> Received Response: 
18:59:21.450 -> +CSQ: 23,0
18:59:21.450 -> 
18:59:21.450 -> OK
18:59:21.482 -> 
18:59:21.482 -> Sending AT Command: AT+CREG?
18:59:21.515 -> 
18:59:22.427 -> Received Response: 
18:59:22.459 -> +CREG: 0,1
18:59:22.459 -> 
18:59:22.459 -> OK
18:59:22.492 -> 
18:59:22.492 -> Sending AT Command: AT+CGATT?
18:59:22.523 -> 
18:59:23.449 -> Received Response: 
18:59:23.482 -> +CGATT: 1
18:59:23.482 -> 
18:59:23.482 -> OK
18:59:23.482 -> 
18:59:24.452 -> Sending AT Command: AT+CSTT="mcinet"
18:59:24.485 -> 
18:59:25.456 -> Received Response: 
18:59:25.488 -> OK
18:59:25.488 -> 
18:59:25.488 -> Sending AT Command: AT+CIICR
18:59:25.521 -> 
18:59:26.494 -> Received Response: 
18:59:26.494 -> OK
18:59:26.494 -> 
18:59:26.494 -> Sending AT Command: AT+CIFSR
18:59:26.526 -> 
18:59:27.503 -> Received Response: 
18:59:27.503 -> 22.233.234.95
18:59:27.535 -> 
18:59:27.535 -> Sending AT Command: AT+CIPSTART="TCP","www.example.com","80"
18:59:27.599 -> 
18:59:28.540 -> Received Response: 
18:59:28.572 -> OK
18:59:28.572 -> 
18:59:28.572 -> Failed to connect to server.
18:59:29.223 -> 
18:59:29.223 -> CONNECT OK
```