I have just shared content in Guides > Raspberry Pi: " Fingerprint Scanner with Raspberry Pi Single Board Computer - Unlock with Biometrics!"
Read more
Hi Kou,
Weâll have to see your whole error stream to get a proper idea of whatâs going on. You can access the forum via the web browser on your Pi, so could you copy the full message in between 3 backticks (`) into a post here?
Thatâll help us troubleshoot this one
Hello James, here is the error
%Run fingerprint_simpletest_rpi.py
Traceback (most recent call last):
File â/home/kouma17/Adafruit_CircuitPython_Fingerprint/examples/fingerprint_simpletest_rpi.pyâ, line 22, in
finger = adafruit_fingerprint.Adafruit_Fingerprint(uart)
File â/usr/local/lib/python3.9/dist-packages/adafruit_fingerprint.pyâ, line 120, in init
if self.verify_password() != OK:
File â/usr/local/lib/python3.9/dist-packages/adafruit_fingerprint.pyâ, line 136, in verify_password
return self._get_packet(12)[0]
File â/usr/local/lib/python3.9/dist-packages/adafruit_fingerprint.pyâ, line 348, in _get_packet
raise RuntimeError(âFailed to read data from sensorâ)
RuntimeError: Failed to read data from sensor
Hey Kou,
Seems that the Pi is having trouble communicating with the Fingerprint sensor. Try running:
ls /dev/tty*
You should see a list of available serial ports, including the one that the fingerprint sensor is connected to. If you do not see the sensorâs serial port, there may be an issue with the sensor or the connection.
If you can see it is recognised, ensure that the baud rate setting of the fingerprint sensor matches the baud rate setting of the uart
object in your Python code. The default baud rate for the fingerprint sensor is 57600, but it can be changed using the set_baud_rate()
method.
Cheers,
Blayden
Hello sir,
i have a quick question about some parts
Iâm using a capacitive fingerprint sensor and ttl usb adapter, and when i run the program, it doesnât work.
Can i get a hint about what to change, please ?
My Error: AttributeError: module âadafruit_fingerprintâ has no attribute âAdafruit_Fingerprintâ
This error can occur if you attempt to import the wrong file - Python does not distinguish between a script and a library module. What is the name of you script file?
fingerprint_simpletest_rpi.py
:
File â/home/louay/Adafruit_Circuit Python_Fingerprint/examples/fingerprint_simpletest_rpi.pyâ,
line 17 uart serial. Serial(â/dev/ttyS0â, baudrate=57600, timeout=1)
IndentationError: unexpected indent
i also didnât find ttyS0 when i used ls /dev/tty*
even tho it was there when i ran this on pi 3b (same issue btw)
i also tried ls -l /dev/serial*
and it returned:
lrwxrwxrwx 1 root root 8 Apr 26 17:19 /dev/serial0 â ttyAMA10
i changed the code to serial0 and AMA10 and didnât work.
Edit: I USED /dev/ttyAMA0
and it worked, looks like raspberry pi 5 doesnât have ttyS0