Hi
I have been trying to write a channel address and read it back using ECP
mode.
The following is the code.
mode = IEEE1284_MODE_ECP | IEEE1284_ADDR;
if (ioctl (hParPort, PPNEGOT, &mode)) {
ParPortError = 1;
return;
}
// Channel address can be from 0 - 127
WriteAddr[0] = (char) ChAddr;
Result = write (hParPort, WriteAddr, 1);
if (Result != 1) {
ParPortError = 1;
return;
}
Result = read (hParPort, ReadAddr, 1);
if (Result == -1) {
ParPortError = 1;
return;
}
if (strncmp (WriteAddr, ReadAddr, 1))
{
ParPortError = 1;
return;
}
I hooked up a Logic Analyzer and I can tell that the negotiation and
write
commands work. I can see the transactions and they are according to
theIEEE1284 spec.
But, when I try to do an address read, a problem occurs.
INIT goes low, then PERROR goes low, then STROBE goes low and BUSY
goes low indicating that an address is to be read, but
AUTOFD does not go high like it is supposed to. This causes zero bytes
to
be read. AUTOFD is controlled by the host (parallel port driver).
I can sent the screen capture, if that will help.
Kernel: 2.4.4
Appreciate your help.
Hassan
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Fri Oct 05 2001 - 09:14:34 EDT