2

Possible Duplicate:
Change SerialPort's BaudRate while connection is open

I know how to open, close, and set up the baud rate for the port, etc, but while the port is still open I want to change the baud rate from 9600 to 115200.

I Googled it and it said that it could be done by issuing the command to set the port baud rate (e.g. serialport.baurate = 115200). However, it did not work consistently for me and I wondered if I missed something.

Could someone illustrate the proper way to accomplish this? Thanks!

Community
  • 1
  • 1
  • 1
    Getting the device on the other end of the wire to switch the baudrate at the same time takes a miracle or two. At the very least you'll have to wait until BytesToWrite drops to 0 and add 16 * 10 / baudrate seconds to ensure the fifo is flushed. – Hans Passant Jan 13 '12 at 15:40
  • M.Babcock, it treats the same issue, yet the "accepted" reply on the one you link does not shed any light. How can I say it... is very unhelpful (no offense intended). –  Jan 13 '12 at 15:50
  • The most appropriate answer was not selected as *the answer* to that question. See [Groo's response](http://stackoverflow.com/a/5814866/635634) which is effectively the same as Hans' comment above. – M.Babcock Jan 13 '12 at 15:53
  • can you please see my [question](https://stackoverflow.com/q/64203396/6854117) related to it? – Moeez Oct 05 '20 at 06:46

0 Answers0