user68120: Below HTTP Get request is working but after few GET request(5-6) the code stops and once I press Arduino reset button then only it start working. Probably looks like something is causing OOM:
// This is a demo example using a public http server for testing both GET and POST requests

#include <Arduino.h>
#include <LiteESP8266Client.h>

#define PACKET_MTU 1500    // Standard network MTU is 1500 bytes

LiteESP8266 radio;

const char ssid[] PROGMEM = "abcd";    //change it to your wifi SSID
const char password[] PROGMEM = "abcd";    //change it to your wifi password
const char host[] PROGMEM = "192.168.0.156";
const int port = 8080;

const char http_get_request[] PROGMEM = "GET /getLedStatus HTTP/1.1\r\n";
const char http_useragent[] PROGMEM = "User-Agent: Arduino-stm32/0.1\r\n";
const char http_content_type_json[] PROGMEM = "Content-Type: application/json\r\n";
const char http_host[] PROGMEM = "Host: 192.168.0.156\r\n";
const char http_close_connection[] PROGMEM = "Connection: close\r\n\r\n";
const char http_content_length_header[] PROGMEM = "Content-Length: ";
const char success[] PROGMEM = "success";
const char failed[] PROGMEM = "failed";
const char CRLF[] PROGMEM = "\r\n";
const char error_data_null[] PROGMEM = "Error: data came back null.";
const int ledPin=11;
void setupStationMode() {
  Serial.print("Setup station mode... ");
  if (radio.set_station_mode()) {
    Serial.println("success");
  } else {
    Serial.println("failed");
  }
}

void joinAP() {
  Serial.print("Join AP ");
  Serial.print("... ");
  if (radio.connect_to_ap(ssid, password)) {
    Serial.println("Success");
  } else {
    Serial.println("Failed");
  }
}

void establishTcpConnect() {
  Serial.print("Establish TCP Connection... ");
  if (radio.connect_progmem(host, port)) {
    Serial.println( "Success");
  } else {
    Serial.println( "Failed");
  }
}

void getHttpPacket() {
  char *data;
  while ((data = radio.get_response_packet(PACKET_MTU, 5000))) {
    if (data) {
      Serial.println("Response Received...");
      Serial.println(data);
      if(strstr(data, "ON") != NULL) {
        digitalWrite(ledPin, HIGH);
      }else{
        digitalWrite(ledPin, LOW);
      }
    } else {
      Serial.println(error_data_null);
    }
  }
  free(data);
}

void httpGet() {
  Serial.println("Sending GET request... ");
  radio.send_progmem(http_get_request);
  radio.send_progmem(http_useragent);
  radio.send_progmem(http_host);
  radio.send_progmem(http_close_connection);
}
void setup() {
  delay(2000);
  pinMode(ledPin, OUTPUT);
  radio.begin(9600,2,3);
  Serial.begin(9600);
  while (!Serial) {};

  setupStationMode();
  joinAP();
}

void loop() {
  establishTcpConnect();

  httpGet();
  getHttpPacket();
  }

Complete OUTPUT(See Last TCP call when it stopped):
Setup station mode... success
Join AP ... Success
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:47:47 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:47:53 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:47:58 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:48:04 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:48:10 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 2
Date: Fri, 07 Aug 2020 13:48:16 GMT
Connection: close

ON
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 2
Date: Fri, 07 Aug 2020 13:48:21 GMT
Connection: close

ON
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 2
Date: Fri, 07 Aug 2020 13:48:27 GMT
Connection: close

ON
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 2
Date: Fri, 07 Aug 2020 13:48:33 GMT
Connection: close

ON
Establish TCP Connection... Success
Sending GET request... 
Establish TCP Connection...

Probably looks like memory is not getting freed. I am using Arduino UNO + ESP8266 sheild
Update 2
Tried with other REST Server and same issue is observed:
// This is a demo example using a public http server for testing both GET and POST requests

#include <Arduino.h>
#include <LiteESP8266Client.h>

#define PACKET_MTU 1500    // Standard network MTU is 1500 bytes

