Serial port overrun error

S

Sebastian Zenker

I'm using OpenNETCF.IO.Serial.Port to access the serial port (not
Bluetooth).
If the other device (that is connected with the Pocket PC) sends more
than 64 bytes, the CommEventThread-method throws a UART Error:Overrun
error. If the other device sends the data in blocks that are shorter
than 65 bytes and waits a short time between sending two blocks,
everything works fine.

This occurs only on my T-Mobile MDAII device. When I execute the same
program on my IPAQ 2210 the error doesn’t occur.

I also tried different values for rxBufferSize, but it doesn’t help.

Does anyone know that problem?
 
C

Chris Tacke, eMVP

My guess is that the MDAII's UART has a 64-byte buffer and it's driver is
slow to pull data out of the buffer, so when you send > 64-bytes, the buffer
fills and overruns before the driver pulls it back off, so it sees the
overflow and raises the error. Are you also seeing data loss when you get
the overflow?

-Chris
 
S

Sebastian Zenker

Yes, the MDA lost data.

For example:
When the other device sends 2 blocks of 100 byte, the MDA will only
receive 2x64 bytes instead of 2x100 bytes and 2 overrun errors occur.

I also suppose that the driver is to slow. But what can I do?

I just write a small program that only consists of the Port-class and a
small GUI to test it (so that I can be sure that no other thread
of my application will devour the whole cpu time).

Is there maybe a registry setting, to give the driver more cpu time? I
also searched if there is a new firmware-update available, but it's up
to date.

I'm using the serial port with 38400 Baud, so I think that there must be
a possibility to use it. Otherwise it make no sence to have it.

Thank you
Sebastian
 
C

Chris Tacke, eMVP

Use some sort of flow control.

-Chris


Sebastian Zenker said:
Yes, the MDA lost data.

For example:
When the other device sends 2 blocks of 100 byte, the MDA will only
receive 2x64 bytes instead of 2x100 bytes and 2 overrun errors occur.

I also suppose that the driver is to slow. But what can I do?

I just write a small program that only consists of the Port-class and a
small GUI to test it (so that I can be sure that no other thread
of my application will devour the whole cpu time).

Is there maybe a registry setting, to give the driver more cpu time? I
also searched if there is a new firmware-update available, but it's up
to date.

I'm using the serial port with 38400 Baud, so I think that there must be
a possibility to use it. Otherwise it make no sence to have it.

Thank you
Sebastian
 
S

Sebastian Zenker

that is unfortunately not possible, because the other device
is a proprietary telematics device that doesn't support any handshake
method. It only has a RX,TX and GND pin. :-(

Sebastian
 

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