How to Integrate ZKBioOnline USB Fingerprint Sensor with a Web Application? - Forum

Forum Navigation
You need to log in to create posts and topics.

How to Integrate ZKBioOnline USB Fingerprint Sensor with a Web Application?

Hello everyone,

I am working on a web-based project and need to integrate the ZKBioOnline USB fingerprint sensor. I know that web browsers cannot directly access USB ports for security reasons, but I have the Atlas Fingerprint Driver 5.2.0.38 and the SDK, and I'm looking for a way to make the sensor work with my web application.

Specifically, I need help with:

  1. How to interface with the fingerprint sensor from a web application, given the browser limitations.
  2. Is it possible to use neoEdge to facilitate this integration?

Any guidance, advice, or code examples would be greatly appreciated!

Thank you in advance!

@asmat from VisualNEO Web GPT:

You're absolutely right that standard web applications cannot access USB devices directly due to browser security limitations. However, there are viable alternatives and workarounds to bridge your ZKBioOnline USB fingerprint sensor with your VisualNEO Web application. Here’s a detailed guide:


🔐 Workaround Architecture Using VisualNEO Web

  1. Use a Local Middleware/Bridge App (Driver/SDK Handler):

    • Develop a small desktop application in a language like Python, C#, or Java that interfaces with the ZKBioOnline sensor via the Atlas Fingerprint Driver SDK 5.2.0.38.
    • This app will act as a middleware to receive commands from your web application (via HTTP/WebSocket) and send back the fingerprint data.
  2. Localhost Communication (Using neoAjax Plugin or neoEdge):

    • Option A: neoAjax Plugin: Your VisualNEO Web app can send HTTP requests (via neoAjax) to http://localhost:port/ where your middleware app is listening.
    • Option B: neoEdge Browser: If you're deploying using neoEdge, it allows enhanced capabilities including running local executables or interacting with local files/services, thus enabling closer integration with local hardware.
  3. Typical Flow Example:

    • User clicks "Scan Fingerprint" on your VisualNEO Web UI.
    • Your app sends an AJAX request to the local app (http://localhost:8080/scan).
    • The local app interacts with the fingerprint SDK and captures the fingerprint.
    • Response is sent back to your web app to confirm success or return data (template or verification result).

Is neoEdge a Good Option?

Yes, neoEdge is ideal for such integrations where USB hardware access is needed. It acts as a specialized browser that bridges the gap between local hardware and web technologies. With proper scripting, it can:

  • Call a local executable or script.
  • Read/write local files.
  • Enable communication with fingerprint SDKs via intermediary applications.

You can explore more about neoEdge capabilities in the official help file under: 👉 Plugins Command Reference → neoEdge section in your uploaded manual .


🔧 Code Snippet (VisualNEO Web using neoAjax):

SetVar [fingerScanStatus] "Waiting for scan..."
neoAjax "GET" "http://localhost:8080/scan" "" "scanResult"

Then you handle the scanResult in a variable and show feedback to users.

Sample python code:

from flask import Flask, jsonify, request
import threading
import time

app = Flask(__name__)

# Simulate fingerprint SDK interaction
def capture_fingerprint():
    time.sleep(2)  # Simulate delay for fingerprint scan
    return {
        "status": "success",
        "message": "Fingerprint captured successfully",
        "fingerprint_id": "user_1234",
        "template_data": "base64_encoded_fingerprint_template"
    }

@app.route('/scan', methods=['GET'])
def scan_fingerprint():
    result = capture_fingerprint()
    return jsonify(result)

if __name__ == '__main__':
    print("Starting Fingerprint Middleware Server on http://localhost:8080")
    app.run(host='127.0.0.1', port=8080)

Here is a basic Python middleware server that listens on http://localhost:8080/scan.
It simulates interaction with a fingerprint sensor SDK and returns mock fingerprint data.

🔧 How to Use:

  1. Install required packages (if not already):
    pip install flask
  2. Run this script on the same machine where the fingerprint sensor is connected.
  3. In VisualNEO Web, use the neoAjax command to send a GET request to http://localhost:8080/scan.
  4. Process the JSON response in your web app.
CN_Iceman and Darbdenral have reacted to this post.
CN_IcemanDarbdenral