LiteESP8266 radio;

const char ssid[] PROGMEM = "abc";    //change it to your wifi SSID
const char password[] PROGMEM = "abc";    //change it to your wifi password
const char host[] PROGMEM = "httpbin.org";
const int port = 80;

const char http_get_request[] PROGMEM = "GET /get HTTP/1.1\r\n";
const char http_useragent[] PROGMEM = "User-Agent: Arduino-stm32/0.1\r\n";
const char http_content_type_json[] PROGMEM = "Content-Type: application/json\r\n";
const char http_host[] PROGMEM = "Host: httpbin.org\r\n";
const char http_close_connection[] PROGMEM = "Connection: close\r\n\r\n";
const char http_content_length_header[] PROGMEM = "Content-Length: ";
const char success[] PROGMEM = "success";
const char failed[] PROGMEM = "failed";
const char CRLF[] PROGMEM = "\r\n";
const char error_data_null[] PROGMEM = "Error: data came back null.";
const int ledPin=11;
void setupStationMode() {
  Serial.print("Setup station mode... ");
  if (radio.set_station_mode()) {
    Serial.println("success");
  } else {
    Serial.println("failed");
  }
}

void joinAP() {
  Serial.print("Join AP ");
  Serial.print("... ");
  if (radio.connect_to_ap(ssid, password)) {
    Serial.println("Success");
  } else {
    Serial.println("Failed");
  }
}

void establishTcpConnect() {
  Serial.print("Establish TCP Connection... ");
  if (radio.connect_progmem(host, port)) {
    Serial.println( "Success");
  } else {
    Serial.println( "Failed");
  }
}

void getHttpPacket() {
  char *data;
  while ((data = radio.get_response_packet(PACKET_MTU, 5000))) {
    if (data) {
      Serial.println("Response Received...");
      Serial.println(data);
      if(strstr(data, "ON") != NULL) {
        digitalWrite(ledPin, HIGH);
      }else{
        digitalWrite(ledPin, LOW);
      }
    } else {
      Serial.println(error_data_null);
    }
  }
  free(data);
}

void httpGet() {
  Serial.println("Sending GET request... ");
  radio.send_progmem(http_get_request);
  radio.send_progmem(http_useragent);
  radio.send_progmem(http_host);
  radio.send_progmem(http_close_connection);
}
void setup() {
  delay(2000);
  pinMode(ledPin, OUTPUT);
  radio.begin(9600,2,3);
  Serial.begin(9600);
  while (!Serial) {};

  setupStationMode();
  joinAP();
}

void loop() {
  establishTcpConnect();

  httpGet();
  getHttpPacket();
  }

Output:
Setup station mode... success
Join AP ... Success
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 OK
Date: Fri, 07 Aug 2020 13:57:45 GMT
Content-Type: application/json
Content-Length: 238
Connection: close
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


