On Fri, 19 Sep 2003, Angie Saxton wrote: > Date: Fri, 19 Sep 2003 10:28:28 +0100 > From: Angie Saxton <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: LPRng: serial port blues - solution > > Dear All, > > We may have found a solution (not flow control)... It does appear to be a > timing issue with closing the port. One of the chaps in the office > suggested a sleep command, and I have one in the "if" filter now prior to > the :cl: evaluation. This has allowed me to print the larger test file. If > this sorts the problem I will post again to confirm. >
That reminds me: On some unix systems, when you close a serial port all the settings revert back to defaylt including the bit rate, also while there are bytes to be transmitted. These pending bytes will then be sent with a wrong bit rate which will be discarded by the printer or result in a framing error. A possible soluting I've seen is to have a small program open the serial printer port and then keep it open for ever. Thus the serial port will never see the final close and the settings won't be reset. A sleep before close will do thesame if you sleep long enough. Also consider using tcsetattr with TCSADRAIN, which supposedly will block until all pending output has been sent. Villy ----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST The address you post from MUST be your subscription address If you need help, send email to [EMAIL PROTECTED] (or lprng-requests or lprng-digest-requests) with the word 'help' in the body. For the impatient, to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] with: | example: subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] If you have major problems, send email to [EMAIL PROTECTED] with the word LPRNGLIST in the SUBJECT line. -----------------------------------------------------------------------------
