I need to set the serial port /dev/ttyS0 to 250k bit/sec in order to send commands to another device expecting 250k. I am using Python and trying to set the speed with the command
ser=serial.Serial( port='/dev/ttyS0', baudrate=250000, parity ....and so on
This generates an error because the port speed is a non standard unix speed the nearest being 230400 ....which is not close enough.
Note this is not USB. The Rasberry Pi B has the ability to go to this speeds and I have confirmed to myself that it gets to the higher speed ranges with and oscilloscope.
Looks like I need to recompile the kernel. I can do that, but can someone help with which code needs to be modified to get a new non standard uart speed.