When setting baud rate of an open serial port, how long shall we wait before baud rate actually changes? I guess this depends on the driver of the port, right? (especially if it's not a real serial port).
In this case, is there any way to get an event or to query serial port to see it's actual baud rate?
I have seen so many dirty codes that set baud rate and sleep for a few seconds before continuing the job and this delay is actually random and sometimes doesn't work on some systems(Cause maybe driver needs more time on that system?!).
In some cases things are even worse, the device connected to serial port has a timeout that if the delay is too long then session fails altogether!
Is there any 'standard' way of changing port properties (like 'baud rate')?