cbrake / linux-serial-test

Linux Serial Test Application
302 stars 154 forks source link

PL2303HXD issues with high baud rates #22

Open swiftgeek opened 5 years ago

swiftgeek commented 5 years ago

6000000 and 12000000 baud rates have issues with linux-serial-test, but work fine in tio/picocom.

Lower ones work fine in linux-serial-test

linux-serial-test -b 6000000 -p /dev/ttyUSB0 -s -e
Linux serial test app
NOTE: non standard baud rate, trying custom divisor
zsh: floating point exception (core dumped)
linux-serial-te[631304] trap divide error ip:556b5c37a677 sp:7fffab836d80 error:0 in linux-serial-test[556b5c37a000+2000]
andy-shev commented 5 years ago

Seems duplicate of #17.

cbrake commented 5 years ago

does anyone happen to know what API the tio/picocom apps use? Might be able to learn something there.

@swiftgeek what platform are you testing on?

swiftgeek commented 5 years ago

Archlinux with 5.3.x kernel

And BOTHER search on picocom repo returns https://github.com/npat-efault/picocom/blob/master/termios2.txt so I guess it's using that.

From tio changelog It looks like it uses termios2 as well, but only for nonstandard baud rates

cbrake commented 5 years ago

Looking at the code a bit:

Seems we can do something like the tio project to conditionally use the new API.