How can I send large data by serial communication?

Urup: 50000: 50000: 3000: 150: 5d7ff3300000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec7333333337a

Up to 50 of these data are received in 10 seconds. (126 bytes each) and send it back to the serial to ethernet port.
Sending 12600 bytes of arbitrary data has already succeeded.

Now, while accumulating and storing new data
When called from the server, it will send the value and receive new data after initialization.

/* Successful code */
const char String_01[]  = {"Urup:50000:50000:3000:150:5d7ff3300000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec7333333337aUrup:50000:50000:3000:151:5d7ff3370000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec73333333373Urup:50000:50000:3000:152:5d7ff3410000000000000000000000000000000007f85611110ebf0000000000001051d010000ffff0bb804ec73333333350Urup:50000:50000:3000:153:5d7ff34e0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec7333333335cUrup:50000:50000:3000:154:5d7ff3550000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec73333333355Urup:50000:50000:3000:155:5d7ff35f0000000000000000000000000000000007f85611110ebf0000000000001051d010000ffff0bb804ec73333333332Urup:50000:50000:3000:156:5d7ff36c0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec7333333333eUrup:50000:50000:3000:157:5d7ff3730000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec73333333337Urup:50000:50000:3000:158:5d7ff37d0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec7333333332dUrup:50000:50000:3000:159:5d7ff38a0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec73333333320"};
const char String_02[]  = {"Urup:50000:50000:3000:160:5d7ff3910000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec73333333319Urup:50000:50000:3000:161:5d7ff39b0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec7333333330fUrup:50000:50000:3000:162:5d7ff3a80000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec73333333302Urup:50000:50000:3000:163:5d7ff3af0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333fbUrup:50000:50000:3000:164:5d7ff3b90000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333f1Urup:50000:50000:3000:165:5d7ff3c60000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333e4Urup:50000:50000:3000:166:5d7ff3cd0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333ddUrup:50000:50000:3000:167:5d7ff3d70000000000000000000000000000000007f85611110ebf0000000000001051d010000ffff0bb804ec733333333baUrup:50000:50000:3000:168:5d7ff3e40000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333c6Urup:50000:50000:3000:169:5d7ff3eb0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333bf"};
.........
.........
const char String_10[]  = {"Urup:50000:50000:3000:240:5d7ff6b40000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333f3Urup:50000:50000:3000:241:5d7ff6bb0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333ecUrup:50000:50000:3000:242:5d7ff6c50000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333e2Urup:50000:50000:3000:243:5d7ff6d20000000000000000000000000000000007f85611110e8d0000000000001051d010000ffff0bb804ec733333333eeUrup:50000:50000:3000:244:5d7ff6d90000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333ceUrup:50000:50000:3000:245:5d7ff6e30000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333c4Urup:50000:50000:3000:246:5d7ff6f00000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333b7Urup:50000:50000:3000:247:5d7ff6f70000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333b0Urup:50000:50000:3000:248:5d7ff7010000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec733333333a5Urup:50000:50000:3000:249:5d7ff70e0000000000000000000000000000000007f85611110ea60000000000001051d010000ffff0bb804ec73333333398"};

const char *const msgList[]  ={String_01, String_02, String_03, String_04, String_05, String_06, String_07, String_08, String_09, String_10};


loop(){
recvWithEndMarker();
showNewData();
}

void recvWithEndMarker() {
 static byte ndx = 0;
 char endMarker = '\n';
 char rc;
 
 if (Serial3.available() > 0 && newData6 == false) {
    rc = Serial3.read();
    if (rc != endMarker) {
      receivedLoRa[ndx] = rc;
      ndx++;

      if (ndx >= numCharsLoRa) {
        ndx = numCharsLoRa - 1;

      }
    } else {
      receivedLoRa[ndx] = '\0'; // terminate the string
      ndx = 0;
      newData6 = true;
    }
  }

}

void showNewData() {
    if(newData6){
      if(receivedLoRa[0] == '0' && receivedLoRa[1] == '3' && receivedLoRa[2] == '0' && receivedLoRa[3] == '1'){
        for(int j = 0 ; j < 10 ;j++){ 
          Serial3.print(msgList[j]);
        }
      }

    }
   newData6 = false; 
}
/* Failed code */

char *msgList = (char*)malloc(sizeof(char) * 12600);

loop(){
recvWithEndMarker();
showNewData();
}

void recvWithEndMarker() {
 static byte ndx = 0;
 char endMarker = '\n';
 char rc;
 
 if (Serial3.available() > 0 && newData6 == false) {
    rc = Serial3.read();
    if (rc != endMarker) {
      receivedLoRa[ndx] = rc;
      ndx++;

      if (ndx >= numCharsLoRa) {
        ndx = numCharsLoRa - 1;

      }
    } else {
      receivedLoRa[ndx] = '\0'; // terminate the string
      ndx = 0;
      newData6 = true;
    }
  }

}

void showNewData() {
    if(newData6){
      if(receivedLoRa[0] == '0' && receivedLoRa[1] == '3' && receivedLoRa[2] == '0' && receivedLoRa[3] == '1'){
        for(int j = 0 ; j < 126*RS_COUNT ;j++){ 
          Serial3.print(msgList[j]);
        }
       RS_COUNT = 1;
       free(msgList);
      }

      if(receivedLoRa[1] == 'r' && receivedLoRa[2] == 'u' && receivedLoRa[3] == 'p'){
        strcat(msgList, receivedLoRa);       
        RS_COUNT++;
       }

    }
   newData6 = false; 
}

result : f’]��▒� !�Z�
����O�Urup:5:5:3000:72:5d81cbe90000000000000000000000000000000007f85711110d930000000000001051d010000ffff0bb804ec7333
Urup:5:5:3000:79:5d81cc2b0000000000000000000000000000000007f85711110d930000000000001051d010000ffff0bb804ec733333333bd
Urup:5:5:3000:83:5d81cc530000000000000000000000000000000007f85711110d7a0000000000001051d010000ffff0bb804ec73333333399
Urup:5:5:3000:84:5d81cc610000000000000000000000000000000

The data was stored, but it was lost and was present with the waste price.
What did I mistake in this code?

Neither of your programs is complete. You need to post complete programs with all the data definitions and functions.

...R

I found the problem. I'm having problems with nodejs tcp communication There is no problem in serialportmon tcp communication. I still don't know why this is so.