[Linux-parport] Trouble setting up an EPP connection

ofir ofir.noy at xorcom.com
Thu Oct 14 05:27:32 EDT 2004


Thanks Matthew.

I'm trying something simpler to eliminate the problem 
(of setting up an EPP connection).

I have a Brother MFC9870 printer/scanner machine that my PC is connected
to through a parallel port. Scanning does not seem to be supported from Linux, 
but printing works fine.
Scanning works from windows. 

I want to setup an EPP connection with the printer.
I have trouble with the initial EPP negotiation between the PC and the 
printer.
How can I make sure that my hardware is EPP compatible (PC, cable, printer) ?
What are the steps I need to take in order to enable EPP on my PC ?

Here is what I've done:
I wrote a simple program that does only the EPP negotiation:

	if((fd = open("/dev/parport0",O_RDWR)) == -1)
	{
		perror("/dev/parport0");
		return -1;
	}

	/* Claim device */
	if ( ioctl (fd, PPCLAIM) )
	{
		perror ("PPCLAIM");
		close (fd);
		return -1;
	}

	/* Set the communication mode (protocol) for the device */
	/*
	   I tried these two mods and both gave me the same error:
		"No such device or address"

           mode = IEEE1284_MODE_EPPSL;
    	   mode = IEEE1284_MODE_EPP;
	*/

	mode = IEEE1284_MODE_EPP;
	if ( ioctl (fd, PPNEGOT, &mode))
	{
		perror("error: device not IEEE 1284 compliant");
		close (fd);
		return -1;
	}

I connected PC A (see details below) to the printer with a standard printer 
cable.
I ran the program mentioned above.

1) When the cable was connected I received the following error:
    "No such device or address" from perror

2) When the cable was disconnected I received:
   "Input/output error" from perror

As Matthew mentioned in his reply to my earlier qustion, I guess
that the "Input/output error" was because no device was present on the other 
end but
what about "No such device or address" what does that mean?

The same errors appeared on PC B (see details below) when it was connected
(and not connected) to the printer.

HARDWARE DETAILES
-----------------------------
[PC A]

     OS: Fedora core2 (kernel 2.6.5-1.358)
     Port Type: Parallel Port ECP/EPP

     Output of dmesg | grep parport :
     parport0: PC-style at 0x378 [PCSPP,TRISTATE,EPP]
     parport0: PC-style at 0x378 [PCSPP,TRISTATE,EPP]
     lp0: using parport0 (polling).
     parport0: PC-style at 0x378 [PCSPP,TRISTATE,EPP]
     parport_negotiate returned: 1

[PC B]

     OS: Debian (kernel 2.6.7-1-386)
     Port Type: Parallel Port ECP/EPP

     Output of dmesg | grep parport :
     parport: PnPBIOS parport detected.
     parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP]
     parport: PnPBIOS parport detected.
     parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP]
     lp0: using parport0 (interrupt-driven).




More information about the Linux-parport mailing list