Fazecast / jSerialComm

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

Usb serial controller vs motherboard controller #522

Closed AmbroiseS closed 1 year ago

AmbroiseS commented 1 year ago

Hello,

I am doing modbus request based on jserialComm.

I notice performance issues when using the physical port /dev/ttyS2. I get expected performance when using /dev/ttyUSB0 (same performance as on windows). To be more explicit: I am sending 2 requests quickly and I get a 1 second delay between first request starting and second request starting, it seems to be blocking. On USB controller, the delay is very low maybe 1ms.

Is there anything that could explain this performance issue? Are there parameters I can try to play with ?

Thanks for any help,

Environment:

result of stty -F /dev/ttys2 speed 57600 baud; line = 0; min = 0; time = 5; -brkint -icrnl -imaxbel -opost -isig -icanon -iexten -echo

result of stty -F /dev/ttyUSB0 speed 57600 baud; line = 0; min = 0; time = 5; -brkint -icrnl -imaxbel -opost -isig -icanon -iexten -echo