Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to use /dev/lp0

Posted on 2003-11-23
2
Medium Priority
?
803 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 375 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

How to Create Failover DNS Record Sets in Route 53

Route 53 has the ability to easily configure DNS record sets specifically for failover scenarios. These failover record sets can be configured to failover to full-blown deployments in other regions or to a static HTML page that informs your customers of the issue.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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 …
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 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…
Suggested Courses

722 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