PL2303HXD issues with high baud rates
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]
Seems duplicate of #17.
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?
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
Looking at the code a bit:
- https://github.com/npat-efault/picocom/blob/master/termios2.c#L159
- https://github.com/tio/tio/blob/master/src/setspeed2.c#L26
- https://github.com/tio/tio/blob/master/src/setspeed2.c#L26
- https://github.com/tio/tio/blob/master/src/tty.c#L609
- https://github.com/tio/tio/blob/master/configure.ac#L88
Seems we can do something like the tio project to conditionally use the new API.