473,396 Members | 2,020 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,396 software developers and data experts.

Serialport question

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
3 1770
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: DraguVaso | last post by:
Hi, I'm experimenting with the Serial Port in VB.NET 2005. Although it isn't that easy to get any feedback from my COM-port as I thought it would be... How can I read all the Data that the...
0
by: Joshua Moore | last post by:
I'm trying to convert from a lot of invoked code to c# 2.0 SerialPort code. I can't find a way to set fOutxCtsFlow to true (maybe CTSEnable?) and fRtsControl = RTS_CONTROL_HANDSHAKE (RtsEnable?). ...
13
by: Jean Paul Mertens | last post by:
Hello, Someone can tell me why I dont get serial port events in a Service, I created a separate Thread to open the port but no events are coming up (the same happens when I use the timer...
0
by: ricolee99 | last post by:
Hi Everyone, I'm using the System.IO.Ports.SerialPort component to attempt to kill an existing component opened by another application. I use the following code: SerialPort serialPort = new...
2
by: Jay | last post by:
Extracted from the C# example in http://msdn2.microsoft.com/en-us/library/s14dyf47.aspx... public static void Main() { string name; string message; StringComparer stringComparer =...
3
by: Adriano | last post by:
Hello, I'm developing an application in VB.NET 2005 that communicates with a device through RS232, and need to send the following sequence of hexadecimal data to the device: 0xFF, 0x01, 0xC3,...
2
by: egress | last post by:
Forgive me for stupid questions for I am new to serial IO programming. I am developing an app that will need to communicate with a device via RS232 protocol using a standard 9 pin serial cable. ...
6
by: Keith Lee | last post by:
All: I am attempting to compile the perl module Device::SerialPort and get this error during make -- Manifying blib/man3/Device::SerialPort.3pm Can't open blib/man3/Device::SerialPort.3pm for...
10
by: sklett | last post by:
I'm trying to send some printer commands (ZPLII) to an attached USB printer using the SerialPort component. I didn't get very far at all. In fact I haven't gotten anywhere. The first problem I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.