LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 12-14-2022, 04:28 AM   #1
mickyjohn
LQ Newbie
 
Registered: Jun 2022
Posts: 16

Rep: Reputation: 10
Adding printer using lpadmin problem added printer paused


Hi everyone, i am trying to add a printer using lpadmin command from terminal. Although the printer get added but is paused and can not be use for printing.

Tried commands:
Code:
lpadmin -p P-3045DN-Ent-V2-Airprint -v dnssd://P-3045DN-Ent-V2-Airprint%20%40%20Raspi._ipps._tcp.local./?uuid=a9885352-dd0f-3a15-44c3-1a04f131a90d -o printer-is-shared=false -P /Library/Printers/PPDs/Contents/Resources/Kyocera\ ECOSYS\ P3045dn.ppd 
lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
Code:
# cat /etc/cups/printers.conf
# Printer configuration file for CUPS v2.3.4
# Written by cupsd on 2022-12-14 11:15
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
NextPrinterId 17
<Printer P-3045DN-Ent-V2-Airprint>
PrinterId 16
UUID urn:uuid:03a5df71-c660-3857-4525-67d898583278
AuthInfoRequired negotiate
Info P-3045DN-Ent-V2-Airprint
MakeModel Kyocera ECOSYS P3045dn (KPDL)
DeviceURI dnssd://P-3045DN-Ent-V2-Airprint%20%40%20Raspi._ipps._tcp.local./?uuid=a9885352-dd0f-3a15-44c3-1a04f131a90d
State Stopped
StateTime 1671012899
ConfigTime 1671012899
Type 8425684
Accepting No
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
Code:
 lpadmin -p P-3045DN-Ent-V2-Airprint -v socket://10.53.33.232:631 -o printer-is-shared=false -P /Library/Printers/PPDs/Contents/Resources/Kyocera\ ECOSYS\ P3045dn.ppd
Using above commands add the printer but the status is always paused.

Working GUI:
If i try to add printer form GUI which works perfectly the printer.conf looks like
t
Code:
# cat /etc/cups/printers.conf
# Printer configuration file for CUPS v2.3.4
# Written by cupsd on 2022-12-14 11:11
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
NextPrinterId 15
<Printer P_3045DN_Ent_V2_Airprint___Raspi>
PrinterId 14
UUID urn:uuid:1bb21747-113b-3ad7-7ff7-369be9cc379a
Info P-3045DN-Ent-V2-Airprint @ Raspi
Location 
MakeModel Kyocera ECOSYS P3045dn (KPDL)
DeviceURI dnssd://P-3045DN-Ent-V2-Airprint%20%40%20Raspi._ipps._tcp.local./?uuid=a9885352-dd0f-3a15-44c3-1a04f131a90d
State Idle
StateTime 1671012629
ConfigTime 1671012629
Type 8425684
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
How can i add above GUI printer using lpadmin from terminal ?
 
Old 12-14-2022, 06:06 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,383

Rep: Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762
I have just been looking at this stuff in the Slackware forum, so some copy and paste from my end.
From local CUPS Help under "Printer Drivers and PPDs":
Quote:
The everywhere driver is used for nearly all modern networks printers sold since about 2009. For example, the following command creates a destination for a printer at IP address 11.22.33.44:

lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
You show as running CUPS v2.3.4, which does support IPP Everywhere, and your Kyocera ECOSYS P3045dn shows as supporting Apple Bonjour, so should work with IPP.

A suitable IPP URI is needed (the -v option). (This would typically be discovered by Multicast DNS and DNS Service Discovery if CUPS has avahi support when looking for network printers.) My quick web search has not shown any candidates, but ipp://10.53.33.232/ipp is worth a try.

You also have references to Raspi, which takes me into an area with which I am not familiar. Perhaps you could use nmap to perform discovery of the IPP URI

Last edited by allend; 12-14-2022 at 06:08 AM.
 
Old 12-14-2022, 06:44 AM   #3
mickyjohn
LQ Newbie
 
Registered: Jun 2022
Posts: 16

Original Poster
Rep: Reputation: 10
Thanks @allend. I have tried following but unfortunately the result is same, printer is added but the status is paused and can not be used for printing.

Code:
lpadmin -p P-3045DN-Ent-V2-Airprint -v ipp://10.53.33.232/ipp/P-3045DN-Entw-V2-Airprint -o printer-is-shared=false -P /Library/Printers/PPDs/Contents/Resources/Kyocera\ ECOSYS\ P3045dn.ppd -o auth-info-required=negotiate
lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
One detail was missing, the IP address is from CUPS server which has multiple printers, not directly from printer . Once one will be added sucessfully, i will add the remaining from terminal
 
Old 12-14-2022, 07:14 AM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,383

Rep: Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762
Code:
lpadmin -p P-3045DN-Ent-V2-Airprint -v ipp://10.53.33.232/ipp/P-3045DN-Entw-V2-Airprint -o printer-is-shared=false -P /Library/Printers/PPDs/Contents/Resources/Kyocera\ ECOSYS\ P3045dn.ppd -o auth-info-required=negotiate
Forget AirPrint, that is Apple specific.
You need the IP address of the printer.
That IPP URI looks bogus.
Drop the additional options.
Do not try to specify the .ppd file. It will be automatically generated in /etc/cups/ppd/.

KISS rule. Get it working with minimal options, then fine tune after.

Last edited by allend; 12-14-2022 at 07:18 AM.
 
Old 12-14-2022, 08:17 AM   #5
mickyjohn
LQ Newbie
 
