Serialport question

E

Eric

Hi,

In my application for PDA I use the serialport class to send data to a
navigation computer of VDO Dayton.
Everything works fine as long as it is connected to the nav-computer.
When the nav-computer is not connected to the PDA, the program hangs.
No exceptionerrors, no serialports error events, nothing.

Even if I set the WriteTimeOut property to 500, I still don't get any
messages.
I noticed that the serialport is always opened.
So the IsOpen property is always true, even is nothing is connected to the
com port.

Is there a way to test wheather something is connected to the com port?
Why is the WriteTimeOut not causing anything?

I'm using VS2005.

Please help.

rg,
Eric
 
G

Guest

Does teh device do any hardware handshaking? There's really no standard way
to know something is there - the port will (and should) open whether or not
something is connected. The timeout should, however, work. Try setting it
to -1 just to see what happens.

-Chris
 
E

Eric

Hi Chris,

I've tried it with setting the timeout to -1 but nothing happens.
The PDA (ppc2003) is frozen and I need to soft reset it to get it working
again.

I've got the ErrorRecieved event in my code, it should show a messagebox
when it is hit but it never is.

How long will the Write method keep trying to send one byte, is this based
on the WriteTimeOut setting?
Since the WriteTimeOut doesn't seem to work, when will the serialport stop
sending the first byte and go on to the next one or just stop?

rg,
Eric


P.s. Although addressed to mr. Chris Tacke, anyone is welkom to help. ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top