Code snipset for 'waiting on Comx (RS232) line change' ? - OS2

This is a discussion on Code snipset for 'waiting on Comx (RS232) line change' ? - OS2 ; Any c or rexx code for waiting on a status line change on RS232 (com) available? I need to check a change on maybe RI or RTS. Do I have dig through the toolkit or does someone have such code ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Code snipset for 'waiting on Comx (RS232) line change' ?

  1. Code snipset for 'waiting on Comx (RS232) line change' ?

    Any c or rexx code for waiting on a status line change on RS232 (com) available?

    I need to check a change on maybe RI or RTS. Do I have dig through the toolkit
    or does someone have such code snippset?

    regards,
    Andi

  2. Re: Code snipset for 'waiting on Comx (RS232) line change' ?

    Andi B. schrieb:
    > Any c or rexx code for waiting on a status line change on RS232 (com)
    > available?
    >
    > I need to check a change on maybe RI or RTS. Do I have dig through the
    > toolkit or does someone have such code snippset?
    >
    > regards,
    > Andi


    DosDevIOCTL: category: IOCTL_ASYNC

    function ASYNC_GETMODEMOUTPUT: to check RTS
    function ASYNC_GETMODEMINPUT: to check RI

    you have to check for the toggling of the bits. Basically these
    DosDevIOCTLs allow you to have a look at the RS232 H/W registers.
    But RTS is not an input register. It is something you would set (Request
    to Send). If you want to monitor another application making use of the
    COM interface, you will need to open the COM driver in shared mode
    hoping that the other application will also do that.


    Lars

  3. Re: Code snipset for 'waiting on Comx (RS232) line change' ?

    Lars Erdmann schrieb:
    > Andi B. schrieb:
    >> Any c or rexx code for waiting on a status line change on RS232 (com)
    >> available?
    >>
    >> I need to check a change on maybe RI or RTS. Do I have dig through the
    >> toolkit or does someone have such code snippset?
    >>
    >> regards,
    >> Andi

    >
    > DosDevIOCTL: category: IOCTL_ASYNC
    >
    > function ASYNC_GETMODEMOUTPUT: to check RTS
    > function ASYNC_GETMODEMINPUT: to check RI
    >
    > you have to check for the toggling of the bits. Basically these
    > DosDevIOCTLs allow you to have a look at the RS232 H/W registers.
    > But RTS is not an input register. It is something you would set (Request
    > to Send). If you want to monitor another application making use of the
    > COM interface, you will need to open the COM driver in shared mode
    > hoping that the other application will also do that.
    >
    >
    > Lars

    Thanks Lars. I've played around with a serial library package named 'bloatcom' a
    few years ago and with your pointers I got it to work quite easily. Searching
    for the right words cp2.inf pops up and it was done in minutes.
    Andi

    P.S. Of course your right regarding RTS. I always confuse it with Clear to send.
    And thanks for the hint about sharing...

+ Reply to Thread