Read the (printed ) data from another PC's LPT1 (or) capture the printed data from another PC thru Lpt1
Posted on 2003-03-08
I need to read the data from another PC while it is printing.
Suppose PC 'B' is printing some information thru it's parallel port. By attaching a cable ( db25 ) between PC 'A' <=> pc 'B' (thru LPT1) , will I be able receive the data in pc 'A'. Receiving Computer has got bi-directional Port.
I have found one bi-directional configuration (firstname.lastname@example.org) and made a cable. The configuration is ,
Side 1 Pin dir Pin Side 2 connection
------ --- --- --- ------ ----------
D0 2 <=>* 2 D0 direct
D1 3 <=>* 3 D1 direct
D2 4 <=>* 4 D2 direct
D3 5 <=>* 5 D3 direct
D4 6 <=>* 6 D4 direct
D5 7 <=>* 7 D5 direct
D6 8 <=>* 8 D6 direct
D7 9 <=>* 9 D7 direct
C0- 1 => 13 S4+ inverted
C1- 14 => 12 S5+ inverted
C2+ 16 => 10 S6+ direct
C3- 17 => 11 S7- direct
S4+ 13 <= 1 C0- inverted
S5+ 12 <= 14 C1- inverted
S6+ 10 <= 16 C2+ direct
S7- 11 <= 17 C3- direct
Gnd 25 === 25 Gnd (ground)
I set C5 to 1 to enable bi-direction.
I wrote a small routine in 'C' to read the data from Data register using 'inportb'. Results are not O.K.
Suppose PC 'B' is printing "THIS IS FOR TEST", it appears in PC 'A' like follows
"TTTTTTHHHHHHISS FFFFFFFFOOOOOOORRRR TTTTTTEEEEESSSST".
Sometimes I am loosing some caharacters but moset of the time i am getting repeated cahrs.
Can anyone show me the right direction ?
( Though this question deserves more points I have only 75 points to give, i am new guy.)