Solved

parity error

Posted on 2000-03-06
4
333 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

910 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now