A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » General Hardware & Peripherals » Printers
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Send ESC sequences to printer attached to terminal



 
 
Thread Tools Display Modes
  #1  
Old February 16th 04, 05:01 PM
Richard S. Shuford
external usenet poster
 
Posts: n/a
Default

Igor Bujna kocour_easy*post.cz wrote:
|
| I have Oki 3390 printer attached to terminal "Dario 10-vgb10".
| I want send ESC-sequences to printer for bar-codes printing.
| I found out that i can use "mc5p" sequences for printing some bytes
| to given printer. I don't find this sequences on my linux system.
|
| When I write to printer given ESC-sequences for printing bar-codes
| via "Open printer sequence-mc5" and "Close printer sequence-mc4"
| data didn't reach printer in right format. It prints only bar-code
| numbers instead of bar-code+bar-code numbers.

Igor:

I think you must mean a "Dorio" terminal, not "Dario". The Dorio
brand was first applied in 1993 by Digital Equipment Corporation to
Value-Added Reseller versions of its VT510 character-cell terminal.
A few years later, DEC sold off its entire video-terminal business
to Boundless Technologies. The characteristics of the Dorio VGB-10
are still noted on the Boundless anonymous-FTP site:

ftp://ftp.boundless.com/pub/text/dec/specs/dor10.txt

Now, as to your programming problem. Think of this proverb:

"There are more modes of failure than modes of success."

Lots of things could be going wrong. The technology you want is
spread out through operating-system libraries, OS databases, your
application software, the firmware of the Dorio terminal, and the
firmware and setup of the attached printer.

I have no experience with the particular Oki printer model (3390) you
say you have. However, to produce bar codes, many printer types
use a special bar-code font, with a separate font for each different
type of bar code (UPC-A, Code-39, etc.) You should read the technical
documentation for this Oki 3390 printer to find out what it needs.
You might need to have your application software explicitly download
a barcode font to the printer before beginning other operations.

[brief pause for web search]

I found the following web page about an Oki Microline 3391 printer,
which is probably a successor to the 3390...

http://www.shopoki.co.uk/datasheet/ml3391_spec.htm

...and the page describes a 24-pin dot-matrix unit equipped with a
number of built-in barcode fonts (Code 39, UPC-A, UPC-E, EAN 8, EAN 13,
Interleaved 2 of 5, ZIP, and Code 128). So, if the 3390 also had these,
perhaps the solution involves invoking the proper font before sending
the digits. (And switching the font back afterwards.) Here again, you
must read the documentation to find out what is required.

As to the precise issues you mention above: the "mc5p" capability is
the "terminfo" way of saying

"turn the printer on, to print a specified number of bytes"

where the number of bytes/octets can be up to 256. (In "termcap"
the "pO" capability is the equivalent.) Typically, such capabilities
are invoked programmatically via library-function calls to "curses"
or "ncurses" entry points.

The Linux Documentation Project provides information on "Terminfo
and Termcap" in several places, among which is:

http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-15.html

You should check to make certain that several things are true:

* that your Dorio terminal actually is able to perform the
"mc5p" function of passing a counted number of bytes to
an attached printer

* that your TERM environment variable is properly set

* that your Linux machine contains a "terminfo" database
entry which corresponds to the TERM variable you are setting
(or has a termcap entry to which the library will fall back)

* that this corresponding terminfo-database entry contains
a functional control sequence that actually causes the
"turn the printer on, to print a specified number of bytes"
functionality to happen

Some "termcap" style advice appearing here...

http://www.delorie.com/gnu/docs/termcap/termcap_43.html

...contains a sentence of some relevance:

Most terminals with printers do not support all of `ps',
`po' and `pO'; any one or two of them may be supported.

The DEC-style terminals with which I am familiar implement only
the non-parameterized capabilities "mc5" and "mc4", like this:

