Chat freely about anything...

User avatar
By RichardS
#81120 Try


Code: Select allchar buf[32];
int len;
 while  (len = webFile.read((uint8_t *)buf, 32)) {
   client.write((const char*)buf, len);
 }


Sirquil wrote:
Try making char buf[1024] into char buf[32]

The serial printing may not like the long print....

RichardS


Still drops characters with char buf[32].

Code: Select allchar buf[32];
int len;
 while  (len = webFile.read(buf, 32)) {
   client.write((const char*)buf, len);
 }


Produces compiler error: invalid conversion from 'char*' to 'uint8_t* {aka unsigned char*}' [-fpermissive]

Thank you for the suggestions.

William
User avatar
By RichardS
#81122 If that does not work... add.... serial.print to see if its happening there also.... if not you know its something 100% client.write related.

char buf[32];
int len;
while (len = webFile.read((uint8_t *)buf, 32)) {
client.write((const char*)buf, len);
Serial.print((const char*)buf, len);
}

RichardS
User avatar
By RichardS
#81124 Awsome! :lol:

RichardS