Ok, I've implemented this in perl, as a one liner:
perl -n -e "while
But, as noted in the source comments, pipes don't perform very well in
windows. I don't even know how to install a pipe for a windows printer.
I guess I can implement it with a state machine in the c source, but I
don't think c has functions like chr and hex.
By the way, thank you all, very much, for all the work that has gone
into writing this software.
[mailto:linux5250-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Monday, November 01, 2010 1:25 PM
To: Linux 5250 Development Project
Subject: Re: [LINUX5250] lp5250 and "bypass code"
On 10/29/2010 12:01 PM, John Chambers wrote:
Does anyone here know what a "bypass code" is? Or how to implement it
on lp5250d for windows?
A "bypass code" is a way to send printer escape codes to a printer
without worrying about them being fouled up by the printer emulation
software (which converts from IBM printer language to the actual printer
language) or the ASCII/EBCDIC translation process.
They used a sequence of &% as a toggle to switch into and out of
'bypass' mode. from there, anything received is in hex. It will be used
to fashion actual bytes to be sent as-is to the printer. So for
example, you might have this:
The leading &% goes into bypass mode. The 09 (two characters) is used
to create a byte containing 0x09, and that's sent to the printer as-is.
Likewise the 0a is converted to 0x0a, and the 0b is converted to 0x0b,
and they are sent to the printer as-is. The &% ends bypass mode, and
things go back to normal until the next &% appears.
Frankly, the whole thing was a kludge. A more proper (and IBM blessed)
solution would be to use Host Print Transform. Or at least use SCS
transparency codes if you _must_ send raw escape sequences to the
I-O Corporation used these bypass codes extensively in their devices....
I have written software that works with lp5250d to emulate the way I-O
Unfortunately, my software is for FreeBSD, not Windows. And I developed
it under contract, and cannot give it away. But it wasn't terribly
difficult to write -- you should be able to write your own.
This is the Linux 5250 Development Project (LINUX5250) mailing list To
post a message email: LINUX5250@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
or email: LINUX5250-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/linux5250