Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. Handling Biometric Fingerprint Attendance Machine

Handling Biometric Fingerprint Attendance Machine

Scheduled Pinned Locked Moved Java
csharpjavasysadminhelpquestion
11 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Maheera Jazi

    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.

    P Offline
    P Offline
    Peter_in_2780
    wrote on last edited by
    #2

    Please refer to point 9 of the forum guidelines above.

    Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

    M 1 Reply Last reply
    0
    • P Peter_in_2780

      Please refer to point 9 of the forum guidelines above.

      Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

      M Offline
      M Offline
      Maheera Jazi
      wrote on last edited by
      #3

      see update please!

      1 Reply Last reply
      0
      • M Maheera Jazi

        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.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #4

        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?

        M 1 Reply Last reply
        0
        • L Lost User

          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?

          M Offline
          M Offline
          Maheera Jazi
          wrote on last edited by
          #5

          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 :( !!

          L 1 Reply Last reply
          0
          • M Maheera Jazi

            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 :( !!

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #6

            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.

            M 1 Reply Last reply
            0
            • L Lost User

              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.

              M Offline
              M Offline
              Maheera Jazi
              wrote on last edited by
              #7

              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!?

              L 1 Reply Last reply
              0
              • M Maheera Jazi

                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!?

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #8

                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.

                M 1 Reply Last reply
                0
                • L Lost User

                  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.

                  M Offline
                  M Offline
                  Maheera Jazi
                  wrote on last edited by
                  #9

                  ok, thanks! although this is not mentioned on the device documentation! I will try all roads!

                  L 1 Reply Last reply
                  0
                  • M Maheera Jazi

                    ok, thanks! although this is not mentioned on the device documentation! I will try all roads!

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #10

                    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.

                    1 Reply Last reply
                    0
                    • M Maheera Jazi

                      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.

                      R Offline
                      R Offline
                      Raushank03
                      wrote on last edited by
                      #11

                      http://techgurulab.com/course/java-tutorials/[^] This is basic conceptual link to help with your query you can just try it.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups