Weird problem using SerialPort

  • Thread starter Thread starter Padu
  • Start date Start date
P

Padu

I create a System.IO.Ports.SerialPort object and start communicating with a
device (a pocket pc in my case). Everything works perfectly if I don't call
"Write" successively.

For example the following code:

//it doesn't matter if \r\n is used or not,
//the problem is the same
sp.Write("01\r\n");
sp.Write("0123\r\n");
sp.Write("01234567\r\n");
sp.Write("0123456789\r\n");

If I'm debugging the application and I step through each line, all sequences
are sent and properly displayed on my receiving device. If I run the
application, only the first string "01" is sent.

Is it possible that the problem is in the receiver device?

Except for comport and baudrate, all properties are default.

Cheers

Padu
 
"Padu"
Is it possible that the problem is in the receiver device?


Not only it is possible but that's what actually happened. I've installed a
decent serial terminal program on my pocket and my application is working
fine.
Unless you have any hints on the receiver side (I created the pocket pc app
using compactframework), please disregard this post.

Cheers

Padu
 

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

Back
Top