Solved

How to use /dev/lp0

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

Suggested Solutions

Title # Comments Views Activity
how to print sub line with  sed /awk /perl in bash file 11 67
CentOS 7 Linux for HP DL380 G4 32Bits 7 79
Linux FTP Error 5 46
Shrink Linux Swap File Size CentOS 10 29
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.:
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.

733 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