Skip to content

large file download problem #33

@ydh0120

Description

@ydh0120

When I try to download large size contents using WiFiClient( 20kb ), some bytes are missed. I read some issues #15 here but it was closed and it didn't work for me. The missing bytes are middle part of the contents. The end of contents are correct.

my code is here


    unsigned char ch;
    while ( cnt < bodyLen ) {
      if( client.available() ) {
        ch = client.read();
        sprintf(hexbuf, "%02X", ch);
        Serial.print(hexbuf);

        cnt++;

        if( cnt % 2 == 0 )
          Serial.print(' ');
        if( cnt % 16 == 0 ) {
          sprintf(hexbuf, "%d, %ld / %ld\n", line++, cnt, bodyLen);
          Serial.print(hexbuf);
        }


      } // end of available
      else {
        for(j=0;j<512;j++);
      }


    } // end of while

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions