Hello,
I just got this working on the weekend.
I was having the same problem, but then I realized that the ioctl PPWDATA
always defaults to address BASE+0. So the value appears on the port, but
doesn't do the toggles on the appropriate lines for signaling.
You have to use the user space 'write' function. This interprets your IEEE
mode correctly and sends the data appropriately.
Here is a quick and dirty sample...
int mode2 = IEEE1284_MODE_EPP;
fd = open (argv[optind], O_RDWR | O_NOCTTY);
ret = ioctl (fd, PPCLAIM);
ret = ioctl (fd, PPNEGOT, &mode2); //negotiates to EPP
ret = ioctl (fd, PPSETMODE, &mode2); // sets the driver states
ch=0x57;
num=1;
ret = write (fd, &ch, num); // writes out 0x57 on the port in EPP mode
Yours should work the same but with ECP...
Derek
Vince Weaver wrote:
> > > so the question is, can EPP be done with ppdev?
> >
> > Yes, and it's even been tested a little bit in 2.3.x.
>
> ok, next question... we are using our device on these old Compaq computers
> that only support ECP.
>
> By writing 0x80 to port 0x378+0x402 we can set the ECP to do "EPP
> compatibility mode" and everything works fine with doing direct EPP by
> hitting the ports directly...
>
> will ppdev know to do the above if I set IEEE1284_MODE_EPP on this
> machine?
>
> following is the relevant dmesg [this is 2.3.99-pre4-pre5 as 2.3.99-pre3
> would oops whenever I did ppdev stuff].
>
> 0x378: FIFO is 16 bytes
> 0x378: writeIntrThreshold is 8
> 0x378: readIntrThreshold is 8
> 0x378: PWord is 8 bits
> 0x378: Interrupts are ISA-Pulses
> 0x378: ECP port cfgA=0x1c cfgB=0x4b
> 0x378: ECP settings irq=7 dma=3
> parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,ECP]
> parport0: irq 7 detected
> parport0: cpp_daisy: aa5500ff(38)
> parport0: assign_addrs: aa5500ff(38)
> parport0: cpp_daisy: aa5500ff(38)
> parport0: assign_addrs: aa5500ff(38)
>
> -- To unsubscribe, send mail to: linux-parport-request@torque.net --
> -- with the single word "unsubscribe" in the body of the message. --
-- Derek Bouius | American Biometric Company | Tel:(613)736-5100x281 dbouius@abio.com | 3429 Hawthorne Rd,Ottawa,ON | Fax:(613)736-1742-- 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 : Tue Apr 18 2000 - 10:30:45 EDT