Solved

How to use /dev/lp0

Posted on 2003-11-23
2
734 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
2 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 125 total points
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now