Results 1 to 3 of 3
  1. #1
    santa's Avatar
    santa is offline Senior Member
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    208
    Rep Power
    6

    Default RXTX / JAVA Communications question =P

    Hi =) I was creating a program that is working with comports ... but if i call the CommPortIdentifier.getPortIdentifiers(); method in the RXTX or Communications packages then it takes 31 sec to identify my ports ... whyyyyyyy ? =P and can i speed this up? Thank you =)

  2. #2
    Z.K. is offline Member
    Join Date
    Apr 2011
    Posts
    10
    Rep Power
    0

    Default

    Quote Originally Posted by santa View Post
    Hi =) I was creating a program that is working with comports ... but if i call the CommPortIdentifier.getPortIdentifiers(); method in the RXTX or Communications packages then it takes 31 sec to identify my ports ... whyyyyyyy ? =P and can i speed this up? Thank you =)
    It should not take that long. It only takes a couple of seconds for me. Try testing it with a loopback DB9 connector or a USB to RS232 adapter in a loopback configuration. Also, try posting the code so someone can help you. I am struggling with a serial program myself though.

  3. #3
    santa's Avatar
    santa is offline Senior Member
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    208
    Rep Power
    6

    Default

    Java Code:
           double timebefore = System.currentTimeMillis()/ 1000;
        com = CommPortIdentifier.getPortIdentifiers();
    
        double timeafter = System.currentTimeMillis() / 1000;
        double time = timeafter -timebefore ;
        System.out.println(time);
    For me the time will be 31 sec =(

Similar Threads

  1. RXTX Library install on Ubuntu 10.04
    By Z.K. in forum New To Java
    Replies: 0
    Last Post: 05-02-2011, 12:22 AM
  2. ERROR: Communications link failure [help]
    By APRENTI in forum Advanced Java
    Replies: 15
    Last Post: 02-24-2011, 08:24 PM
  3. Rxtx
    By Jcbconway in forum New To Java
    Replies: 0
    Last Post: 12-13-2010, 11:40 PM
  4. SQLException: Communications link failure
    By etherkye in forum JDBC
    Replies: 0
    Last Post: 07-03-2009, 05:20 PM
  5. Thread communications!
    By rameshraj in forum Threads and Synchronization
    Replies: 7
    Last Post: 05-11-2008, 01:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •