Comments (132)
No, I said to provide a screenshot of the python console itself after the image is done being transferred. Dont paste the text. Upload an image of the console.
from fpm.
Also turn off debug, when you do this
from fpm.
When i turn off debuging the python exe doesnt work:
it creates blank image, with no content.
With debugging is open, i get this:
This creates image as seen in above comments
from fpm.
Okay. So this is the latest version of the library, right? And in the first case, you get "Timeout!" after waiting for a few seconds?
from fpm.
The "Timeout!" doesn't show immediately the image stream begins?
from fpm.
Yes it dosnt show immediately, it takes like 10 or little more seconds. And this is latest version of library, with R551 uncommented line
from fpm.
It seems your module has a different image size of 192x192. I've pushed a change to the python script. Assign True to FPM_R551_MODULE at the top and run it. Let me know how it works out
from fpm.
It's important that debugging is turned off for this sketch because the debug messages go through the same Serial port as the image stream, so all those debug strings end up getting written to the bmp file, which isnt what you want.
from fpm.
I get same error:
Did you recompiled python exe or it read from that file?
from fpm.
No I haven't rebuilt the exe. Can you run the python script?
from fpm.
I edite phyton file, but i dont see changes, so i assume your changes is only on file, not on .exe, to build exe from python file i cant yet, i had lots of trouble with python on Windows 10, would be good if you could build it
from fpm.
Ok nevermond, i did run python file, and i got image however it doesnt look as expected either:
from fpm.
Let me see the console output.
from fpm.
from fpm.
According to documentation image buffer size can be 192x192 with depth of 8
from fpm.
Yeah, made a mistake. In the python code, change the WIDTH = 96 to 192.
from fpm.
I tried that myself, i still get error. Console looks like this:
Image looks like this:
from fpm.
That looks like the very last packet. Can you try running it again? I want to see if the failure is consistent
from fpm.
I think you didnt change this line FPM_R551_MODULE = False
to True
like I said. The arduino ends up waiting forever for another packet, when the image stream is already completed.
from fpm.
Two tries out of five did not gave error message, however rest of the tries gave same error message. All scanned images was same size.
Code is:
from fpm.
What is the exact size? Check the properties of the generated image and send a screenshot of that. Also a screenshot of the console output when there was no error.
from fpm.
Scanned image size is 192x192 pixels
Console look like this:
port is COM3 and bound is 57600
from fpm.
As well im using python -m pip install pyserial as for serial import for python, that maybe be other kind of serial?
from fpm.
No, its fine. Run the sketch, but use the serial monitor instead.
from fpm.
Looks like the problem isnt with the script, its with the module not sending FPM_ENDDATAPACKET to show that its done.
from fpm.
You haven't made any changes to the image_to_pc sketch, right?
from fpm.
No, i havent, only to FPM.h library, where i uncommented one line of code
/* R551 is different in a few ways (no high-speed search, off-by-one template indices)
uncomment this line if you have one of those */
#define FPM_R551_MODULE
from fpm.
Okay. Comment out line 663 outStream->write(byte);
in FPM.cpp. Enable debugging. Then run the sketch with the serial monitor alone. Let me see what is printed in the last few packets of the image, before the error shows up.
from fpm.
[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x2
[+]Length: 128
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 80 EF 1 FF FF FF FF 8 0 82 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
Read data failed: -1
Error receiving packet 80
And this is like 1/3 shorter than rest
from fpm.
At beginning it seems to get normal packages but on the end only FF's appear
from fpm.
The FFs arent a problem, they just show that most of the image is white pixels as expected.
Comment out these debug lines in the code:
[+]Got header
[+]Address: 0xFFFFFFFF
As well as line 670: FPM_DEBUG_HEX(byte); FPM_DEBUG_PRINT(" ");
I want only the PID and length to be printed.
from fpm.
Before stream:
[+]PID: 0x7
[+]Length: 1
On the stream:
[+]PID: 0x2
[+]Length: 128
Read data failed: -1
Error receiving packet 144
from fpm.
Run it a few more times, check that it gives the same result and stops at the same packet
from fpm.
Yes its always same packet
from fpm.
And this is the very last packet always:
[+]PID: 0x2
[+]Length: 128
Can you check if any packet has a PID of 0x8?
from fpm.
There is no packet with PID 0x8
from fpm.
At line 662 in FPM.cpp, change this:
if (outStream != NULL) {
outStream->write(byte);
}
to
if (outStream != NULL) {
outStream->write(byte);
chksum += byte;
}
and this at 684:
if (outStream == NULL && to_check != chksum)
to:
if (to_check != chksum)
from fpm.
Let me know if it prints "Wrong chksum" for any packet.
from fpm.
outStream->write(byte);
should still be commented out as before.
from fpm.
It prints that for every stream packet
[+]Wrong chksum
Read data failed: -1
Error receiving packet 0
from fpm.
What of the PID and length? There was no wrong chksum in the earlier commands, right?
from fpm.
[+]Wrong chksum
[+]PID: 0x2
[+]Length: 128
[+]Wrong chksum
Read data failed: -1
Error receiving packet 0
It was all the time while stream begin, before stream, there there was this:
[+]Length: 1
[+]PID: 0x7
from fpm.
You mean, there was no "wrong chksum" before the stream began, but then after that, each packet has a wrong chksum? ALL the packets with wrong chksums have a PID of 0x2?
from fpm.
Yes
from fpm.
Uncomment line 670: FPM_DEBUG_HEX(byte); FPM_DEBUG_PRINT(" ");
and the other debug lines (Header and address only). I want to see the entire packet as its printed. Use pastebin.com to send a dump of everything printed in the serial monitor.
from fpm.
Also send a copy of your FPM.cpp in another paste.
from fpm.
https://pastebin.com/Xcpz16Vv the serial monitor
https://pastebin.com/vZpz5D75 fpm.cpp file
from fpm.
Have you restarted the module, since you started using it to get images?
from fpm.
The packet length setting is being ignored for some reason and it could be because it hasn't taken hold yet.
from fpm.
Probably not, how do i reset it? using reset pin or just unplug?
from fpm.
Just unplug from power and try again.
from fpm.
There is same error
from fpm.
Okay then. Lets reset the packet length to 32 and restart. Change this line in the sketch:
uint8_t value = FPM_PLEN_128;
to:
uint8_t value = FPM_PLEN_32;
Restart the module and try the sketch again. Update the serial monitor dump at the same pastebin link.
from fpm.
Remove the header and address debug messages too
from fpm.
https://pastebin.com/SRYQ6X1J new pastebin, because i cant edit old one
from fpm.
How are you powering the module?
from fpm.
The Arduino Uno 3.3V pin?
from fpm.
yes, as i showed you in the first email i sent
from fpm.
Do you have another 3.3V source? Maybe a USB-TTL adapter? The arduino 3.3V pin can supply only 50mA max and I want to rule out power as a possible cause.
from fpm.
I dont have anoter adapter apart arduino, but i di have Raspberry Pi3, thi i dont know if its any help
from fpm.
And i do have 5V phone charger, but that also is not an option
from fpm.
Yeah try powering the sensor with the RPi 3.3V pin, no need to connect anything else to the RPi, just power it. Run the sketch again and update the dump. You can update it at the bottom
from fpm.
Sorry, you can edit it at the top of the text window. Just use Find in your browser to search for "edit"
from fpm.
Apparently i have to be logged in to be able to edit so i just rather paste new ones
https://pastebin.com/5hiCpBND
Error seems to be same
from fpm.
Okay. Run it again. Seems the very first image packet has a correct checksum but the ones that follow are wrong.
from fpm.
this is what i got now
from fpm.
Okay comment out the address, PID and length messages. Only the image bytes should be printed and "wrong chksum"
from fpm.
from fpm.
Run the "set_parameters" example. It will change the baud rate to 9600. Then run the image_to_pc again with SoftwareSerial baud rate of 9600.
from fpm.
Remember to comment out the Address debug messages.
from fpm.
Apparently for some reason Arduino does not recognize fingerprint anymore
from fpm.
Did you update this line fserial.begin(57600);
to fserial.begin(9600);
?
from fpm.
The baud rate is now 9600 so you need to change it in your sketch
from fpm.
Alright, now i get Unknow error
from fpm.
Is this with the "image_to_pc" sketch?
from fpm.
Restart the module and run the sketch
from fpm.
I get this and nothingh happen after this
from fpm.
Looks like the debug messages are disabled
from fpm.
Now i get this
https://pastebin.com/JDTf2cv6
from fpm.
Set this: uint8_t value = FPM_PLEN_32; back to 128. And disable the printing of the Address and Chksum. ONLY the bytes should be printed.
from fpm.
Restart the module after you change the packet length to 128.
from fpm.
It printed everything in one line:
https://pastebin.com/KXcL05aB
from fpm.
Disable debug. Run the sketch and wait for the image stream to complete. You wont see any bytes printed except the final error/success message.
from fpm.
from fpm.
Seems like it read all bytes 192x192
from fpm.
yes. The problem seems to have been the delays from the debug messages. Try running this with the python script now.
from fpm.
from fpm.
Oh yeah, you need to put back this line: outStream->write(byte);
in FPM.cpp
so the bytes actually get written
from fpm.
Do i leave cheksum as well?
from fpm.
Yeah leave it as is
from fpm.
from fpm.
Use this script instead: https://pastebin.com/wenMKKGN. It seems the module datasheet is also wrong and every byte of the image is being sent, not half. The script expects 18432 bytes not 36864
from fpm.
Now i can almost see image, however its somehow divided into 3 and bottom is just white
from fpm.
Let me see the console output
from fpm.
from fpm.
This result is the same everytime?
from fpm.
Yea
from fpm.
At this point, the issue is the format of the image. I assumed its a simple grid of 192x192 like they said but if its not then it will require some analysis to detect the image dimensions. Try this: https://pastebin.com/wenMKKGN. I've set the image size to 384x192.
from fpm.
If it doesn't work, we'll have to leave it for now. You can send me the raw 192*192 image and I can check it out later. Maybe you can also search the web for the R551 SDK or contact sellers/manufacturers. Ask them about the image dimensions.
from fpm.
These are 192x192 and 384x192
I will try contact seller for dimentions, but i think they wont be any of help
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
- 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
- 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.