I have problems with ECP communications in ppdev. I want to retrieve data on my parallel port, the peripheral is a microcontroller (8051) that I programmed. The ECP communication works under DOS (with DJGPP 32 bits and interruptive mode on the parport). Now I wanted to make it work under linux. I though ppdev was a good driver for that.
But it doesnot work at all. Here is what I am doing in my program :
claim the port (ioctl PPCLAIM)
set ECP mode (ioctl PPSETMODE)
and then I can't neither use read nor write. The write function returns 0 (so nothing written) and the read function return -1 (No such device). Select() system call (for read or write) times out, so the port is never ready.
But I can read and write the datas and the controls and set the direction of the port with the appropriate ioctl call, this works.
So I don't know if the problem is on the peripheral (bad implementation of the protocol in the microcontroler) or in my linux software. It worked fine under DOS but I do not control any error under DOS, I just read each time an interrupt occurs.... I have not implemented the forward data transfer in my microcontroller (I just want to receive data on the PC), could this be a problem ?
If my problem is on the peripheral how can I see what happens or read the errors easily ? When I try to read() or write() or select() nothing happens on the port (viewed with my microcontroller).
My configuration is 2.4.5 kernel and via686a parport. I put the parport in ECP mode in the BIOS.
I hope someone could help me because I do not know what to do, and it is very important to make it work...
Thank you very much,
-- To unsubscribe, send mail to: firstname.lastname@example.org --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Tue Jul 24 2001 - 06:05:50 EDT