Comments (39)
@mohammadhasanzadeh There is a reset pin which is pin 7 but I don't know how to reset the hardware. If there is an option for hardware reset please let me know and if the issue is solved then also let me know. I am working on the same module if I come across anything will let you know
Thanks and Regards
from fpm.
The problem is, the initial handshake passes with return code 0 as expected, but the subsequent readParams() call just returns 1 (instead of 16 bytes of data), as you can see from the Serial output.
From what I've found in the datasheet and user reviews, it seems the R308 doesn't support the ReadSysParam command, unlike most other sensors in this family.
This means the library can't automatically determine the sensor capacity, packet length, etc, which are integral to the library logic at the moment. So I'd recommend you either use the Adafruit library or get another more compatible sensor like the FPM10 or ZFM60
from fpm.
Great nice to hear that, I am also having some problem in templates example working on the same
from fpm.
Good to hear. I'll consider adding the option of manually supplying the parameters
from fpm.
@mohammadhasanzadeh Have you uploaded the change password code?
If yes just change the password to the default one and it will work fine, else just try to swap the Rx and Tx pins there are times when these 2 pins are not connected properly we will get the same issue.
Just let us know if the issue is solved
from fpm.
@mohammadhasanzadeh did @MaazSk's suggestion fix your problem? Will be closing the issue if this is done
from fpm.
@mohammadhasanzadeh Have you uploaded the change password code?
If yes just change the password to the default one and it will work fine, else just try to swap the Rx and Tx pins there are times when these 2 pins are not connected properly we will get the same issue.
Just let us know if the issue is solved
No, I didn't change password, also I swap several times Tx and Rx pins.
is there any way to reset fingerprint sensor in hardware mode?
@mohammadhasanzadeh did @MaazSk's suggestion fix your problem? Will be closing the issue if this is done
No, my problem not fixed yet.
from fpm.
I don't know of any hardware reset pin, at least not with the sensors I've worked with. Most times when sensor communication fails, its usually because of a wrong baud rate or password. What is your MCU or dev board?
from fpm.
I did not find any solution for the reset fingerprint sensor in the datasheet.
I use wemos d1 mini lite
.
from fpm.
What pins are you using? What's your SoftwareSerial
declaration like?
from fpm.
I use 12
for Rx and 14
for Tx:
SoftwareSerial finger_print_serial(12, 14);
from fpm.
Can you please send us the code
from fpm.
@mohammadhasanzadeh have you installed the software serial library for wemos or NodeMCU boards there is a different Software Serial library for these boards the arduino library is not compatible, please make this change and let us know
Thanks and Regards
Maaz Shaikh
from fpm.
-
This is the mapping you've been using for your wiring?
D6 = GPIO12 = Sensor TX (green usually)
D5 = GPIO14 = Sensor RX (yellow usually) -
How have you been powering the sensor? With 5V?
-
I've assumed so far that you're running the examples but if you're not, then you should try the builtin
enroll
example. Try changing tofinger.begin(0x12345678)
if it doesn't work at first.
from fpm.
Is very strange problem! I uploaded the Adafruit example:
example
and without any change in pins (Rx=12, Tx= 14) , it works correctly!
from fpm.
Let me see the sketch you used before this, with pastebin
from fpm.
main.cpp:
https://pastebin.com/qjb23QDC
finger_print.cpp:
https://pastebin.com/QHhDtxeP
from fpm.
This isn't the example sketch I said you should try
from fpm.
Will be closing this, if there are no problems with the examples
from fpm.
I have the same problem with enroll
example.
from fpm.
Send the exact sketch with pastebin
from fpm.
As well as what you see in the serial monitor
from fpm.
enroll sketch:
https://pastebin.com/QiAwbYsY
Serial monitor output:
ENROLL test
Did not find fingerprint sensor :(
from fpm.
The pins in your sketch are reversed, compared to what you sent earlier
from fpm.
Yes, I changed pins for equal to:
D6 = GPIO12 = Sensor TX (green usually)
D5 = GPIO14 = Sensor RX (yellow usually)
also I tested both:
SoftwareSerial fserial(12, 14);
and
SoftwareSerial fserial(14, 12);
but both are wrong!
from fpm.
Did any of the FPM examples ever work with this sensor, from the beginning?
from fpm.
No, not any example works with this sensor, but Adafruit
examples works with R308…!
from fpm.
Uncomment FPM_DEBUG in FPM.h and run the enroll example again with the right pins, let me see everything you get from Serial
from fpm.
The following lines printed in debug mode:
�Hl�H�C�d�␇X␡�ENROLL test
[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
0
[+]Read complete
[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
1
[+]Read complete
Did not find fingerprint sensor :(
from fpm.
In FPM::readParams
method I hard-coded the following lines:
sys_params.status_reg = 0x04;
sys_params.system_id = 0x0009;
sys_params.capacity = 500;
sys_params.security_level = FPM_FRR_5;
sys_params.device_addr = 0xFF;
sys_params.packet_len = FPM_PLEN_128;
sys_params.baud_rate = FPM_BAUD_57600;
After that, the fingerprint sensor also worked properly and also features that I needed, such as Enroll finger
, Fast search
, Get free id
, Read template
, Store template
, delete template
and Clear database
all of them worked correctly.
Just in Store template
, occurs TIMEOUT
error randomly.
from fpm.
Of course after some tries Store template
finally works.
from fpm.
@mohammadhasanzadeh what changes have you made for the templates example?
from fpm.
@mohammadhasanzadeh what changes have you made for the templates example?
I did not exactly test templates
example, I tested my own code.
But for running templates
example, I think you just need change FPM::readParams
in FPM.cpp
to:
int16_t FPM::readParams(FPM_System_Params * user_params) {
// buffer[0] = FPM_READSYSPARAM;
// writePacket(FPM_COMMANDPACKET, buffer, 1);
// uint8_t confirm_code = 0;
// int16_t len = read_ack_get_response(&confirm_code);
// if (len < 0)
// return len;
// if (confirm_code != FPM_OK)
// return confirm_code;
// if (len != 16)
// return FPM_READ_ERROR;
// memcpy(&sys_params, &buffer[1], 16);
// reverse_bytes(&sys_params.status_reg, 2);
// reverse_bytes(&sys_params.system_id, 2);
// reverse_bytes(&sys_params.capacity, 2);
// reverse_bytes(&sys_params.security_level, 2);
// reverse_bytes(&sys_params.device_addr, 4);
// reverse_bytes(&sys_params.packet_len, 2);
// reverse_bytes(&sys_params.baud_rate, 2);
sys_params.status_reg = 0x04;
sys_params.system_id = 0x0009;
sys_params.capacity = 500;
sys_params.security_level = FPM_FRR_5;
sys_params.device_addr = 0xFF;
sys_params.packet_len = FPM_PLEN_128;
sys_params.baud_rate = FPM_BAUD_57600;
if (user_params != NULL)
memcpy(user_params, &sys_params, 16);
return FPM_OK;
}
R308 fingerprint sensor just works on 57600
baud rate, so it's important you ensure your software serial works on 57600
baud rate.
from fpm.
@brianrho Timeout
error still occur after call storeModel
randomly.
in what cases may occurs Timeout
state?
from fpm.
Usually whenever it takes too long to get a response because of wrong baud rates, passwords, etc, hardly ever happens but you've made changes so could be anything
from fpm.
I've made changes to support the R308 as well as updated the debug system. You can check with your R308 to see if it works. Set the debug level to 2 so you can see everything that happens, could help track down the source of the timeouts.
from fpm.
@mohammadhasanzadeh what changes have you made for the templates example?
I did not exactly test
templates
example, I tested my own code.
But for runningtemplates
example, I think you just need changeFPM::readParams
inFPM.cpp
to:int16_t FPM::readParams(FPM_System_Params * user_params) { // buffer[0] = FPM_READSYSPARAM; // writePacket(FPM_COMMANDPACKET, buffer, 1); // uint8_t confirm_code = 0; // int16_t len = read_ack_get_response(&confirm_code); // if (len < 0) // return len; // if (confirm_code != FPM_OK) // return confirm_code; // if (len != 16) // return FPM_READ_ERROR; // memcpy(&sys_params, &buffer[1], 16); // reverse_bytes(&sys_params.status_reg, 2); // reverse_bytes(&sys_params.system_id, 2); // reverse_bytes(&sys_params.capacity, 2); // reverse_bytes(&sys_params.security_level, 2); // reverse_bytes(&sys_params.device_addr, 4); // reverse_bytes(&sys_params.packet_len, 2); // reverse_bytes(&sys_params.baud_rate, 2); sys_params.status_reg = 0x04; sys_params.system_id = 0x0009; sys_params.capacity = 500; sys_params.security_level = FPM_FRR_5; sys_params.device_addr = 0xFF; sys_params.packet_len = FPM_PLEN_128; sys_params.baud_rate = FPM_BAUD_57600; if (user_params != NULL) memcpy(user_params, &sys_params, 16); return FPM_OK; }
R308 fingerprint sensor just works on
57600
baud rate, so it's important you ensure your software serial works on57600
baud rate.
Hi, I wanted to register my r308 fingerprint in Arduino, which gives an error and your problem can help me
from fpm.
@mohammadhasanzadeh what changes have you made for the templates example?
I did not exactly test
templates
example, I tested my own code.
But for runningtemplates
example, I think you just need changeFPM::readParams
inFPM.cpp
to:int16_t FPM::readParams(FPM_System_Params * user_params) { // buffer[0] = FPM_READSYSPARAM; // writePacket(FPM_COMMANDPACKET, buffer, 1); // uint8_t confirm_code = 0; // int16_t len = read_ack_get_response(&confirm_code); // if (len < 0) // return len; // if (confirm_code != FPM_OK) // return confirm_code; // if (len != 16) // return FPM_READ_ERROR; // memcpy(&sys_params, &buffer[1], 16); // reverse_bytes(&sys_params.status_reg, 2); // reverse_bytes(&sys_params.system_id, 2); // reverse_bytes(&sys_params.capacity, 2); // reverse_bytes(&sys_params.security_level, 2); // reverse_bytes(&sys_params.device_addr, 4); // reverse_bytes(&sys_params.packet_len, 2); // reverse_bytes(&sys_params.baud_rate, 2); sys_params.status_reg = 0x04; sys_params.system_id = 0x0009; sys_params.capacity = 500; sys_params.security_level = FPM_FRR_5; sys_params.device_addr = 0xFF; sys_params.packet_len = FPM_PLEN_128; sys_params.baud_rate = FPM_BAUD_57600; if (user_params != NULL) memcpy(user_params, &sys_params, 16); return FPM_OK; }
R308 fingerprint sensor just works on
57600
baud rate, so it's important you ensure your software serial works on57600
baud rate.
Can you send me the code with which you could register your fingerprint on r308?
from fpm.
@JavadMohammdi As explained in the README, there's an example already that shows how to setup your R308 to work with this library. You can easily port/transfer the setup()
in that example to the other examples like enroll
and templates
.
from fpm.
Related Issues (20)
- Best sensor to use? HOT 2
- A better translated version of datasheet? HOT 1
- 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
- Upload template to AS608 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
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.