0

I have a fingerprint sensor and would like to integrate with my web application using C #. can anybody help me? I have only one button to capture biometrics.

I saw this topic but would like to create my own sensor communication service but using C#

link: Safron morpho finger print sensor integration with web java application

<button id="capture">Capture</button>

<button id="compareBio">Compare biometric</button>

<button id="connection">Connection fingerPrint</button>

const capture = document.getElementById("capture")
const compareBio = document.getElementById("compareBio")
const connection = document.getElementById("connection")

   // Capture biometrics
   capture.addEventListener("click", function(){
       console.log("capture")
   })

   // Compare biometrics
   compareBio.addEventListener("click", function(){
       console.log("compareBio")
   })

   // Connection device morpho Mso1300
   connection.addEventListener("click", function(){
       console.log("connection")
   })

In the "capture" button collect 2 biometrics with different fingers, reading the impression 3 times.

The 'connection FingerPrint' button show device name, port and some other USB parameter

The 'compare biometric' button make a comparison between the captured biometrics and a new collection

  • The link looks like c# and Java. So what part of code do you need converted to c#. It looks like you are a two port application 1) One with a USB Finger Print Scanner 2) One Web Application. So I'm not sure what you need help with. – jdweng Aug 13 '19 at 12:41
  • I need to convert servelet to c # because the link is in java and i use c # My problem is: I have a fingerprint sensor but I can only use it via desktop application, but I want to use it with my web application. I saw in this link that they did it, only with servelet made with JAVA and need to be done in C # – César Ryan Aug 13 '19 at 13:11
  • It is a USB device so you can only access it locally (one port). So you want to add 2nd port for a webpage. Then have your application transfer the USB data to web service. It looks like the JAV is using XML HTTP. So is the USB data XML format? Do you really need to use the Java or can you write your own interface between USB and Web? – jdweng Aug 13 '19 at 13:32
  • So I want to use C #, I have to use C #. I need to create a C # service to collect my biometrics through a application web, just as the guy did on the link I posted. Sorry, don't be a little bleak in my words. – César Ryan Aug 13 '19 at 14:02
  • Then write the code in c#. What help do you need? – jdweng Aug 13 '19 at 14:11
  • Friend, I have the morpho SDK, but I don't know how to create a C # service to collect biometries. But the person on this link was able to do exactly what I want. I wanted some help instead of doing a SERVELET JAVA doing a service in C #, got it ?? – César Ryan Aug 13 '19 at 14:18
  • It looks like all the java is doing is calling Morpho API to do the work. Do you have the documentation on the API? So it is calling the API instead of directly communicating over USB. You have to determine if you want to command directly to USB or use the API. Then get documentation for the method you choose. – jdweng Aug 13 '19 at 14:49
  • I actually downloaded the files and installed them. And what I understand is that the html page calls a method that runs on a windows service. What I have is the SDK + documentation file. But I couldn't call any functions via C # yet. Because I have to make external calls, and the parameters are very complicated to understand. – César Ryan Aug 13 '19 at 16:14
  • Let me know when you need help. – jdweng Aug 13 '19 at 16:20
  • So, I have the dll that would be the MORPHO_SDK.DLL and I have the documentation of this DLL, but I am not right to call any function. What I need is to create a C # service that my html page after pressing the button call it and trigger my fingerprint sensor – César Ryan Aug 13 '19 at 16:25
  • The parameters are in the java code that you can simply send in c#. function uploadThumb(image){ var formdata = image; var fr = new FormData(); fr.append("data", formdata); var id = "<%=patientId%>"; var url = "ThumbUpload?patientId="+id; – jdweng Aug 13 '19 at 16:33
  • Well that doesn't help me. I really need to create a C # service to drive the biometric collector. Something similar to the link in the description of my problem. Sorry but I think either I'm not getting through what I need to solve my problem, or you don't understand what I need. – César Ryan Aug 13 '19 at 16:52
  • You said : "and the parameters are very complicated to understand" So I saId "Use same parameters as the java code". – jdweng Aug 13 '19 at 17:02
  • How do I trigger the biometric print sensor through C #? using the DLL I informed you "MORPHO_SDK.DLL? This is the name of a function, which has in the documentation .chm file: I C_MORPHO_Device::InitUsbDevicesNameEnum ( PUL o_pul_NbUsbDevice ) What kind is this PUL in C #? docs: Parameters [out] o_pul_NbUsbDevice •The number of the USB MorphoSmart™ devices plugged to the host. – César Ryan Aug 13 '19 at 17:11
  • The java code is sending a request with the commands (including the id of finger print). The response contains the data. A 200 OK as the response status indicates the data is good. Are you trying to use a HTTP Request/Response or doing it though USB commands. I do not see in the java commands any initialization for the USB. For the java to work there must be a service running which does the USB initialization. – jdweng Aug 13 '19 at 17:21
  • Precisely, there is a service running. But I want to develop my own service because I don't know if the one he provided is public. Because I need this to use in my business. – César Ryan Aug 13 '19 at 17:31
  • Isn't there a service in the SDK? – jdweng Aug 13 '19 at 20:34
  • No, it does not exist. So I need to create one to communicate with the biometric sensor. – César Ryan Aug 13 '19 at 20:42
  • I need help with this problem. Does anyone know how to help? – César Ryan Aug 14 '19 at 18:26
  • There are two services you need. I downloaded from your line For_Testing.rar. There is a file Reg.bat that has following : sc create MSO_API_Service binPath= "C:\FingerprintSensors\SMARTCHIP_DLL\MorphoInteractiveService.exe" start= auto DisplayName= "MorphoSmart API Service" sc start MSO_API_Service. The code starts a service that starts a webpage that transfers data to device on USB. The Java code communicates through the executable. You want to develop a 2nd service that allows remote users to connect (just like the java). – jdweng Aug 15 '19 at 07:07
  • Yes. I have a biometric capture sensor. But it is only USB, therefore LOCAL. So I need this service that communicates my web application with my capture device. I need to develop a service that allows users to communicate with the capture device. Same as java, except using the C # language – César Ryan Aug 16 '19 at 18:54
  • I fully understand. You could use the vendor API with the local web service, or develop your own USB, Does the vendor have a library or do you have to develop your own. It is a simple Serial Port Application. There are 4 steps 1) Detect Port Number of USB Device 2) Connect to the device 3) Initialize the device 4) Send Commands and Receive Responses including finger prints. – jdweng Aug 16 '19 at 21:10
  • Not so simple, I tried some in a few ways. I did using a simple APIREST to boot the device. However, the device DLL itself, instance, that opens a window "windows forms", this generates an error in the call. I tried to make a C # service for windows, but I did not get success either, because the DLL generates this window, thus causing error. I wonder how you could do this by opening this window, or if possible not opening it. Cause the steps you said, ok, I already have them on my mind. But executing them is not that simple. – César Ryan Aug 19 '19 at 11:44
  • You do not need a window. It looks like the boot must find the USB device and open the connection and do set parameters in the device. Does the API return a object from the boot? Does the API have a method for sending raw commands/data without opening the window. Once the boot is complete is looks like all you have to do is send the same commands that the java code does to retrieve the finger print. You would need to setup a asynchronous read method (or use the one from the API). – jdweng Aug 19 '19 at 12:15
  • Yes, I don't need a Window, but the API / DLL I have has methods defined in which it calls a windowsForms. I will show the method that makes him start the device and collect the biometrics: And yes, it returns an object of type: EnrollmentResult And the API has no method for sending commands or raw data without opening a window. – César Ryan Aug 19 '19 at 13:09
  • Here is part of the code that calls the device: AcquisitionForm = new MorphoAcquisitionComponentForm(); AcquisitionForm.DeviceType = m_DeviceType; m_Handle = AcquisitionForm.Handles; InitializeAcquisitionForm(ref AcquisitionForm); AcquisitionForm.Consolidation = Consolidation; if (DeviceName.Contains("FVP") && !Consolidation) { throw new ConsolidationException("Consolidation must be activated."); } InitializeIED(ref AcquisitionForm); FormShownEventHandler value = Enroll; AcquisitionCanceledEventHandler value2 = – César Ryan Aug 19 '19 at 13:10
  • Does vendor give you USB Commands to control device? What is the boot command? – jdweng Aug 19 '19 at 14:42
  • He provided me with two DLLS, but only to control via desktop application. However when searching, I saw that it is possible to communicate through web applications using windows service. – César Ryan Aug 19 '19 at 14:45
  • You should be able to use the desktop application. Are the methods in desktop dll command line (from cmd.exe) or methods that can be called from c++ (or c#). – jdweng Aug 19 '19 at 15:44
  • I have two libraries, two Morpho in C #, and one in C ++. But I am not familiar with c ++, making implementation difficult. So what I wanted was to know how the link guy I posted was able to call the capture device. – César Ryan Aug 19 '19 at 16:35
  • The first link you provided was java and connected to the web page started by the BAT file. The Form code posted above was self contained and did have an interface from another application. – jdweng Aug 19 '19 at 16:43
  • Precisely, the link posted is JAVA, but I need to do the service in C #. The form code I posted is my own, just to illustrate how I want it to work. That would be: A button calls the service in C #, and the service calls the biometric capture. understood?? – César Ryan Aug 19 '19 at 17:14
  • I just answered your question why the posted code worked. Your solution need to use the console dll which is different. – jdweng Aug 19 '19 at 17:17
  • I did not understand. Can you explain me more detailed ?? Yes the dll is different but is there any way i can do what i need? – César Ryan Aug 19 '19 at 17:26

0 Answers0