java program read serial port data unstable at linux

Discussion in 'Java' started by Raine Wang, Nov 2, 2004.

  1. Raine Wang

    Raine Wang Guest

    Hi,

    My application needs to communicate with one external device at
    windows and linux. At windows, I use the package sun provided and run
    stably. But when the same program( of course, there is different with
    the device's name :) ) runs at linux(Redhat) using RxTx package, it
    always can't get data from port. My program need to send a lot of
    times quest to the device and read the response(data) from the serial
    port after each request. This process will repeat hundred times. But
    the program always can't fully executed. It sometimes will just stay
    at the read sentence and wait for data( I am sure the data should be
    arrived). When will the program blocked at the read sentence is not
    fixed.
    program sometimes is blocked at the first time, sometimes after read
    several times, sometimes no block at all. But my program running at
    windows don't have this kind of problem. :(

    Please give me some ideas. Thanks in advance.

    Raine
     
    Raine Wang, Nov 2, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pom
    Replies:
    2
    Views:
    1,684
    Bas-i
    Jan 31, 2007
  2. serial port communication (linux)

    , Dec 24, 2004, in forum: C Programming
    Replies:
    7
    Views:
    794
    Lawrence Kirby
    Dec 29, 2004
  3. Vivek Menon
    Replies:
    8
    Views:
    3,195
    bogdan
    Dec 6, 2006
  4. Replies:
    2
    Views:
    362
    Victor Bazarov
    May 22, 2006
  5. msalerno
    Replies:
    3
    Views:
    415
    Ilmari Karonen
    Jul 14, 2005
Loading...

Share This Page