512 bytes Also WORKING - with yesterday's github USB update: Multiple of the 64 byte line in a single Send up to and including 512 works as a single read group.
Did CODE mod to show read count and string.length and count of .available() in serialEvent() call and they agree and 511 bytes and 512 bytes come in one packet.
Anything over 512 comes in the next group, and two sets of 512 in one string arrive in two packs of 512.
Code:
String hostString = "";
int ii, jj;
void setup() {
Serial.begin(38400);
hostString = "";
ii = jj = 0;
}
void serialEvent() {
if (Serial.available())
jj = Serial.available();
while (Serial.available()) {
char inChar = (char)Serial.read();
hostString += inChar;
ii++;
}
}
void loop() {
if (hostString.length()) {
Serial.print(hostString);
Serial.printf("\nString len is %u and read cnt=%u {.avail()=%u}\n", hostString.length(), ii, jj);
hostString = "";
ii = jj = 0;
}
}