npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

uareu-node

v1.0.5

Published

A nodejs library to communicate with DigitalPersona 4500 biometric.

Downloads

69

Readme

uareu-node · npm version GitHub license

uareu-node is a typescript library that aims to allow communication between a nodejs application and the DLL / SO of the DPFJ and DPFPDD libraries created by DigitalPersona / HID Global.

  • Attention:

    • This library has only been tested in this environment(s):

      • SO: Windows;
      • Architecture: x64;
      • NodeJS: [12.17.0(x64), 12.13.0(x32)];
    • This library does not replace the original library provided by HID Global, only facilities the communication between it and the aplication.

    • Originally this library was created to a specific device (Digital Persona 4500 Fingerprint Reader), but while we were running the tests, another device worked (Synaptics FP sensor) a device built into the laptop.

    • If using the x32 dpfj and dpfpdd libraries, use a x32 node version, if using x64, use a x64 node version. :)

Requirements

  • A Digital Persona 4500 Fingerprint Reader or similar;
  • dpfj.dll, dpfpdd.dll for Windows, and dpfj.so, dpfpdd.so for Linux, both should be located in a folder named "bin" at the root of the project.

    .
    ├── ...
    ├── bin                     # Libraries files
    │   ├── dpfj.dll            # DPFJ library
    │   ├── dpfpdd.dll          # DPFPDD library
    │   └── ...                 # etc.
    └── ...
        
  • If you choose to keep the library files in another location, when loading the library you must provide the path to the libraries.
    • Example:
          // You just need to specific the path if the libs are not in a 'bin' folder at root.
          uareu.loadLibs('src/libs/dpfpdd.dll', 'src/libs/dpfj.dll')
              .then((res) => {
                  console.log(res);
              })
              .catch((err) => {throw err;});

Installation

Just need to invoke:

$ npm install uareu-node

Examples

You can find this example inside the 'example' folder, and run it invoking:

$ node example/index.js

Code:

    const { UareU, CONSTANTS } = require('uareu-node'); // Import
    const uareu = UareU.getInstance(); // Get a unique instance of library handler.
    let reader; // Create a variable to keep the reader handle after 'open' the device.

    // Probably the code below will also work for you.
    uareu.loadLibs() // Load libs
        .then(() => uareu.dpfpddInit()) // Init libs
        .then(() => uareu.dpfpddQueryDevices()) // Search reader devices connected
        .then((res) => uareu.dpfpddOpen(res.devicesList[0])}) // 'Open' the reader device, it's needed for use others functions like: dpfpddCaptureAsync
        .then((res) => { if (res) reader = res }) // Set reader variable
        .catch((err) => { throw err; });

    // After this initial configuration you can create some functions to capture a fingerprint, identify it, compare it and etc...
    // Note: Identify and Compare are different, the main diference between it are: - Compare only compares two fingerprints;  - Identify compares a fingerprint against a list of fingerprints;

    uareu.dpfpddCaptureAsync(reader, CONSTANTS.DPFPDD_IMAGE_FMT.DPFPDD_IMG_FMT_ANSI381, CONSTANTS.DPFPDD_IMAGE_PROC.DPFPDD_IMG_PROC_DEFAULT, (data, dataSize) => {
        // Here you receive the data of a fingerprint image data (FID)
        // Before compare it, you need to generate a fingerprint minutie data (FMD)
        uareu.dpfjCreateFmdFromFid(data, CONSTANTS.DPFJ_FMD_FORMAT.DPFJ_FMD_ANSI_378_2004)
        .then((res) => {
            // Here you receive the FMD and then you can compare it, save it to compare with the next fingerprint, identify it with a database, etc...
            return uareu.dpfjIdentify(res, [FMD LIST]);
        })
        .then((res) => {
            // Finger was identified or not? The answer you get here.
        })
        .catch((err) => console.log(err));
    });

Contributing

One of the problems that we have already identified, but we have not been able to find a solution is the fact that nodejs stops running a few times when removing and placing the finger very quickly on the reader. Can you help us? Any help is welcome, open a issue, make a pull request, send me a email: [email protected].

License

MIT License. See the LICENSE file.