Serial port programming

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
If I try to set com port to baud rate higher than 115200pbs using
SetCommState() API, it returns with an error. The error code is 87 which
means INVALID_PARAMETER. I tried using 128000 bps and 256000 bps. These rates
are valid in deed.

If you can, please let me know what I should do?

-- Badsha
 
Hi badsha!
If I try to set com port to baud rate higher than 115200pbs using
SetCommState() API, it returns with an error. The error code is 87 which
means INVALID_PARAMETER. I tried using 128000 bps and 256000 bps. These rates
are valid in deed.

If you can, please let me know what I should do?

The valid baud-rates depends on the serial-port-driver.
If the driver does not support these baud-rates you can either install a
different hardware/driver or you can do nothing (of couse you could
write your own driver)

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Jochen,
Thanks for your reply. You are right. I don't see this error when I ran my
code in another computer that uses serial over USB port. It supports higher
rate.
-- badsha
 
Back
Top