473,320 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Serial port programming

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
Nov 17 '05 #1
2 1898
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/
Nov 17 '05 #2
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

"Jochen Kalmbach [MVP]" wrote:
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/

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sarah | last post by:
hI, I have a project. I need to realise serial communication between PC and Altera FPGA in c or c++. The function of FPGA is working well. it can send data to uart. Does anybody know how to...
4
by: dalewz | last post by:
Hi, Could sb kindly answer my following questions: Plan: I am trying to find a language to build a GUI to communicate with our device via serial port. Questions: 1. which language (VC++...
3
by: rusttree | last post by:
Many moons ago, I took a class in embedded control at school. The course focused on a micro-controller mounted on a small electric car that was programmed using simple C code. The...
3
by: collinm | last post by:
hi i send a command to a led display, the led display is suppose to return me some character i write a string on a serial port void ledDisplayExist() { char msg={'\0', '\0', '\0', '\0',...
2
by: bernatik | last post by:
hi all I am trying to control special device through serial port from Linux. For that purpose I need to control DTR signal. I am watching the signal on a oscilloscope, so I know exactly what is...
0
by: Tom | last post by:
I am new to hardware programming. I need to write a program for reading data from Card Reader which connects to the PC windows 2000/XP OS through Interfacing The Serial / RS-232 Port / USB /...
13
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
5
by: Fiesta | last post by:
Hi All, I am working on a project regarding the serial COM port. I have to design my own protocol for the serial communication. In the protocol there are some bits for Read/Write, address(bank,...
38
by: shussai2 | last post by:
Hi, I am trying to access Serial Port in XP. I am using Dev-C++ IDE that uses Mingw as a compiler. I just want to know how I can open up serial port on COM1 and write some data. I have searched...
13
by: Rob | last post by:
Hi all, I am fairly new to python, but not programming and embedded. I am having an issue which I believe is related to the hardware, triggered by the software read I am doing in pySerial. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.