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 » General
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Linux to emulate/act as a printer.



 
 
Thread Tools Display Modes
  #1  
Old December 26th 03, 05:22 AM
Peteris Krumins
external usenet poster
 
Posts: n/a
Default Linux to emulate/act as a printer.

Hello,

I have a device which outputs data to a printer.
I have to collect these data and do smth with them.

Today (working already 15+hours), i read a lot about parallel
port and how data is transmitted/received, so i wired
my own cable:

data to data,
pin 1 (at pc) to pin 11 (at device), so i could write not busy
pin 10 (at pc) to pin 1 (at device), so i could read strobe
pin 16 (at pc) to pin 10 (at device), so i could write ack
pin 17 (at pc) to pins 12 and 15 (at device), so i could write
not out of paper and not error (tell that nothing is wrong with
printer)
ground to ground,
other cables not used.

My idea is to control the status registers, so i (linux box) could
act as a real printer, for example if i saw 'strobe low' (reading
status ack (pin 10 at pc which is connected to device's pin 1),
i'd know device is sending a byte, i would acknowledge that
(by writing to pin 16) and continue reading byte by byte.

Unfortunately something is wrong. I have tested the wiring -
it is ok. I know about hardware invertion in parallel port, so
i high and low pins correctly.

The device just holds 'strobe' high, data bit 2 high and data bit 4
high. As i understand the device waits me (printer) to low busy,
and do the same to error and out of paper. I have done it but the
device never changes those strobe, bit2 and bit4.

If i connect the device to a printer, the printer prints data out
perfectly. I dont have so advanced devices to trap printer and device
to see their conversation..

So something is wrong, i must ask if i have have understood how the
printers work correctly:
1) If there is no paper or is error, those pins are set high.
2) Printer sets busy low, indicating it is ready to accept data
3) Device sets data pins high, putting a byte on the wire, and sets
strobe low.
4) Printer sets busy high, indicating it is processing data
5) Printer reads data pins.
6) Printer sets busy low, sets ack low, waits ~ 5us, highs ack
7) goto 1, procedure continues.

Am i correct?

Also, please, if you know how to do this easier, be so kind and
tell me.

 




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
Reading output for printer Peteris Krumins General 2 December 26th 03 05:17 AM
USB or parallel port, which should the printer use? *Vanguard* General 6 November 29th 03 10:01 PM
HP 930 printer cartridge Don Ward General 0 November 24th 03 07:41 AM
Possible to Use HP 29 Black Ink Cartridge in a Printer (656c) That Takes the 20 Instead? Spam Hater General 4 August 13th 03 06:07 PM
dell usb problem with HP printer woodrow General 3 August 4th 03 06:11 PM


All times are GMT +1. The time now is 11:18 AM.


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