Diving into a Digital Persona

For convenience, security, and effectivity, you’d be hard-pressed to find a better alternative than a biometric reader for the purposes of identifying an individual.

I’ve recently come into possession of the U-are-U Digital Persona 4000B Single Fingerprint scanner. A driver pack and/or software development kit (SDK) is a bit of a challenge to find, as most (at the time of writing) are tucked neatly behind paywalls, and with good reason; translating an image of a fingerprint into data is not the simplest of tasks. There seems to be, however, an open source solution (but we’ll get into that later).

Plugging the device into a Windows 10 computer only flashes the built-in LED built into the interior of the unit. Official drivers, SDKs, and sample codes offered by the website of Digital Persona require payment, but after some research, a free alternative can be downloaded at neurotechnology.com [mirror]. Another, open-source solution is found in the form of iamonuwa’s github repository.

After downloading and installing the relevant files (the Setup.exe files in each download’s subdirectories), the LED stays steadily on, indicating that the device is ready to start reading some fingers.

Using the included code samples the reader works just fine, but as a web developer, the main issue I found is the absence of a web-ready interface between the device and the API the device was intended for. Code samples include C#, C++, Java, and Visual Basic which I believe none of which are currently considered “web” languages.

Noticing that the included code samples are primarily proprietary languages, some research was done for the open-source side of this device.

A little progress has been made when plugged into my Raspberry Pi: the libraries are readily available on the official repositories. A simple sudo apt-get install libfprint fprintd fprint-demo got me the demo program similar to the windows demos above (but with a lot less searching, might I add).

After confirming the device works, with fprint-demo, my next step was getting it to accept commands without using a GUI. I opted instead to use Cython since I have no experience in C languages. This allowed me to use another Python library: fprint.

There were a few little humps when installing Cython; the Raspberry Pi needed a python update (sudo apt-get update python), cython didn’t like to be installed with pip but preferred pip3 (pip3 install cython) and fprint itself also preferred pip3 (pip3 install fprint).

fprint is written in C, but Cython has provided the compiler that allows Python to use the C library. Using the code taken from gtors/fprint repository, the fingerprint reader responds, and the enrolling and verifying functions are available for use. The following code is taken from gtors/fprint and includes an enroll and verify function:

import fprint
fprint.init()
ddevs = fprint.DiscoveredDevices()
if len(ddevs) > 0:
    ddev = ddevs[0]
    dev = fprint.Device.open(ddev)
    (print_data, image) = dev.enroll_finger()
    print_data = fprint.PrintData.from_data(print_data.data)
    (result, img) = dev.verify_finger(print_data)
    print(result)
    assert result is True
    dev.close()

help(fprint) should display the specifications of the library, but for the basic reading and displaying of fingerprint data: applying inspect.getmembers(print_data) returns the print_data object, along with that I can only assume is fingerprint data presented in blob or binary form.

All that’s left to do is to save the data from print_data into a database, and possibly query that with any future input from the reader!

5 Replies to “Diving into a Digital Persona”

  1. you have done the good jobs. however, I have tried this and encounter problem on windows when installing fprint. have you got success can you advise the instruction?

    1. Hi Pornchai,

      Thanks for your feedback! I haven’t tried installing fprint on a windows computer yet, but I could try to help you at the point where you get stuck in the installation process.

      At what part of the installation does the process halt? Do you have an error message showing up? What’s the error message?

  2. Good day sir, I want to use it in raspberry but when i try to
    sudo apt-get install libfprint fprintd fprint-demo
    it says unable to locate package libfprint.. can you help me sir.?
    Thank you.

  3. Hi sir, do you know if this fingerprint scanner has a limit? like the UART fingerprint scanner has 256 only. I need an unlimited one and I’m planning to buy digital persona hoping that this fingerprint scanner doesn’t have a limit.
    Your response is highly appreciated! Thank You!

    1. Hey Justin,

      As of yet, I have not hit the limit for this device. I believe there isn’t any (unless the manufacturer built one in, but there’s nothing about that on the product’s website)

Leave a Reply

Your email address will not be published.