Timeout support for RXTX OutputStream.write()

Discussion in 'Java' started by Ralph Lecher, Nov 30, 2009.

  1. Ralph Lecher

    Ralph Lecher Guest

    Hi!

    With the RXTX Comm API is there a way to avoid OutputStream.write()
    blocking the application if the targeted serial device doesn't take
    over the offered data. I only found SerialPort.enableReceiveTimeout(),
    which I hope prevents at least InputStream.read() from heading towards
    Nirvana.

    TIA

    Ralph
     
    Ralph Lecher, Nov 30, 2009
    #1
    1. Advertising

  2. Ralph Lecher wrote:
    > Hi!
    >
    > With the RXTX Comm API is there a way to avoid OutputStream.write()
    > blocking the application if the targeted serial device doesn't take
    > over the offered data. I only found SerialPort.enableReceiveTimeout(),
    > which I hope prevents at least InputStream.read() from heading towards
    > Nirvana.
    >
    > TIA
    >
    > Ralph


    It shouldn't block which just shows that RXTX has numerous bugs. Use
    Sun's JavaComm API. They support the Linux version and the Windows
    version still works fine (at least on XP). Your only other option is to
    buffer it.

    --

    Knute Johnson
    email s/nospam/knute2009/

    --
    Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
    ------->>>>>>http://www.NewsDemon.com<<<<<<------
    Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
     
    Knute Johnson, Nov 30, 2009
    #2
    1. Advertising

  3. In article <4b1405d5$0$3022$>,
    Knute Johnson <> wrote:

    > Ralph Lecher wrote:


    > > With the RXTX Comm API is there a way to avoid OutputStream.write()
    > > blocking the application if the targeted serial device doesn't take
    > > over the offered data. I only found SerialPort.
    > > enableReceiveTimeout(), which I hope prevents at least
    > > InputStream.read() from heading towards Nirvana.


    The ADTPro project does exactly that:

    <https://sourceforge.net/projects/adtpro/>

    If you're stuck with RXTX, you might like to look at the project's
    transport layer, which uses RXTX for serial I/O:

    <http://adtpro.cvs.sourceforge.net/viewvc/adtpro/adtpro/org/adtpro/transport/>

    > It shouldn't block which just shows that RXTX has numerous bugs. Use
    > Sun's JavaComm API. They support the Linux version and the Windows
    > version still works fine (at least on XP). Your only other option is
    > to buffer it.


    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, Nov 30, 2009
    #3
    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. Alex Bitkiller

    Java rxtx libs

    Alex Bitkiller, Feb 17, 2004, in forum: Java
    Replies:
    2
    Views:
    4,294
    Alex Bitkiller
    Feb 18, 2004
  2. bimbo

    rxtx 2.1.6

    bimbo, Apr 8, 2004, in forum: Java
    Replies:
    0
    Views:
    756
    bimbo
    Apr 8, 2004
  3. Brzezi
    Replies:
    0
    Views:
    677
    Brzezi
    Jun 27, 2004
  4. Nanou

    URGENT RXTX SERIAL PORT

    Nanou, May 31, 2005, in forum: Java
    Replies:
    0
    Views:
    445
    Nanou
    May 31, 2005
  5. Replies:
    2
    Views:
    3,616
Loading...

Share This Page