     DEBUG_SERIAL.println(inBuffer);
     return;
   }
-  //DEBUG_SERIAL.print("+IPD LL: {{");
+  DEBUG_SERIAL.print("+IPD LL: {{");
   int dp = inDataBufferLen[n];
   int pc = -1;
   int i = j;
   int t = 0;
+  if (chars > BUFFER_SIZE) {
+    t += chars - BUFFER_SIZE;
+  }
   while (t < l) {
-    if (i >= BUFFER_SIZE) {
-        //DEBUG_SERIAL.println();
-        if (inDataBufferLen[n] > 0) {
-          processIPDLine(n);
-        }
-        inDataBuffer[n][0]=0;
-        inDataBufferLen[n]=0;
-        readLineLowLevel();
-        dp = 0;
-        pc = -1;
-        i = -1;
-    }
     if (i > inBufferLen) { //i < IN_BUFFER_SIZE && 
       DEBUG_SERIAL.print("+IPD ERROR: i (");
       DEBUG_SERIAL.print(i);

int inDataBufferLen[CHANNELS];
boolean httpRequestRead[CHANNELS];

unsigned char state = 0;

Stream* espStream = &ESP_SERIAL;

boolean debugPrevNoData = false;

void setup() {
  //softSerial.begin(9600);

   * Do not respond unless inDataBuffer[n] equals "\r\n" (empty line)
   */
  DEBUG_SERIAL.print("+IPD LINE: ");
  DEBUG_SERIAL.print(n);
  DEBUG_SERIAL.print(" : ");
  if (!open[n]) {
    DEBUG_SERIAL.println("ERROR. NOT CONNECTED");
    return;
  }
  DEBUG_SERIAL.println(inDataBuffer[n]);
  if (strcmp(inDataBuffer[n], "\r\n") != 0) {
    if (httpRequestRead[n] == false) {
