Announcement

Collapse
No announcement yet.

Linux ******* Linux

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linux ******* Linux

    I'm trying to out put data on the printer port in Linux and I keep getting "you do not have permission to access this port, you must be in root"

    Now I've logged on as root and it works fine. I tried to set the permission via chomd 666 /dev/lp0 . This worked fine for the serial ports.

    Any ideas what I'm doing wrong?

    Rob
    And you say people actually pay money for M$ Windows?
    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

  • #2
    It sounds like the parport code is checking the UID of the process and not the access mask inode for access rights. So, no matter what the access mask is for the device inode entry, unless you are UID 0, you are not getting access to that device. This is just a guess based on how you describe the error.

    Comment


    • #3
      Found out what I'm doing wrong, and I thought I'd let you all know, so you don't make the same mistake.

      I'm using the OUTB function, which bypasses the Kernel. And you can bypass the Kernel unless your in root.

      So setting the permissions makes no difference. Simple

      Rob
      And you say people actually pay money for M$ Windows?
      www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
      Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

      Comment


      • #4
        Which leads to my next question, how do you write to the parallel port without bypassing the Kernel

        Rob
        And you say people actually pay money for M$ Windows?
        www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
        Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

        Comment


        • #5
          You don't,
          you have to pass stuff to the kernel first.
          Atleast thats how I understand it.
          Clarion 200watt head unit w/ Aux in.
          Kicker 800watt 4 channel amp
          In a 96 Grand Prix SE.

          Comment


          • #6
            It can be done thru the Kernel, using the lp port drivers, but no one ever uses the drivers as they can't work out how!

            I've mastered the art of writting to the serial ports thru the kernel, by using the drivers for /dev/ttys0 etc.

            But I can get /dev/lp0 to do anything.

            Rob
            And you say people actually pay money for M$ Windows?
            www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
            Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

            Comment


            • #7
              dont you just open /dev/lptx , where x is which par port your working on , as a *FILE , then just read/write to that?
              stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.

              Comment


              • #8
                THat sounds just insane enough to work!!!
                No, I'm kidding. But Linux does do some wierd crap, like when I read from my tv card, xawtv reads the file /dev/video1
                Clarion 200watt head unit w/ Aux in.
                Kicker 800watt 4 channel amp
                In a 96 Grand Prix SE.

                Comment


                • #9
                  I know who would know
                  on irc, use us.slashet.org
                  and goto #lcdproc
                  They created a Linux LPT LCD program.
                  They would know how to write to a Parrallel port.
                  Clarion 200watt head unit w/ Aux in.
                  Kicker 800watt 4 channel amp
                  In a 96 Grand Prix SE.

                  Comment


                  • #10
                    Two points, when I said
                    And you can bypass the Kernel unless your in root.
                    I ment to say

                    And you [/B]can't[B] bypass the Kernel unless your in root.

                    That might make some more sense.

                    Second,

                    Samael

                    That's what I'm trying to to do, you wouldn't know where I could find an example piece of code, to out put say 255.

                    Cheers

                    Rob
                    And you say people actually pay money for M$ Windows?
                    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
                    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

                    Comment


                    • #11
                      no. unfortunatly i dont have a peice of code , but lstrunk had a good idea above. i have never done it myself , but when i asked the question " hi all. if i wanted to write to the parrallel port , i would just open /dev/lpt0 as a *FILE , and write to that yes?" on irc , i was told that that was correct.
                      stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.

                      Comment


                      • #12
                        http://www.cs.uky.edu/~hankd/EE481/SPP/

                        it has a description etc... and some source code. google is good
                        stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.

                        Comment


                        • #13
                          http://www.beyondlogic.org/spp/parallel.htm
                          this has some good info to , although a bit light on c/linux stuff. good hardware stuff though
                          stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.

                          Comment


                          • #14
                            Cheers, I'll have a play with that during the week.

                            Rob
                            And you say people actually pay money for M$ Windows?
                            www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
                            Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

                            Comment

                            Working...
                            X