Solved

How to use /dev/lp0

Posted on 2003-11-23
2
773 Views
Last Modified: 2013-12-15
I need this urgently, so what i want is, how to use the /dev files for the parallel port, instead of the outb() or inb() functions.
0
Comment
Question by:danny2408
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 125 total points
ID: 9821873
You can either open the device file and write to it with standard file operations, or you can redirect output from commands to the /dev/lp0 device file:
cat some_file.prn > /dev/lp0

But is this really what you want? I would use a queuing system like lpr or cups. Is there a reason why you want to access the hardware directly?
0
 

Author Comment

by:danny2408
ID: 9828647
I want to acces the hardware directly because is a little project i have in a subject.
The intention is to write to the paralel port and print messages on a Character LCD Display.
But is finished now, and i thankyou for your response.
Its working fine and i learn how to use the file /dev/port for the interfacing.
Again, thankyou for the response.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question