TERMINFO TERMCAP CONTROL
CAPABILITY CAPABILITY SEQUENCE MEANING
---------- ---------- --------- ---------------------------
mc5 po ESC [ 5 i Printer-Controller Mode On
mc4 pf ESC [ 4 i Printer-Controller Mode Off

While it is possible that the Dorio VBG-10 is able to do what
"mc5p" asks it to do, it may not, so you may have to fall back to
using mc5 and mc4. You can check the documentation for the VBG-10
or for whatever equivalent model Boundless is currently supporting.

There is also a possible behavioral surprise lurking in all this:
if the "mc5p" command is properly implemented in the curses library
and in the terminal, it has the following property: while 'mc5p' is
in effect, "all text, including 'mc4', is transparently passed to
the printer." (Which you probably don't want.)

There are numerous other resources about related issues which you
can find, or find pointers to, from web pages I keep at:

http://www.cs.utk.edu/~shuford/terminal_index.html

A wonderfully helpful book on all such topics is this:

"termcap and terminfo"
by John Strang, Linda Mui and Tim O'Reilly
3rd Edition April 1988
270 pages, ISBN: 0-937175-22-6, $29.95 U.S.
http://www.oreilly.com/catalog/term/
http://www.amazon.com/exec/obidos/ISBN=0937175226

...RSS

--
K.L. says to try http://www.celestialseasonings.com/products/herb/r.php
which, however, contains no caffeine.
  #2  
Old February 17th 04, 01:51 AM
Richard S. Shuford
external usenet poster
 
Posts: n/a
Default Send ESC sequences to printer attached to terminal

Igor Bujna kocour_easy*post.cz wrote:
|
| I have Oki 3390 printer attached to terminal "Dario 10-vgb10".
| I want send ESC-sequences to printer for bar-codes printing.
| I found out that i can use "mc5p" sequences for printing some bytes
| to given printer. I don't find this sequences on my linux system.
|
| When I write to printer given ESC-sequences for printing bar-codes
| via "Open printer sequence-mc5" and "Close printer sequence-mc4"
| data didn't reach printer in right format. It prints only bar-code
| numbers instead of bar-code+bar-code numbers.

Igor:

I think you must mean a "Dorio" terminal, not "Dario". The Dorio
brand was first applied in 1993 by Digital Equipment Corporation to
Value-Added Reseller versions of its VT510 character-cell terminal.
A few years later, DEC sold off its entire video-terminal business
to Boundless Technologies. The characteristics of the Dorio VGB-10
are still noted on the Boundless anonymous-FTP site:

ftp://ftp.boundless.com/pub/text/dec/specs/dor10.txt

...and the page describes a 24-pin dot-matrix unit equipped with a
number of built-in barcode fonts (Code 39, UPC-A, UPC-E, EAN 8, EAN 13,
Interleaved 2 of 5, ZIP, and Code 128). So, if the 3390 also had these,
perhaps the solution involves invoking the proper font before sending
the digits. (And switching the font back afterwards.) Here again, you
must read the documentation to find out what is required.

As to the precise issues you mention above: the "mc5p" capability is
the "terminfo" way of saying

"turn the printer on, to print a specified number of bytes"

"turn the printer on, to print a specified number of bytes"

where the number of bytes/octets can be up to 256. (In "termcap"
the "pO" capability is the equivalent.) Typically, such capabilities
are invoked programmatically via library-function calls to "curses"
or "ncurses" entry points.

The Linux Documentation Project provides information on "Terminfo
and Termcap" in several places, among which is:

http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-15.html

You should check to make certain that several things are true:

* that your Dorio terminal actually is able to perform the
"mc5p" function of passing a counted number of bytes to
an attached printer

* that your TERM environment variable is properly set

* that your Linux machine contains a "terminfo" database
entry which corresponds to the TERM variable you are setting
(or has a termcap entry to which the library will fall back)

* that this corresponding terminfo-database entry contains
a functional control sequence that actually causes the
"turn the printer on, to print a specified number of bytes"
functionality to happen

Some "termcap" advice appearing here...

http://www.delorie.com/gnu/docs/termcap/termcap_43.html

...contains a sentence of some relevance:

Most terminals with printers do not support all of `ps',
`po' and `pO'; any one or two of them may be supported.

The DEC-style terminals with which I am familiar implement only
the non-parameterized capabilities "mc5" and "mc4", like this:

TERMINFO TERMCAP CONTROL
CAPABILITY CAPABILITY SEQUENCE MEANING
---------- ---------- --------- ---------------------------
mc5 po ESC [ 5 i Printer-Controller Mode On
mc4 pf ESC [ 4 i Printer-Controller Mode Off

While it is possible that the Dorio VBG-10 is able to do what
"mc5p" asks it to do, it may not, so you may have to fall back to
using mc5 and mc4. You can check the documentation for the VBG-10
or for whatever equivalent model Boundless is currently supporting.

There is also a possible behavioral surprise lurking in all this:
if the "mc5p" command is properly implemented in the curses library
and in the terminal, it has the following property: while 'mc5p' is
in effect, "all text, including 'mc4', is transparently passed to
the printer." (Which you probably don't want.)

There are numerous other resources about related issues which you
can find, or find pointers to, from web pages I keep at:

http://www.cs.utk.edu/~shuford/terminal_index.html

A wonderfully helpful book on all such topics is this:

"termcap and terminfo"
by John Strang, Linda Mui and Tim O'Reilly
3rd Edition April 1988
270 pages, ISBN: 0-937175-22-6, $29.95 U.S.
http://www.oreilly.com/catalog/term/
http://www.amazon.com/exec/obidos/ISBN=0937175226

...RSS

--
K.L. says to try http://www.celestialseasonings.com/products/herb/r.php
which, however, contains no caffeine.

  #3  
Old February 17th 04, 01:59 AM
Richard S. Shuford
external usenet poster
 
Posts: n/a
Default

Igor Bujna kocour_easy*post.cz wrote:
|
| I have Oki 3390 printer attached to terminal "Dario 10-vgb10".
| I want send ESC-sequences to printer for bar-codes printing.
| I found out that i can use "mc5p" sequences for printing some bytes
| to given printer. I don't find this sequences on my linux system.
|
| When I write to printer given ESC-sequences for printing bar-codes
| via "Open printer sequence-mc5" and "Close printer sequence-mc4"
| data didn't reach printer in right format. It prints only bar-code
| numbers instead of bar-code+bar-code numbers.

Igor:

I think you must mean a "Dorio" terminal, not "Dario". The Dorio
brand was first applied in 1993 by Digital Equipment Corporation to
Value-Added Reseller versions of its VT510 character-cell terminal.
A few years later, DEC sold off its entire video-terminal business
to Boundless Technologies. The characteristics of the Dorio VGB-10
are still noted on the Boundless anonymous-FTP site:

ftp://ftp.boundless.com/pub/text/dec/specs/dor10.txt

Now, as to your programming problem. Think of this proverb:

"There are more modes of failure than modes of success."

Lots of things could be going wrong. The technology you want is
spread out through operating-system libraries, OS databases, your
application software, the firmware of the Dorio terminal, and the
firmware and setup of the attached printer.

I have no experience with the particular Oki printer model (3390) you
say you have. However, to produce bar codes, many printer types
use a special bar-code font, with a separate font for each different
type of bar code (UPC-A, Code-39, etc.) You should read the technical
documentation for this Oki 3390 printer to find out what it needs.
You might need to have your application software explicitly download
a barcode font to the printer before beginning other operations.

[brief pause for web search]

I found the following web page about an Oki Microline 3391 printer,
which is probably a successor to the 3390...

http://www.shopoki.co.uk/datasheet/ml3391_spec.htm

...and the page describes a 24-pin dot-matrix unit equipped with a
number of built-in barcode fonts (Code 39, UPC-A, UPC-E, EAN 8, EAN 13,
Interleaved 2 of 5, ZIP, and Code 128). So, if the 3390 also had these,
perhaps the solution involves invoking the proper font before sending
the digits. (And switching the font back afterwards.) Here again, you
must read the documentation to find out what is required.

As to the precise issues you mention above: the "mc5p" capability is
the "terminfo" way of saying

"turn the printer on, to print a specified number of bytes"

where the number of bytes/octets can be up to 256. (In "termcap"
the "pO" capability is the equivalent.) Typically, such capabilities
are invoked programmatically via library-function calls to "curses"
or "ncurses" entry points.

The Linux Documentation Project provides information on "Terminfo
and Termcap" in several places, among which is:

http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-15.html

You should check to make certain that several things are true:

* that your Dorio terminal actually is able to perform the
"mc5p" function of passing a counted number of bytes to
an attached printer

* that your TERM environment variable is properly set

* that your Linux machine contains a "terminfo" database
entry which corresponds to the TERM variable you are setting
(or has a termcap entry to which the library will fall back)

* that this corresponding terminfo-database entry contains
a functional control sequence that actually causes the
"turn the printer on, to print a specified number of bytes"
functionality to happen

Some "termcap" style advice appearing here...

http://www.delorie.com/gnu/docs/termcap/termcap_43.html

...contains a sentence of some relevance:

Most terminals with printers do not support all of `ps',
`po' and `pO'; any one or two of them may be supported.

The DEC-style terminals with which I am familiar implement only
the non-parameterized capabilities "mc5" and "mc4", like this:

TERMINFO TERMCAP CONTROL
CAPABILITY CAPABILITY SEQUENCE MEANING
---------- ---------- --------- ---------------------------
mc5 po ESC [ 5 i Printer-Controller Mode On
mc4 pf ESC [ 4 i Printer-Controller Mode Off

While it is possible that the Dorio VBG-10 is able to do what
"mc5p" asks it to do, it may not, so you may have to fall back to
using mc5 and mc4. You can check the documentation for the VBG-10
or for whatever equivalent model Boundless is currently supporting.

There is also a possible behavioral surprise lurking in all this:
if the "mc5p" command is properly implemented in the curses library
and in the terminal, it has the following property: while 'mc5p' is
in effect, "all text, including 'mc4', is transparently passed to
the printer." (Which you probably don't want.)

There are numerous other resources about related issues which you
can find, or find pointers to, from web pages I keep at:

http://www.cs.utk.edu/~shuford/terminal_index.html

A wonderfully helpful book on all such topics is this:

"termcap and terminfo"
by John Strang, Linda Mui and Tim O'Reilly
3rd Edition April 1988
270 pages, ISBN: 0-937175-22-6, $29.95 U.S.
http://www.oreilly.com/catalog/term/
http://www.amazon.com/exec/obidos/ISBN=0937175226

...RSS

--
K.L. says to try http://www.celestialseasonings.com/products/herb/r.php
which, however, contains no caffeine.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing USB printers on Dell 4500 Paul Filion Dell Computers 14 August 22nd 04 11:51 AM
Solution: printing directly to a networked printer JP Printers 0 February 15th 04 11:44 PM
Optra R networking JP Printers 1 February 15th 04 11:35 PM
Use Printer Off line; Minolta Page Pro 1250 not on network! Tom Duprex Printers 0 November 23rd 03 09:19 PM
deskjet 845 C ink Pascal Printers 2 November 17th 03 09:16 AM


All times are GMT +1. The time now is 03:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.