3 ms·
> UNIX/Linux has a set of constants for speeds left over from the PDP-11 era You are refering to the B9600 (and other) constants set in the termios tcsetattr()
by cnvogel 12y ago
> UNIX/Linux has a set of constants for speeds left over from the PDP-11 era
You are refering to the B9600 (and other) constants set in the termios tcsetattr() syscall. Those are indeed limited to a set of fixed rates between 110 and 115200 baud. But since a very, very, very long time Linux considered B38400 a magic rate, and this baudrates' divisor could, if necessary, be redefined by the setserial command to arbitrary speeds. (Default is 38400, though).
http://linux.die.net/man/8/setserial http://linux.die.net/man/8/setserial
http://www.usconverters.com/downloads/support/aliasing-baud-rates-usb-serial-adapter-linux.pdf http://www.usconverters.com/downloads/support/aliasing-baud-...
I think there are more sane methods for some USB to serial adapters, though.
UPDATE: This seems to be the modern way to do it: http://stackoverflow.com/a/19992472 http://stackoverflow.com/a/19992472 (specify BOTHER and fill out tio.c_ispeed, ospeed.