[PARPORT] PPCLAIM: No such device or address

From: Latha (ranga_axis@yahoo.co.in)
Date: Thu Aug 08 2002 - 06:43:25 EDT

  • Next message: Tim Waugh: "Re: [PARPORT] PPCLAIM: No such device or address"

    hi all,

     I wrote a small program using ppdev. it is working on
    one computer, when i am trying on the other computer i
    am getting the following error

    PPCLAIM: No such device or address

    what could be the problem ??????

    this is the programm

    ************************************************************************************************
    program

    ************************************************************************************************

    #include <stdio.h>
    #include <linux/ioctl.h>
    #include <linux/parport.h>
    #include <linux/ppdev.h>
    #include <fcntl.h>

    int main(int argc, char *argv[])
    {
    int fd, mode;
    unsigned char status, data;

    fd = open("/dev/parport0",O_RDWR);
    if (fd == -1)
    {
    perror("open");
    exit(1);
    }

    if (ioctl(fd,PPCLAIM))
    {
    perror("PPCLAIM");
    close(fd);
    exit(1);
    }

    mode = IEEE1284_MODE_COMPAT;
    if (ioctl(fd, PPNEGOT, &mode))
    {
    perror ("PPNEGOT");
    close (fd);
    return 1;
    }

    ioctl(fd,PPWDATA,argv[1]);

    ioctl (fd, PPRELEASE);

    close(fd);
    }

    ***********************************************************************************************

    ________________________________________________________________________
    Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!
           visit http://in.autos.yahoo.com

    -- 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 Aug 08 2002 - 06:51:19 EDT