>
> Why do you need to call open this way?
> p = open (argv[1], O_EXCL);
i used open that way after NOT succeeding with the normal way:
open(argv[1], O_RDWR);
> Doesn't the later call give you exclusive access to the port?
> ioctl (p, PPCLAIM, 0);
>
well, in software, it does, but there still is some piece of code (VERY
likely the kernel) that writes pieces of information to the hardware
parallel port, according to some uses of my computer (keyboard typing,
harddrive access etc - i don't know exactly which actions trigger this).
I checked this using LED's connected to every pin (or some pins) of the
parallel port.
> If you are trying to read and write to the port, then wouldn't you need
> to call open differently? Or does that flag mean all privileges?
i tried O_RDWR.
>
> Why are you doing opens and claims inside of loop? Should you not do
> the exclusive claiming prior to loop and then if success, do the work
> inside the loop?
i didn't tried that yet (and i will as soon as i get home), but that nice
piece of code, aquires the port, waits a bit (here is 5.250 seconds),
releases the port and tries all that again.
the problem is that in those 5.250 seconds, if my computer is not entely
idle, i get noise bits on my parallel port.
very interesting is that if i read the DATA, STATUS and CONTROL registers,
they don't return any such change. if i write 0xFF to DATA, i get 0xFF
when i read DATA but in the meantime (hardware) there is no chance to
'get' 0xFF.
i tried also tried another kernel (2.0.28 - or something) and it's the
same thing.
in BIOS i tried setting the parallel port to SPP, ECP and EPP. no change.
i still have to try to change the IRQ from BIOS for the parport.
my computer is a Duron/700 MHz with SiS xxxx motherboard.
> Nate
>
>
----------------------------
http://ataraxis.home.ro
ataraxis@disponibil.net
lucian@psdtimis.ro
0740.959.300
-- 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 : Thu Mar 06 2003 - 03:04:44 EST