Response Received...
{
  "args": {}, 
  "headers": {
    "Host": "httpbin"origin": "106.51.29.214", 
  "url": "http://httpbin.org/get"
}
CLOSED
⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 OK
Date: Fri, 07 Aug 2020 13:57:57 GMT
Content-Type: application/json
Content-Length: 238
Connection: close
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


Response Received...
{
  "args": {}, 
  "headers": {
    "Host": "httpbin"origin": "106.51.29.214", 
  "url": "http://httpbin.org/get"
}
CLOSED
⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
Establish TCP Connection... Success
Sending GET request... 
Establish TCP Connection...

Server side code
package com.test.iot;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    private static final Logger logger = LoggerFactory.getLogger(HelloController.class);
    private String ledStatus="OFF";
    @RequestMapping("/test")
    public String index() {
        logger.info("invoked");
        return "Greetings from Spring Boot!";
    }
    @RequestMapping("/getLedStatus")
    public String getLedStatus() {
        logger.info("ledStatus");
        return ledStatus;
    }
    @RequestMapping("/toggleLedStatus")
    public String toggleLedStatus(){
        if(ledStatus.equals("ON")){
            ledStatus="OFF";
        } else {
            ledStatus="ON";
        }
        return String.format("New LED Status: %s", ledStatus);
    }
}


user40646: There is a bug on the library example webclient.ino on getHttpPacket() and getHttpResponse() that it didn't free the memory correctly, causing memory leak. I've updated the code on github repo.
Specifically on your getHttpPacket(), here is the corrected code:
void getHttpPacket() {
  char *data;
  while ((data = radio.get_response_packet(PACKET_MTU, 5000))) {
    if (data) {
      Serial.println(F("Response Received..."));
      Serial.println(data);
      if(strstr(data, "ON") != NULL) {
        digitalWrite(ledPin, HIGH);
      }else{
        digitalWrite(ledPin, LOW);
      }
      free(data);  // free the memory in every packet as Arduino does not have enough memory
    } else {
      Serial.println(error_data_null);
    }
  }
  // free(data);
}

If you have further issue regarding the library, you can raise an "issue" on the github, and I will take a look.

68120: <p>Below HTTP Get request is working but after few GET request(5-6) the code stops and once I press Arduino reset button then only it start working. Probably looks like something is causing OOM:</p>
<pre><code>// This is a demo example using a public http server for testing both GET and POST requests

#include &lt;Arduino.h&gt;
#include &lt;LiteESP8266Client.h&gt;

#define PACKET_MTU 1500    // Standard network MTU is 1500 bytes

LiteESP8266 radio;

const char ssid[] PROGMEM = &quot;abcd&quot;;    //change it to your wifi SSID
const char password[] PROGMEM = &quot;abcd&quot;;    //change it to your wifi password
const char host[] PROGMEM = &quot;192.168.0.156&quot;;
const int port = 8080;

const char http_get_request[] PROGMEM = &quot;GET /getLedStatus HTTP/1.1\r\n&quot;;
const char http_useragent[] PROGMEM = &quot;User-Agent: Arduino-stm32/0.1\r\n&quot;;
const char http_content_type_json[] PROGMEM = &quot;Content-Type: application/json\r\n&quot;;
const char http_host[] PROGMEM = &quot;Host: 192.168.0.156\r\n&quot;;
const char http_close_connection[] PROGMEM = &quot;Connection: close\r\n\r\n&quot;;
const char http_content_length_header[] PROGMEM = &quot;Content-Length: &quot;;
const char success[] PROGMEM = &quot;success&quot;;
const char failed[] PROGMEM = &quot;failed&quot;;
const char CRLF[] PROGMEM = &quot;\r\n&quot;;
const char error_data_null[] PROGMEM = &quot;Error: data came back null.&quot;;
const int ledPin=11;
void setupStationMode() {
  Serial.print(&quot;Setup station mode... &quot;);
  if (radio.set_station_mode()) {
    Serial.println(&quot;success&quot;);
  } else {
    Serial.println(&quot;failed&quot;);
  }
}

void joinAP() {
  Serial.print(&quot;Join AP &quot;);
  Serial.print(&quot;... &quot;);
  if (radio.connect_to_ap(ssid, password)) {
    Serial.println(&quot;Success&quot;);
  } else {
    Serial.println(&quot;Failed&quot;);
  }
}

void establishTcpConnect() {
  Serial.print(&quot;Establish TCP Connection... &quot;);
  if (radio.connect_progmem(host, port)) {
    Serial.println( &quot;Success&quot;);
  } else {
    Serial.println( &quot;Failed&quot;);
  }
}

void getHttpPacket() {
  char *data;
  while ((data = radio.get_response_packet(PACKET_MTU, 5000))) {
    if (data) {
      Serial.println(&quot;Response Received...&quot;);
      Serial.println(data);
      if(strstr(data, &quot;ON&quot;) != NULL) {
        digitalWrite(ledPin, HIGH);
      }else{
        digitalWrite(ledPin, LOW);
      }
    } else {
      Serial.println(error_data_null);
    }
  }
  free(data);
}

void httpGet() {
  Serial.println(&quot;Sending GET request... &quot;);
  radio.send_progmem(http_get_request);
  radio.send_progmem(http_useragent);
  radio.send_progmem(http_host);
  radio.send_progmem(http_close_connection);
}
void setup() {
  delay(2000);
  pinMode(ledPin, OUTPUT);
  radio.begin(9600,2,3);
  Serial.begin(9600);
  while (!Serial) {};

  setupStationMode();
  joinAP();
}

void loop() {
  establishTcpConnect();

  httpGet();
  getHttpPacket();
  }
</code></pre>
<p>Complete OUTPUT(See Last TCP call when it stopped):</p>
<pre><code>Setup station mode... success
Join AP ... Success
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:47:47 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:47:53 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:47:58 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:48:04 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 3
Date: Fri, 07 Aug 2020 13:48:10 GMT
Connection: close

OFF
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 2
Date: Fri, 07 Aug 2020 13:48:16 GMT
Connection: close

ON
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 2
Date: Fri, 07 Aug 2020 13:48:21 GMT
Connection: close

ON
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 2
Date: Fri, 07 Aug 2020 13:48:27 GMT
Connection: close

ON
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 
Content-Type: text/plain;charset=UTF-8
Content-Length: 2
Date: Fri, 07 Aug 2020 13:48:33 GMT
Connection: close

ON
Establish TCP Connection... Success
Sending GET request... 
Establish TCP Connection...
</code></pre>
<p>Probably looks like memory is not getting freed. I am using Arduino UNO + ESP8266 sheild</p>
<p><strong>Update 2</strong>
Tried with other REST Server and same issue is observed:</p>
<pre><code>// This is a demo example using a public http server for testing both GET and POST requests

#include &lt;Arduino.h&gt;
#include &lt;LiteESP8266Client.h&gt;

#define PACKET_MTU 1500    // Standard network MTU is 1500 bytes

LiteESP8266 radio;

const char ssid[] PROGMEM = &quot;abc&quot;;    //change it to your wifi SSID
const char password[] PROGMEM = &quot;abc&quot;;    //change it to your wifi password
const char host[] PROGMEM = &quot;httpbin.org&quot;;
const int port = 80;

const char http_get_request[] PROGMEM = &quot;GET /get HTTP/1.1\r\n&quot;;
const char http_useragent[] PROGMEM = &quot;User-Agent: Arduino-stm32/0.1\r\n&quot;;
const char http_content_type_json[] PROGMEM = &quot;Content-Type: application/json\r\n&quot;;
const char http_host[] PROGMEM = &quot;Host: httpbin.org\r\n&quot;;
const char http_close_connection[] PROGMEM = &quot;Connection: close\r\n\r\n&quot;;
const char http_content_length_header[] PROGMEM = &quot;Content-Length: &quot;;
const char success[] PROGMEM = &quot;success&quot;;
const char failed[] PROGMEM = &quot;failed&quot;;
const char CRLF[] PROGMEM = &quot;\r\n&quot;;
const char error_data_null[] PROGMEM = &quot;Error: data came back null.&quot;;
const int ledPin=11;
void setupStationMode() {
  Serial.print(&quot;Setup station mode... &quot;);
  if (radio.set_station_mode()) {
    Serial.println(&quot;success&quot;);
  } else {
    Serial.println(&quot;failed&quot;);
  }
}

void joinAP() {
  Serial.print(&quot;Join AP &quot;);
  Serial.print(&quot;... &quot;);
  if (radio.connect_to_ap(ssid, password)) {
    Serial.println(&quot;Success&quot;);
  } else {
    Serial.println(&quot;Failed&quot;);
  }
}

void establishTcpConnect() {
  Serial.print(&quot;Establish TCP Connection... &quot;);
  if (radio.connect_progmem(host, port)) {
    Serial.println( &quot;Success&quot;);
  } else {
    Serial.println( &quot;Failed&quot;);
  }
}

void getHttpPacket() {
  char *data;
  while ((data = radio.get_response_packet(PACKET_MTU, 5000))) {
    if (data) {
      Serial.println(&quot;Response Received...&quot;);
      Serial.println(data);
      if(strstr(data, &quot;ON&quot;) != NULL) {
        digitalWrite(ledPin, HIGH);
      }else{
        digitalWrite(ledPin, LOW);
      }
    } else {
      Serial.println(error_data_null);
    }
  }
  free(data);
}

void httpGet() {
  Serial.println(&quot;Sending GET request... &quot;);
  radio.send_progmem(http_get_request);
  radio.send_progmem(http_useragent);
  radio.send_progmem(http_host);
  radio.send_progmem(http_close_connection);
}
void setup() {
  delay(2000);
  pinMode(ledPin, OUTPUT);
  radio.begin(9600,2,3);
  Serial.begin(9600);
  while (!Serial) {};

  setupStationMode();
  joinAP();
}

void loop() {
  establishTcpConnect();

  httpGet();
  getHttpPacket();
  }
</code></pre>
<p>Output:</p>
<pre><code>Setup station mode... success
Join AP ... Success
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 OK
Date: Fri, 07 Aug 2020 13:57:45 GMT
Content-Type: application/json
Content-Length: 238
Connection: close
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


Response Received...
{
  &quot;args&quot;: {}, 
  &quot;headers&quot;: {
    &quot;Host&quot;: &quot;httpbin&quot;origin&quot;: &quot;106.51.29.214&quot;, 
  &quot;url&quot;: &quot;http://httpbin.org/get&quot;
}
CLOSED
⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
Establish TCP Connection... Success
Sending GET request... 
Response Received...
HTTP/1.1 200 OK
Date: Fri, 07 Aug 2020 13:57:57 GMT
Content-Type: application/json
Content-Length: 238
Connection: close
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


Response Received...
{
  &quot;args&quot;: {}, 
  &quot;headers&quot;: {
    &quot;Host&quot;: &quot;httpbin&quot;origin&quot;: &quot;106.51.29.214&quot;, 
  &quot;url&quot;: &quot;http://httpbin.org/get&quot;
}
CLOSED
⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
Establish TCP Connection... Success
Sending GET request... 
Establish TCP Connection...
</code></pre>
<p>Server side code</p>
<pre><code>package com.test.iot;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    private static final Logger logger = LoggerFactory.getLogger(HelloController.class);
    private String ledStatus=&quot;OFF&quot;;
    @RequestMapping(&quot;/test&quot;)
    public String index() {
        logger.info(&quot;invoked&quot;);
        return &quot;Greetings from Spring Boot!&quot;;
    }
    @RequestMapping(&quot;/getLedStatus&quot;)
    public String getLedStatus() {
        logger.info(&quot;ledStatus&quot;);
        return ledStatus;
    }
    @RequestMapping(&quot;/toggleLedStatus&quot;)
    public String toggleLedStatus(){
        if(ledStatus.equals(&quot;ON&quot;)){
            ledStatus=&quot;OFF&quot;;
        } else {
            ledStatus=&quot;ON&quot;;
        }
        return String.format(&quot;New LED Status: %s&quot;, ledStatus);
    }
}
</code></pre>
 40646: <p>There is a bug on the library example webclient.ino on <code>getHttpPacket()</code> and <code>getHttpResponse()</code> that it didn't free the memory correctly, causing memory leak. I've updated the code on github repo.</p>
<p>Specifically on your <code>getHttpPacket()</code>, here is the corrected code:</p>
<pre><code>void getHttpPacket() {
  char *data;
  while ((data = radio.get_response_packet(PACKET_MTU, 5000))) {
    if (data) {
      Serial.println(F(&quot;Response Received...&quot;));
      Serial.println(data);
      if(strstr(data, &quot;ON&quot;) != NULL) {
        digitalWrite(ledPin, HIGH);
      }else{
        digitalWrite(ledPin, LOW);
      }
      free(data);  // free the memory in every packet as Arduino does not have enough memory
    } else {
      Serial.println(error_data_null);
    }
  }
  // free(data);
}
</code></pre>
<p>If you have further issue regarding the library, you can raise an &quot;issue&quot; on the github, and I will take a look.</p>
