LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2019, 11:41 AM   #16
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,855

Rep: Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663

Also, how many ports are enumerated here?
Code:
ls -l /dev/lp*
The output won't necessarily reflect physical parallel ports of course (but also useful to compare against the dmesg output).
 
Old 01-15-2019, 02:05 AM   #17
31416
LQ Newbie
 
Registered: Jan 2019
Location: Spain
Posts: 9

Original Poster
Rep: Reputation: Disabled
I followed your sugestions but I donīt get any hint on how to advance on this.
Quote:
Originally Posted by ferrari View Post
Some typical diagnostic approaches you could do

1) Examine kernel outut relating to a parport or similar...
Code:
dmesg Ķ grep par
Code:
dmesg| egrep "par|lp"
Outputs nothing

Quote:
2) Examine the kernel's device tree in /proc/sys/dev/parport....
Code:
ls -l /proc/sys/dev/parport/parport*/autoprobe*
Which is why I suggested probing for printer hardware already with
Code:
cat /proc/sys/dev/parport/parport*/autoprobe*
or
ls -l /proc/sys/dev/
outputs 4 directories: cdrom, parport, raid, scsi
ls -l /proc/sys/dev/parport
outputs:
-r--r--r-- 1 root root 0 Jan 15 08:23 autoprobe
-r--r--r-- 1 root root 0 Jan 15 08:23 autoprobe0
-r--r--r-- 1 root root 0 Jan 15 08:23 autoprobe1
-r--r--r-- 1 root root 0 Jan 15 08:23 autoprobe2
-r--r--r-- 1 root root 0 Jan 15 08:23 autoprobe3
dr-xr-xr-x 1 root root 0 Jan 15 08:23 devices
-r--r--r-- 1 root root 0 Jan 15 08:23 dma
-r--r--r-- 1 root root 0 Jan 15 08:23 irq
-r--r--r-- 1 root root 0 Jan 15 08:23 modes
-rw-r--r-- 1 root root 0 Jan 15 08:23 spintime

If I cat any of the autoprobe* files, I get nothing.

Quote:
Code:
sudo cat /proc/sys/dev/parport/parport*/autoprobe*
]
outputs
-bash: sudo: command not found

[
Quote:
3) Finally if you had CUPS or even lprng (minimal *nix-style printing system) installed, you could could make use of lpinfo to see if a printer is detected with
Code:
lpinfo -v
Outputs
-bash: lpinfo: command not found

Honestly, I thought this was going to be much more easy. Although before posting I read a lot of documentation and forums, I expected something like " change permissions on file x" or " make sure your xxxx device is listed under xxxx". I appreciate all your help, guys, but maybe is time to leave this behind and admit that the industrial program running in tty1 somehow is hijacking the printing capability of the system as some of you suggested before.
Anyhow, if someone can point out a reading on how the basic printing works inside the O.S. ( without cups or lprng), will be good to learn.
 
Old 01-15-2019, 03:08 AM   #18
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,855

Rep: Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663
I was specifically answering your question literally about how to go about investigating the presence/status of a parallel port, and some possible indication that a printer might be attached. Such ports are legacy hardware ports, with little complexity when compared to USB technology. Since dmesg returns nothing about the existence of a parallel port, I can only speculate about how the legacy printing application is able to communicate with the printer via a parallel port interface. Perhaps it is loading a driver when first launched?

You could check if the parport_pc, ppdev, and/or lp driver are loaded...
Code:
lsmod|egrep "lp|par"
Quote:
Outputs
Code:
-bash: lpinfo: command not found
I didn't expect that command to be present, since a previous post confirmed no 'lp' or 'lpr' command available. You need to have CUPS installed or lprng installed.
 
Old 01-15-2019, 03:28 AM   #19
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,855

Rep: Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663
Is there a chance that the Linux machine is using a parallel port configured with a different base to the default 0x378. Perhaps worth checking the BIOS to see if the parallel port is known and its base address displayed configured as expected.

https://www.computerhope.com/issues/ch000042.htm
https://www.kernel.org/doc/html/v4.1...e/parport.html
 
Old 01-15-2019, 10:02 AM   #20
31416
LQ Newbie
 
Registered: Jan 2019
Location: Spain
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thumbs up

Solved !!!
Following Ferrari indications I checked the Bios configuration. LPT1 was configured as "Device Mode : ECP and EPP 1.9 mode". I changed it to "Normal" and now it prints from both the industrial program and from the Linux tty.
Why the industrial program was able to print with that Bios configuration? No idea.
Thank you very much for all the indications.
 
Old 01-15-2019, 12:09 PM   #21
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,855

Rep: Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663Reputation: 663
I'm glad to read of your success here (with changing the port mode). This can also be done when loading the parport_pc driver. The application may have been able to set this on the fly perhaps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Nvidia and ARM: It's a parallel, parallel, parallel world LXer Syndicated Linux News 0 03-21-2013 06:10 PM
[SOLVED] Executing a command in parallel | GNU parallel or xargs the_gripmaster AIX 3 05-08-2012 07:41 AM
how can I install a printer on the parallel port? the printer is a Epson LX-2170. atvidal Linux - Newbie 6 05-25-2010 02:01 AM
printer modules not loaded; parallel printer doesn't work blinux1 Linux - Newbie 7 06-24-2004 09:59 PM
Parallel port and printer Xreagan Linux - Newbie 2 09-04-2002 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration