Solved

parity error

Posted on 2000-03-06
4
334 Views
Last Modified: 2010-04-21
ON SCO UNIX
I have a hardware device that is sending a byte to the com port with a parity error.   The com port will not let this byte pass through.  I need to somehow ignore this and let the data pass through to my application.

HOW CAN I DO THIS?

Thanks
0
Comment
Question by:pentomino
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:tfewster
ID: 2588266
IMO, the parity settings for the device and com port should match, or you risk
your data being garbaged. However, you can have the device issue a "stty ignpar"
command to override this.
0
 
LVL 1

Author Comment

by:pentomino
ID: 2588407
tfewster

Thanks

I tried that.. from the command mode before the application was started.  It did not help. We are also tryiing to do the same thing via code.  A line monitor
between the com port and the hardware device shows
the parity error and the byte does not get to the application.  I realize that this may cause garbage but until we get a hardware fix, we need something to
allow the data to be recieved.

Any other ideas?
0
 
LVL 20

Accepted Solution

by:
tfewster earned 100 total points
ID: 2589241
I take it by "hardware device" you mean something like a specialised computer system with a terminal emulator that can communicate via a serial port.

I found a few references on SCO's web site relating to comms. parity problems: They vary depending on the O/S version! If you haven't done so already, have a look at:
http://www.sco.com/cgi-bin/ssl_reference?107162
http://www.sco.com/cgi-bin/ssl_reference?106673
http://www.sco.com/cgi-bin/ssl_reference?107594
to see if your O/S is mentioned. Even if it isn't, they contain useful generic tips on fixing serial settings problems.

Using "stty ignpar" should stop the com port from recalculating a 7-bit bytes parity bit for verification. However, it may not be sufficient to do this once communication has started and you may need to reconfigure the port.

The alternative is that the device uses 8-bit words. If your line monitor is set up the same as the com port, it would confirm the "error" on the parity check. AFAIK the 8th bit in an 8-bit word is used for extended characters, so the problem would not show up until you tried to send one of them.

You need to double check what comms. parameters the device has set. If this is not possible, try setting the com port up for 8 bits/no parity or 7/space. To double check the com port, try connecting a dumb terminal or PC with HyperTerminal (where you CAN vary the serial port settings).

If this doesn't get you any further, can you tell us:
- The nature of the hardware device
- What comms. settings the terminal emulator has (plus other options)
- What SCO version you are running
- the output of stty -a when run from the terminal emulator

Hope this helps,
Tim

0
 
LVL 1

Author Comment

by:pentomino
ID: 2597474
Thanks

It is still failing.  The external device is a tineclock where employees swipe a card through to "punch" in and out.

We have decided to update the e-prom that has been causing the problem
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Shell script errors 10 134
UNiX Script filesystem space usage 19 74
help pulling data string using Awk 9 71
Unix Script: Loop over all days of a month 17 99
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question