Serial port returning random errors on Wyse client

3

0

We are testing a newer Wyse client (Z90D7 model) that has a serial port connection to a PC. We have an external customer that uses a dedicated piece of equipment, however the PC is what we use for testing. We run a C# application on the clients via Citrix. When we run the application that we are using on our old Wyse equipment, everything runs fine with no errors. However, on the new equipment, the serial port works about once every 10 attempts. All of the other times, it will give me either an Overrun error, a Parity error, or an RXOver error.

I have verified through logging that the port does open and several commands execute after it opens. However, the random errors happen before any actual data can even be transmitted. I've read in numerous places that this could be a buffer issue, however I have not seen any posts mentioning errors happening before data is received so I'm not entirely sure.

I have also tried to use handshaking and larger read/write buffers with no luck. I have tried a new cable and the 2nd COM port on this device, no luck either. Our default settings are:

9600 baud, even parity, 8 data bits, 1 stop bit

Given that this is running on Citrix, we also have to run the net use commands shown here before anything is done. Not doing so will result in the serial connection always saying it's connected and not receiving any data (this happens on the old equipment as well). The exact command we're executing (with the app name changed, of course) is:

net use com1 /DELETE
net use com2 /DELETE
net use com1: \\client\com1:
net use com2: \\client\com2:
start /d "D:\myapp" MyApplication.exe

Has anyone who has dealt with serial ports ever heard of these three errors alternating like this? Is there anything other than a faulty port (or two faulty ports, rather) that could cause this? I'm thinking that the hardware buffer size could be the issue, but can't find any way to overcome this.

Big EMPin

Posted 2018-04-06T18:37:54.953

Reputation: 118

1All the errors seem to say that data is not moving, and in both directions. RXOver is not emptying the receive buffer quick enough. Overrun is the serial port driver not emptying the chip send buffer fast enough. I'm not sure that there exists a way to increase the hardware buffer size. The Windows buffer can be increased via the API, but the driver may ignore it. I would try more equipment to get a better perspective on the problem, maybe some compatibility issue, but I have no direct experience with serial ports. – harrymc – 2018-04-10T19:55:32.763

Answers

1

All the errors seem to say that data is not moving, and in both directions.

RXOver is not emptying the receive buffer quick enough. Overrun is the serial port driver not emptying the chip send buffer fast enough.

I'm not sure that there exists a way to increase the hardware buffer size. The Windows buffer can be increased via the API, but the driver may ignore it.

I suggest trying more equipment to get a better perspective on the problem, maybe some compatibility issue with your test computer.

The article 5 Common Serial Port Problems lists some possible reasons for such problems :

  • Incorrect Communication Parameters
    Both devices need to be set up with the same communication parameters, which includes baud rate, parity, number of data bits, and number of stop bits.

  • Incorrect Serial Cable

  • Bad Serial Cables
  • Faulty Wiring

harrymc

Posted 2018-04-06T18:37:54.953

Reputation: 306 093

Before I posted this, my initial assumption was that there are incorrect parameters. On my default parameters of 9600-E-8-1 and no handshaking, I had ~25% success. I tried all possible combinations of the default parameters the Wyse device would allow, and the best config of 1200-E-8-1 with handshaking still only works ~75% of the time. If I manually try to set the baud rate lower than 1200, it stops working. Although I couldn't find a working set of parameters, your information was at least helpful. Therefore, I awarded you the bounty. Thanks for your help. Time to try different equipment. – Big EMPin – 2018-04-17T17:05:13.243