Handling Biometric Fingerprint Attendance Machine
-
anyone can help me here please :( : Handling Biometric Fingerprint Attendance Device by using Socket (JAVA) Is that possible?! I try with Socket, BUT it does not executed with me! Me Code is:
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.net.UnknownHostException;public class Requester {
Socket requestSocket;
ObjectOutputStream out;
ObjectInputStream in;
String message;Requester() {
}void run() throws IOException {
try {
// 1. creating a socket to connect to the server
requestSocket = new Socket("192.168.0.19", 4370);
System.out.println("Connected to given host in port 4370");
// 2. get Input and Output streams
in = new ObjectInputStream(requestSocket.getInputStream());
// 3: Communicating with the server
String line;
while (true) {
line = in.readLine();
if (line != null) {
System.out.println(line);
}
}
} catch (UnknownHostException unknownHost) {
System.err.println("You are trying to connect to an unknown host!");} catch (IOException ioException) { ioException.printStackTrace(); } catch (Exception Exception) { Exception.printStackTrace(); } finally { in.close(); requestSocket.close(); }
}
void sendMessage(String msg) {
try {
out.writeObject(msg);
out.flush();
System.out.println("client: " + msg);} catch (IOException ioException) { ioException.printStackTrace(); }
}
public static void main(String args[]) throws IOException {
Requester client = new Requester();
client.run();
}
}f anyone could help me to communicate with the finger print device I will be grateful.
Please refer to point 9 of the forum guidelines above.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
Please refer to point 9 of the forum guidelines above.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
see update please!
-
anyone can help me here please :( : Handling Biometric Fingerprint Attendance Device by using Socket (JAVA) Is that possible?! I try with Socket, BUT it does not executed with me! Me Code is:
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.net.UnknownHostException;public class Requester {
Socket requestSocket;
ObjectOutputStream out;
ObjectInputStream in;
String message;Requester() {
}void run() throws IOException {
try {
// 1. creating a socket to connect to the server
requestSocket = new Socket("192.168.0.19", 4370);
System.out.println("Connected to given host in port 4370");
// 2. get Input and Output streams
in = new ObjectInputStream(requestSocket.getInputStream());
// 3: Communicating with the server
String line;
while (true) {
line = in.readLine();
if (line != null) {
System.out.println(line);
}
}
} catch (UnknownHostException unknownHost) {
System.err.println("You are trying to connect to an unknown host!");} catch (IOException ioException) { ioException.printStackTrace(); } catch (Exception Exception) { Exception.printStackTrace(); } finally { in.close(); requestSocket.close(); }
}
void sendMessage(String msg) {
try {
out.writeObject(msg);
out.flush();
System.out.println("client: " + msg);} catch (IOException ioException) { ioException.printStackTrace(); }
}
public static void main(String args[]) throws IOException {
Requester client = new Requester();
client.run();
}
}f anyone could help me to communicate with the finger print device I will be grateful.
-
What does "it does not executed with me" mean; we cannot guess from this what is going wrong? Have you checked the documentation for the device to make sure your protocol is correct?
sure I checked the documentation very well, and I am sure from the port number and IP address are correct! I mean BY "it does not executed with me" It can not read from the device, just connect and wait for response from the device without hope to retrieve the data :( I do not know where is the error in my code :( !!
-
sure I checked the documentation very well, and I am sure from the port number and IP address are correct! I mean BY "it does not executed with me" It can not read from the device, just connect and wait for response from the device without hope to retrieve the data :( I do not know where is the error in my code :( !!
Maheera Jazi wrote:
I do not know where is the error in my code
Well you need to use your debugger to check what is happening internally. But, more importantly, you need to be sure that the device is functioning correctly, and communicating with your PC. And for that you need to contact the device manufacturer for help.
-
Maheera Jazi wrote:
I do not know where is the error in my code
Well you need to use your debugger to check what is happening internally. But, more importantly, you need to be sure that the device is functioning correctly, and communicating with your PC. And for that you need to contact the device manufacturer for help.
yes, thanks for your response please.But, question please, you mean that it is possible to use Socket Object to retrieve the data from Fingerprint attendance machine?! as in my code!?
-
yes, thanks for your response please.But, question please, you mean that it is possible to use Socket Object to retrieve the data from Fingerprint attendance machine?! as in my code!?
-
Maheera Jazi wrote:
you mean that it is possible to use Socket Object to retrieve the data from Fingerprint attendance machine?!
No idea. As I keep saying, you must read the documentation for the device; we have no idea how it works.
ok, thanks! although this is not mentioned on the device documentation! I will try all roads!
-
ok, thanks! although this is not mentioned on the device documentation! I will try all roads!
Forget what is not mentioned and focus on what is. You cannot create an application to use this device by guesswork, you need to study the documentation and follow what is says. If the documentation is not clear then go back to the manufacturers and ask for help.
-
anyone can help me here please :( : Handling Biometric Fingerprint Attendance Device by using Socket (JAVA) Is that possible?! I try with Socket, BUT it does not executed with me! Me Code is:
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.net.UnknownHostException;public class Requester {
Socket requestSocket;
ObjectOutputStream out;
ObjectInputStream in;
String message;Requester() {
}void run() throws IOException {
try {
// 1. creating a socket to connect to the server
requestSocket = new Socket("192.168.0.19", 4370);
System.out.println("Connected to given host in port 4370");
// 2. get Input and Output streams
in = new ObjectInputStream(requestSocket.getInputStream());
// 3: Communicating with the server
String line;
while (true) {
line = in.readLine();
if (line != null) {
System.out.println(line);
}
}
} catch (UnknownHostException unknownHost) {
System.err.println("You are trying to connect to an unknown host!");} catch (IOException ioException) { ioException.printStackTrace(); } catch (Exception Exception) { Exception.printStackTrace(); } finally { in.close(); requestSocket.close(); }
}
void sendMessage(String msg) {
try {
out.writeObject(msg);
out.flush();
System.out.println("client: " + msg);} catch (IOException ioException) { ioException.printStackTrace(); }
}
public static void main(String args[]) throws IOException {
Requester client = new Requester();
client.run();
}
}f anyone could help me to communicate with the finger print device I will be grateful.
http://techgurulab.com/course/java-tutorials/[^] This is basic conceptual link to help with your query you can just try it.