Skip to content

SerialPort.bytesAvailable() not working on a physical PCIe card port #626

@sanwar0asu0edu

Description

@sanwar0asu0edu

Hello,

I have a StarTech 2-Port Serial PCIe card (2S232422485-PC-CARD). The two ports on it are tied together using a crossover cable. The setup works in Putty (terminal emulator), I can see data typed on one port appear on the other.

When I replace one end with Java code based on example available on jSerialComm website, the SerialPort.bytesAvailable() never becomes greater than zero, but if I explicitly call SerialPort.readBytes(), I can read the data that was sent.

Test.java

ode attached, output below:
setParameters: true
setFlowControl: true
openPort: true
bytesAvailable: 0
bytesAvailable: 0
bytesAvailable: 0
bytesAvailable: 0
bytesAvailable: 0
bytesAvailable: 0
bytesAvailable: 0
bytesAvailable: 0
bytesAvailable: 0
bytesAvailable: 0
bytesAvailable: 0
8 bytesRead: vvvvvvvv
closePort: true

Any suggestions would be appreciated.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions