Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2005

Tip: Looking for answers? Try searching our database.

SerialPort and hardware flow control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Etienne Fortin - 20 Jul 2005 16:24 GMT
After some tests with a serial connection and the SerialPort class, I found
out that in hardware flow control, you have to manually stop sending data
when the CTS ligne goes low. I made some test and the SerialPort class
doesn't seem to react to the CTS signal. If you tell to send 1000 bytes, it
will send them no matter what the CTS level is.

The only way I found to make all this works is by waiting for
SerialPort.CtsHolding to become true and then send a single byte. And so on
and so forth until the complete buffer is sent. I also found out that the
Handshaking enumeration have a RequestToSend member but no "Hardware". So it
really seems that the SerialPort class only handle automatically the RTS line
and not the CTS line.

Am I right or is there a way to tell the SerialPort class to handle the CTS
signal, ie stop sending the bytes in the buffer momentarily until the CTS
line is up?

Etienne Fortin
Dick Grier - 21 Jul 2005 00:47 GMT
Hi,

What serial port class?  Is this System.IO.Ports in VS 2005?  If so, this
may be a bug and perhaps it should be reported via beta feedback.  I am
assuming here that you have enabled hardware flow control?  If not... Then
what you are seeing is the expected operation.  Certainly, no serial class
should assume that you want to use HW flow control, you actually have to
enable its use.

If some other class, perhaps you need to notify the person who wrote that
class? (same caveat as above).

Dick

Signature

Richard Grier  (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2  (391 pages) published July 2004.  See
www.mabry.com/vbpgser4 to order.

Etienne Fortin - 21 Jul 2005 13:22 GMT
I'M SO DAMN STUPID!!!!!!!

I looked-up how to change handshaking in the doc. I knew exactly the option
to set. I assumed I did it. But I wasn't!!! It wasn't set at all!!! I should
have looked at that possibility right at the begining. Can you imagine
something more pathetic from a programmer? :)

Anyway, now it works perfectly.

Thanks for pointing the obvious thing I should have checked before.

Etienne

> Hi,
>
[quoted text clipped - 9 lines]
>
> Dick
Dick Grier - 21 Jul 2005 15:49 GMT
Good to hear that it was simple to solve.

Dick

Signature

Richard Grier  (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2  (391 pages) published July 2004.  See
www.mabry.com/vbpgser4 to order.

EB - 17 Aug 2005 23:28 GMT
So where did you enable the handshaking?...I think I am doing the exact same
stupid thing as you!!!!!!
Signature

EB

> I'M SO DAMN STUPID!!!!!!!
>
[quoted text clipped - 22 lines]
> >
> > Dick

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.