Comments (3)
Are you using the default example? No change at all except to change the BUFF_SZ?
Can you post your entire serial output/log?
from fpm.
No, it's not the default example.
I found out that templates move successfully to a new place and I can access them in that new fid but it returns "packet too long:130"
my functions:
bool uploadTemplate(uint16_t fid, uint8_t * buff, uint16_t buff_sz){
#ifdef DEBUG_MODE
debugSerial.println("[debug] ==== Upload FingerPrint ====");
#endif
uint16_t p = -1;
p = finger.uploadModel(fid);
if(p != FPM_OK){
#ifdef DEBUG_MODE
debugSerial.println("[debug] FPM: Error in Upload!");
#endif
return false;
}
yield();
finger.writeRaw(buff, buff_sz);
p = finger.storeModel(fid);
if(p != FPM_OK){
#ifdef DEBUG_MODE
debugSerial.println("[debug] FPM: Error in Store!");
#endif
return false;
}
return true;
}
uint16_t donwloadTemplate(uint16_t fid, uint8_t *buff, uint16_t buff_sz){
#ifdef DEBUG_MODE
debugSerial.println("[debug] ==== Download FingerPrint ====");
#endif
uint16_t p = -1;
p = finger.loadModel(fid);
if(p != FPM_OK){
#ifdef DEBUG_MODE
debugSerial.println("[debug] FPM: Error in Load Model!");
#endif
return 0;
}
p = finger.downloadModel();
if(p != FPM_OK){
#ifdef DEBUG_MODE
debugSerial.println("[debug] FPM: Error in Download!");
#endif
return 0;
}
bool read_finished;
int16_t count = 0;
uint16_t readlen = buff_sz;
uint16_t pos = 0;
while (true) {
bool ret = finger.readRaw(FPM_OUTPUT_TO_BUFFER, buff+pos, &read_finished, &readlen);
if (ret) {
count++;
pos += readlen;
readlen = buff_sz - pos;
if (read_finished) { break; }
}
else {
#ifdef DEBUG_MODE
debugSerial.printf("[debug] FPM: Error in receiving packet %u\n!", count);
#endif
return 0;
}
yield();
}
uint16_t total_bytes = count * FPM::packet_lengths[params.packet_len];
return total_bytes;
}
from fpm.
If you enable DEBUG prints in the midst of the template transfer itself, it can cause the process to fail as the sensor sends data faster than the MCU is processing it (because of your print statements). First try with the default templates example as is, and see if that works. If it doesn't, post the output from your serial monitor, not your sketch.
But if it works, then try with your own sketch without debug enabled. Whatever the result, provide the serial logs.
from fpm.
Related Issues (20)
- Upload Image To Reader Slot HOT 2
- R503 led_control problem HOT 9
- Get free/available index for new fingerprint enrollment HOT 2
- templates example fails HOT 8
- Getting "packet too long" using the templates example HOT 1
- issue with sunlight HOT 3
- How can i get buffer data and convert to image? HOT 6
- Template file download time HOT 1
- Upload prints to finger module HOT 6
- Can not connect AS608 to Arduino UNO HOT 2
- Unable to save image using c language HOT 3
- Can we save jpg or png instead of bmp ? HOT 1
- Waiting for valid finger to enroll - finger not detected HOT 1
- Resulting Image HOT 2
- image over udp python example? HOT 7
- Send image over http request HOT 19
- Wrong read length on POST request HOT 1
- Showing error : Communication Error HOT 3
- Error with R307, non-readable char on serial monitor, in arduino web HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fpm.