By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,356 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,356 IT Pros & Developers. It's quick & easy.

Serialport question

P: n/a
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
Feb 18 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
"Eric" <so*****@MicroZoft.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
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

Feb 18 '06 #2

P: n/a
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. ;-)

"<ctacke/>" <ctacke_AT_OpenNETCF_com> schreef in bericht
news:uw*************@tk2msftngp13.phx.gbl...
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
"Eric" <so*****@MicroZoft.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
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


Feb 20 '06 #3

P: n/a
forget this, please....found out hte 'hang' was caused somewhere else...
"Eric" <so*****@MicroZoft.com> schreef in bericht
news:43**********************@text.nova.planet.nl. ..
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. ;-)

"<ctacke/>" <ctacke_AT_OpenNETCF_com> schreef in bericht
news:uw*************@tk2msftngp13.phx.gbl...
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
"Eric" <so*****@MicroZoft.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
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



Feb 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.