?
Solved

parity error

Posted on 2000-03-06
4
Medium Priority
?
346 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 21

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 21

Accepted Solution

by:
tfewster earned 400 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

862 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