Fazecast / jSerialComm

Platform-independent serial port access for Java
GNU Lesser General Public License v3.0
1.35k stars 287 forks source link

Reading and setting pin signals. #254

Closed HannesBulk closed 5 years ago

HannesBulk commented 5 years ago

with JSerialComm you can read the CTS, DSR and DCD input pins of na serial device. However, in the documentation i cannot see anything about reading the RI (Ring Indicator) signal.

The TX pin can be used to transmit data. By setting or clearing the BREAK state you manipulate the TX pin. (carefully, don't do this when sending data) However you cannot read the level of the RX pin.

currently implemented : getDSR(), getCTS() and getDCD() my wish is to implement getRI() for the Ring Indicator Signal and getRX() to get the actual value of this pin.

hedgecrw commented 5 years ago

I've actually already implemented getRI() - it's currently checked in and will be released as part of the next major release which I expect to happen later this week or next week. There is no way to implement getRX() since the operating systems themselves do not provide a direct way to poll this line.

HannesBulk commented 5 years ago

That will do, with these lines i can do BitBang operations. Will the patch you made for the setDTR() end setRTS() also be inplemented in this new release ? Good work, Thx, HannesB

hedgecrw commented 5 years ago

Fixed - this is present in current jSerialComm release v2.5.3.