[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with lp0

On Tuesday 05 November 2002 13.54, Jonathan Wilkinson wrote:
> Hi I've now managed to solve the problem I was having before but now the
> error says "ERROR GET lp0 (-2): failed ioctl PARIO_GET_STRUCT"
> Any ideas
> Thanks
> JW

The homebrewed ioctl()'s to control lp0 and lp1 that hwtest uses is not 
implemented in our Linux 2.4 port.
When compiling hwtest, there is a warning about this.
The ioctl()'s originally came from our Linux 2.0 NO_MMU (elinux) port) 
and you can probably patch it in if you download the elinux kernel
although it is some work.
The Linux 2.4 uses the parallel port framework that exists in Linux,
and I don't know much about that though and I dont know if it's 
straightforward to add ioctl() to it.
There are probably applications that can control the I/O pins
in a similar way using the standard parallell port API, but I haven't looked 
for any.

If you don't enable the parallel ports the pins are accessable using the 
/dev/gpiog driver.

You could also have a look at:


> -----Original Message-----
> From: Jonathan Wilkinson
> Sent: 05 November 2002 09:34
> To: Dev-etrax mailing list (E-mail)
> Subject: Problems with lp0
> Hi I'm having problems with the parallel port.
> I'm just trying to use the hwtest program to test the port.  using hwtest
> INIT lp0  yields "ERROR INIT lp0 (-1): failed to open /dev/lp0"
> I've enabled the port in menu config and rebuilt the kernel and I'm pretty
> stuck.  Does anyone have any ideas?
> Thanks
> Jonathan