Registered: Jun 2022
Posts: 16

Original Poster
Rep: Reputation: 10
@allend i have to add the printer using cups server IP not individual printer IP. When i add the print using GUI i also select the driver for the printer. Is there any way out to perform this from terminal ?Adding the printer is not problem it get listed but in paused state.
 
Old 12-14-2022, 09:35 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Have you tried enabling the printer via the cupsenable utility?
 
Old 12-15-2022, 08:59 AM   #7
mickyjohn
LQ Newbie
 
Registered: Jun 2022
Posts: 16

Original Poster
Rep: Reputation: 10
Tried:
Code:
lpadmin -p P-3045DN-Ent-V2-Airprint -v socket://10.53.33.232:631 -o printer-is-shared=false  -o auth-info-required=none  -P /Library/Printers/PPDs/Contents/Resources/Kyocera\ ECOSYS\ P3045dn.ppd
Unfortunately still added printer is in Pause status and can not be use for printing.

Log says:
Code:
localhost - - [15/Dec/2022:15:36:01 +0100] "POST /printers/P-3045DN-Ent-V2-Airprint HTTP/1.1" 200 1730 Create-Job server-error-not-accepting-jobs
Further tried now: $
Code:
 lpadmin -p P-3045DN-Ent-V2-Airprint -E -v socket://10.53.33.232:631 -o printer-is-shared=false  -o auth-info-required=none  -P /Library/Printers/PPDs/Contents/Resources/Kyocera\ ECOSYS\ P3045dn.ppd
Log:
Code:
localhost - - [15/Dec/2022:14:57:54 +0100] "POST /admin/ HTTP/1.1" 401 180 Resume-Printer successful-ok
localhost - a.ahmed [15/Dec/2022:14:57:54 +0100] "POST /admin/ HTTP/1.1" 200 180 Resume-Printer successful-ok
localhost - - [15/Dec/2022:14:57:55 +0100] "POST /printers/P-3045DN-Ent-V2-Airprint HTTP/1.1" 200 1730 Create-Job server-error-not-accepting-jobs
localhost - - [15/Dec/2022:15:36:01 +0100] "POST /printers/P-3045DN-Ent-V2-Airprint HTTP/1.1" 200 1730 Create-Job server-error-not-accepting-jobs
localhost - - [15/Dec/2022:15:40:10 +0100] "POST /admin/ HTTP/1.1" 401 180 CUPS-Delete-Printer successful-ok
localhost - a.ahmed [15/Dec/2022:15:40:10 +0100] "POST /admin/ HTTP/1.1" 200 180 CUPS-Delete-Printer successful-ok
localhost - - [15/Dec/2022:15:40:48 +0100] "POST /admin/ HTTP/1.1" 401 180419 CUPS-Add-Modify-Printer successful-ok
localhost - company [15/Dec/2022:15:40:48 +0100] "POST /admin/ HTTP/1.1" 200 180419 CUPS-Add-Modify-Printer successful-ok
localhost - - [15/Dec/2022:15:41:04 +0100] "POST /printers/P-3045DN-Ent-V2-Airprint HTTP/1.1" 200 1730 Create-Job successful-ok
localhost - - [15/Dec/2022:15:41:04 +0100] "POST /printers/P-3045DN-Ent-V2-Airprint HTTP/1.1" 200 18122 Send-Document successful-ok
localhost - - [15/Dec/2022:15:41:04 +0100] "POST / HTTP/1.1" 200 347 Set-Job-Attributes successful-ok
localhost - - [15/Dec/2022:15:41:06 +0100] "POST / HTTP/1.1" 200 18006 CUPS-Get-Document successful-ok
I guess there is something missing or extra in command.
 
Old 12-16-2022, 06:17 AM   #8
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,383

Rep: Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762
Quote:
One detail was missing, the IP address is from CUPS server which has multiple printers, not directly from printer . Once one will be added sucessfully, i will add the remaining from terminal
Is the printer installed and working on the CUPS server? Is this printer connected as part of LAN or directly to the CUPS server?
 
Old 12-19-2022, 01:54 AM   #9
mickyjohn
LQ Newbie
 
Registered: Jun 2022
Posts: 16

Original Poster
Rep: Reputation: 10
yes the printer is installed and the correct way of adding dns-ssd printer using Terminal is ipp.
 
Old 10-18-2023, 03:35 PM   #10
asdem1
LQ Newbie
 
Registered: Oct 2023
Posts: 1

Rep: Reputation: 0
Solution that helped me

For those that are still struggling with this and may run accross this thread, using the -E flag worked for me in my case. It's already being used in the snippets posted in this thread, but it can be a little hard to parse if you have a squirell brain like myself and maybe didn't notice the flag being used.
 
  


Reply

Tags
cups lpd lpr laserjet, print



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
[SOLVED] My HP 2600 printer stopped printing and their isn't a printer model now in the settings? the error message says the printer is paused? sudo1 Linux - Server 6 04-02-2019 06:14 AM
HP OfficeJet 6000 Network Printer Paused th1bill Linux - Hardware 9 07-05-2012 07:37 PM
printer always shows as paused! bluebird58 SUSE / openSUSE 1 02-04-2008 02:21 PM
Paused printer Dobs01 Linux - General 3 02-23-2005 04:54 PM
lpadmin: add-printer (set device) failed: client-error-not-possible Peca Linux - Hardware 7 08-14-2004 08:30 AM

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

All times are GMT -5. The time now is 05:43 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
Open Source Consulting | Domain Registration