You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, it's me again, first of all, sorry for not texting you back, I was awaiting for my arduino mega, since uno didn't had enough memory to run the code so couldn't test it until yesterday. I think the code is almost done, when my readers are correct (with the println() before the --X-ARDUINO_MULTIPART), it cannot read the fingerprint correctly, every time I get a error of wrong read length: -1, sometimes it says packet to long: 130, but it's rare. I don't know why this is happening, my server responds with unexpected end of file, so I know that at least one chunk of the file is being send. My code is:
uint16_t count = 0;
bool read_finished;
/* indicate the max size to read, and also returns how much was actually read */
uint16_t readlen = TRANSFER_SZ;
client.println("POST /post HTTP/1.1");
client.println("Host: 192.168.1.107");
client.println("Content-Type: multipart/form-data; boundary=X-ARDUINO_MULTIPART");
client.println("Connection: close");
client.println("Content-Length: 36864");
client.println();
client.println("--X-ARDUINO_MULTIPART");
while (true) {
bool ret = finger.readRaw(FPM_OUTPUT_TO_BUFFER, buffer, &read_finished, &readlen);
if (ret) {
count++;
client.println("Content-Disposition: form-data; name=\"blah.bmp\"");
client.println("Content-Type: application/octet-stream");
client.print("Content-Length: ");
client.println(readlen);
client.println();
client.write(buffer, readlen);
/* indicate the length to be read next time like before */
readlen = TRANSFER_SZ;
if (read_finished){
client.println();
client.println("--X-ARDUINO_MULTIPART--");
client.println();
client.flush();
break;
}
client.println();
client.println("--X-ARDUINO_MULTIPART");
client.flush();
}
else {
Serial.print("\r\nError receiving packet ");
Serial.println(count);
return;
}
yield();
}
I think that could help. My serial monitor messages:
Hi, it's me again, first of all, sorry for not texting you back, I was awaiting for my arduino mega, since uno didn't had enough memory to run the code so couldn't test it until yesterday. I think the code is almost done, when my readers are correct (with the println() before the --X-ARDUINO_MULTIPART), it cannot read the fingerprint correctly, every time I get a error of wrong read length: -1, sometimes it says packet to long: 130, but it's rare. I don't know why this is happening, my server responds with unexpected end of file, so I know that at least one chunk of the file is being send. My code is:
I think that could help. My serial monitor messages:
Also, thanks a lot for the help, I didn't had any idea of how could I post the image, if I progress sometime, I will notify here.
The text was updated successfully, but these errors were encountered: