[Linux-parport] Trouble setting up an EPP connection
Matthew Duggan
stauff at guarana.org
Thu Oct 14 08:03:38 EDT 2004
(resending this reply to the list, mail server trouble my end)
On Wed, Oct 13, 2004 at 12:10:13PM +0200, ofir wrote:
> Hi all,
>
> I write an application (in user space) that sends and receive data using
> the parport driver. I want to use the EPP protocol.
> I'm having trouble setting up the connection.
>
> I basically use
>
> mode = IEEE1284_MODE_EPP;
>
> and then either:
>
> ioctl( fd, PPSETMODE, &mode)
>
> In which case "nothing happens" a read blocks, and a send operation
> generates no response on the other side.
Ok, nothing will happen when you use PPSETMODE. It doesn't physically
do anything, just sets up what mode you want reads and writes to happen
in.
> or:
> ioctl( fd, PPNEGOT, &mode)
This is what you have to use to do the negotiation, but it will only
work if the other side is willing to negotiate, otherwise it will:
> which fails with "Input/output error" from perror
>
> Here are the details:
..
> (The application serves as both the receiving and sending app.
> Each instance of the app is set as receiver or sender depending on the
> parameter it is run with.)
That's not going to work, sorry. EPP and ECP are not symmetric
protocols. You would have to write some code to make the port at one
end behave like a peripheral. That means that you lose all the
advantages of hardware acceleration on at least one end.
Cheers,
- Matthew
More information about the Linux-parport
mailing list