On Monday, November 4, 2002, at 02:15 AM, Tou Nou Thao wrote:
> This is my first time using Linux as I am trying to get my program to
> run on the parallel port. I'm writing to the parallel port using outb
> but I get a seg fault.
try libieee1284: http://cyberelk.net/tim/libieee1284/
> I have read/write access but I'm not the root user
If you're using outb, device file permissions don't matter. In order to
use port I/O with inb/outb and friends, you need to be root. You also
need to enable access to those particular ports with ioperm(), or you
can just raise the I/O privilege level with iopl() (which is less
desirable, since it doesn't catch accesses to ports other than the
requested port range like ioperm).
if you use /dev/parport*, then you can set up permissions so that a
non-root user can access the parallel port.
> . Can someone direct me to an archive (I'm sure this has been
> discussed) or a website? Thanks a lot.
you probably want to use libieee1284 or a similar abstraction library,
as many of these problems have been addressed already.
-- Charles Lepple <email@example.com> http://www.ghz.cc/charles/
-- 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 : Mon Nov 04 2002 - 08:17:18 EST