Solved

How to use /dev/lp0

Posted on 2003-11-23
2
782 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

624 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