2858c
![]() |
|
|
|
|
|||||||
| Peripheral Hardware Stuff that plugs in via USB, FireWire, eSATA, PS/2, etc. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I am using FreeBSD 9.0 + CUPS + HPLIP + HP Deskjet F2200. I have compiled everything from ports, found my printer via the CUPS web interface, all without any obvious problems.
However, when I click "Print test page" nothing happens. Here is what /var/log/cups/error_log says: Code:
X [12/Jul/2012:15:26:18 +0200] kevent() returned Bad file descriptor E [12/Jul/2012:15:41:34 +0200] Returning IPP client-error-not-authorized for Print-Job. Code:
[system=10] add path 'unlpt*' mode 0660 group cups add path 'ulpt*' mode 0660 group cups add path 'lpt*' mode 0660 group cups add path 'usb*' mode 0770 group cups add path 'ugen*' mode 0660 group cups #the following didnt work either #add path 'usb/3.2' mode 0660 group cups I am starting cupsd and my devfs(8) ruleset at startup: Code:
#invoke local devfs rule devfs_system_ruleset="system" #start cups cupsd_enable="YES" Any help would be greatly appreciated. Last edited by SirDice; July 12th, 2012 at 15:30. Reason: Read about formatting tags: http://forums.freebsd.org/misc.php?do=bbcode |
|
#2
|
|||
|
|||
|
Oh and I should have mentioned that my /var/log/cups/access_log says:
Code:
localhost - - [12/Jul/2012:16:27:07 +0200] "POST /printers/HP_Deskjet_F2200_series HTTP/1.1" 200 464 Print-Job successful-ok Last edited by SirDice; July 12th, 2012 at 15:38. Reason: Read about formatting tags: http://forums.freebsd.org/misc.php?do=bbcode |
|
#3
|
|||
|
|||
|
I think its /usr/local/etc/cups/cupsd.conf
Code:
# Restrict access to the server... <Location /> Order allow,deny </Location> |
|
#4
|
|||
|
|||
|
Sorry, this might seem dumb, but I'm quite bad at networking:
What exactly is my subnet? % ifconfigCode:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether b0:48:7a:d0:df:c9 inet6 fe80::b248:7aff:fed0:dfc9%wlan0 prefixlen 64 scopeid 0xa inet 192.168.1.8 netmask 0xffffff00 broadcast 192.168.1.255 nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g status: associated ssid DumbDumb channel 1 (2412 MHz 11g) bssid f4:3e:61:29:8e:08 regdomain 32924 country CN indoor ecm authmode WPA2/802.11i privacy ON deftxkey UNDEF TKIP 2:128-bit txpower 20 bmiss 7 scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS wme burst roaming MANUAL Code:
# Restrict access to the admin pages... <Location /admin> Order allow,deny </Location> As soon as I work out my subnet, however, I will try what you've suggested. Thanks |
|
#5
|
||||
|
||||
|
Looking at your ifconfig(8) output your subnet is 192.168.1.0/24.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#6
|
|||
|
|||
|
Thanks for the subnet. I'll be sure to go and work out how you worked that out
![]() I've added Code:
# Restrict access to the server... <Location /> Allow 192.168.1.0/24 Order allow,deny </Location> then % /usr/local/etc/rc.d/cupsd restartAfter that, I tried once again to print a test page, but nothing. Here is what's written in /var/log/error_log: Code:
X [13/Jul/2012:11:16:32 +0200] kevent() returned Bad file descriptor |
|
#7
|
|||
|
|||
|
Is it safe to assume that you have Foomatic (Foomatic filters) installed? I can't remember if CUPS automatically installs it.
Well anyway .... try this .... See if you have a /usr/local/etc/foomatic directory. If so, take a look at the file filter.conf. Edit it to make sure that the following line is uncommented... Code:
cupsfilterpath: /usr/local/lib/cups/filter:/usr/local/lib/cups/filter:/usr/local/libexec/cups/filter:/opt/cups/filter:/usr/lib/cups/filter See if that works. If it doesn't, post your complete /usr/local/etc/cups/cupsd.conf file. |
|
#8
|
|||
|
|||
|
Might check to see that all the settings match between your computer and the printer. I have a brother all-in-one...and its set with US Letter size pages. But, when I built things from ports the first time, I didn't catch that you have to pick US Letter size in some of the configuration screens. And, my printer will just quietly accept print jobs for wrong size paper and give no indication of error.
The other possibility is that the printer is advertising capabilities it doesn't have. Since my printer is physically the same as a higher end model, but the firmware makes it the lower-end model. It stumped me that my printer was reporting that it was capable of Postscript, when it wasn't. Again, it would just quietly /dev/null things sent to its IPP/Postscript queue.... The Dreamer. |
|
#9
|
|||
|
|||
|
I have uncommented the line you mentioned, restarted cupsd, and tried again, but no luck.
And I am pretty sure my printer is capable of printing a test page. It was working under PC-BSD with HPLIP and CUPS. The /var/log/error_log syill shows: Code:
X [14/Jul/2012:15:41:00 +0200] kevent() returned Bad file descriptor Code:
ocalhost - - [14/Jul/2012:15:46:01 +0200] "POST /printers/HP_Deskjet_F2200_series HTTP/1.1" 200 464 Print-Job successful-ok Code:
#
# "$Id: cupsd.conf.in 9407 2010-12-09 21:24:51Z mike $"
#
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#
# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn
# Administrator user group...
SystemGroup wheel
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Web interface setting...
WebInterface Yes
# Restrict access to the server...
<Location />
Allow 192.168.1.0/24
Order allow,deny
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
</Location>
# Set the default printer/job policies...
<Policy default>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
# Set the authenticated printer/job policies...
<Policy authenticated>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Default
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
#
# End of "$Id: cupsd.conf.in 9407 2010-12-09 21:24:51Z mike $".
#
|
|
#10
|
|||
|
|||
|
Well, I guess since it was only listen localhost:631, the Allow 192.168.1.0/24 was unnecessary.
Though you first reported the message: Code:
E [12/Jul/2012:15:41:34 +0200] Returning IPP client-error-not-authorized for Print-Job. I think print/hplip includes print/foomatic-filters as a dependency. An HP Deskjet F2200 is USB only right? Having a hard time finding out what the specs are on it online. Personally, I'm using an HP Photosmart 8450xi...but I'm using its network interface....oh, and I'm using the HP Photosmart 7550 driver in CUPS. How do you have you're printer configured in CUPS? Also how does the printer show up? ugen or ulpt Seem to recall that it has to be ugen, which meant you couldn't use the GENERIC kernel. The Dreamer |
|
#11
|
|||
|
|||
|
Thanks for the continuing help and support! Perhaps the
Code:
Allow 192.168.1.0/24 And at the risk of creating a wave of facepalms and anger, I have to say I was told that HPLIP could be used with the GENERIC kernel on FreeBSD 9.0, and that the HPLIP documentation [which I have read, I promise!] was simply out-of-date. So yes, I am using the GENERIC kernel. I guess I'll get on and recompile my kernel then, as soon as my blood returns from my face to my fingers, that is. |
|
#12
|
|||
|
|||
|
Well, that could be the case. I don't have a USB printer handy to try at the moment. Though seems finding a new network AIO inkjet printer that'll print onto CDs is hard.
|
|
#13
|
|||
|
|||
|
Where do you get this information that you need to recompile the kernel to use an USB printer with CUPS? And what kind of changes do you need to do the kernel configuration? To me it sounds like bogus information.
|
|
#14
|
|||
|
|||
|
I have no information as to whether CUPS requires kernel modification, but I have read in many places including http://freebsd.kde.org/howtos/hplip.php that HPLIP requires such modification.
The HPLIP documentation has it somewhere, although I can't find it now. If I do, I will edit this post. There are also warning message following the installation of HPLIP. However, as I said, I am now unclear as to the accuracy of even the documentation of HPLIP. Once I connected my PC I got a message to the effect: Code:
ugen3.2: <HP> ulpt0: <HP Deskject F2280> I may be very wrong on this. |
|
#15
|
|||
|
|||
|
For HPLIP, you are correct: your printer needs to be a ugen device. The newest / newish usb stack provides multiple nodes for usb devices, to aid in scenarios where more than one driver would like to use a device. If that came with 9.0 or eometime in 8.x, I can't remember.
What happens if you do $ ls -l /dev/ugen3.2 /dev/ulpt0do they point to the same device / link?
__________________
Torfinn |
|
#16
|
|||
|
|||
|
Quote:
$ > ls -l /dev/ugen3.2 /dev/ulpt0 gives meCode:
lrwxr-xr-x 1 root wheel 9 Jul 21 12:22 /dev/ugen3.2 -> usb/3.2.0 crw-r--r-- 1 root operator 0, 164 Jul 21 12:22 /dev/ulpt0
|
|
#17
|
|||
|
|||
|
That depends. Does /dev/usb/3.2.0 point to the same device as /dev/ulpt0?
(do $ ls -l /dev/usb/3.2.0 to find out)
__________________
Torfinn |
|
#18
|
|||
|
|||
% > ls -l /dev/usb/3.2.0Code:
crw------- 1 root operator 0, 107 Jul 22 12:05 /dev/usb/3.2.0 % > ls -l /dev/ulpt0Code:
crw-r--r-- 1 root operator 0, 164 Jul 22 11:56 /dev/ulpt0 Perhaps this is opening a whole new can of worms, but here goes: Before recompiling my kernel, I thought I would try the FreeBSD handbook one more time, from the beginning, this time using LDP as the handbook suggests. I got as far as Checking Printer Communications but % lptest > /dev/ulpt0 did nothing. Neither did variants such as % cat file > /dev/ulpt0 or % lptest 20 5 | lpr etc. No printer noises, no flashing lights, nothing.Perhaps the problem is much more basic than a CUPS / HPLIP problem. Although the printer was workin fine under Windows and PC-BSD so I know the hardware is in good working order. |
|
#19
|
||||
|
||||
|
If it works with PC-BSD, just copy that configuration. It may be as simple as using the non-resetting USB device, /dev/unlpt0.
lptest(1) or any ASCII output will only print on printers that understand plain ASCII. Many do not, the vendors having chosen to use proprietary page description languages, "host-based" printers, or hardware so cost-reduced it doesn't have ROM and must have firmware downloaded by the driver before use. Some have a combination of these misfeatures. The openprinting.org website shows this printer as using LIDIL, a proprietary page description language. |
|
#20
|
|||
|
|||
|
Thank you for the continuing help. I will have to re-install PC-BSD to get a look at the config, as I failed to take note of it as I was happy that it "just worked".
I did come across that openprinting.org link early on in my printing mission, but I wasn't sure how similar that model is to mine. Similar enough I guess. Just my luck to get an HP printer that doesn't even speak PCL! You get what you pay for I guess. Does anyone know if it would be worth my time setting up LPD + HPIJS instead of CUPS + HPLIP? My printing needs are quite basic I suppose: I need to print only a few pages of PDFs; the odd black and white, line-drawn image; text documents and things like that. I am running a fairly "light" system, doing as much as possible from the command line [as the whole point of me using FreeBSD is to learn something], so I don't / won't use many / if any of the graphical aspects of CUPS + HPLIP. |
|
#21
|
||||
|
||||
|
|
|
#22
|
|||
|
|||
|
I'm going to try LPD + HPIJS + Ghostscript. I have followed both the FreeBSD Printing and the guide just posted [thank you]. Here is my /etc/printcap:
Code:
hp|lp|f2280:\
:sh:\
:sd=/var/spool/lpd/f2280:\
:lp=/dev/ulpt0:\
:mx#0:\
:lf=var/log/f2280.log:
Would I be correct in assuming for this I need the HPIJS driver? It lists my printer as supported. The requirements are listed as ghostscript9 and foomatic-filters. Is this sufficient? If so, should I add the following to my /etc/printcap? Code:
:if=/path/to/foomatic-rip:\ :af=/path/to/my/printer's/ppd:\ |
|
#23
|
||||
|
||||
|
Can't speak to the specifics (haven't used HPIJS), but yes. The if= (input filter) is a filter to render incoming data into something the printer can understand. The lf= log file entry is not required. If you leave it out, errors go to /var/log/lpd-errs, which is usually adequate.
|
|
#24
|
|||
|
|||
|
Ok so I have installed HPIJS + Ghostscript + Foomatic-Filters. Trouble is, there is no .ppd file for my printer despite the claim the my printer is supported: Supported Printers
A simple search for PPD files gives me: # find / -name \*ppd\* gives me a long list ff ppd files, but none for my printer. No 2200 series printers at all. I will perhaps try, by trial and error, to find the right PPD file, but in the meantime, does anyone know which might be best? And why mine isn't there!? Also, HPIJS helpfully told me after the install that there is a sample printcap file located in the files directory. OK, I found it and it contains the line: Code:
:if=/usr/local/etc/bin/ifhp But now I'm left with the question: Where do I reference foomatic-rip in printcap if not in the " f" part?
|
|
#25
|
||||
|
||||
|
There is a PPD for the F2200 in print/hplip. One of the IJS or HPLIP packages is the newer replacement, one is the older, I don't know which is which.
The ifhp script should handle calling the foomatic scripts. |
![]() |
| Tags |
| cups, deskjet, hplip, print, printing |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] success! if you want to boot 4OS (lion10.7.3/win7/ubuntu12.04/FreeBSD 9) | saphire | Mobile Computing | 1 | March 16th, 2012 09:55 |
| USB cups hplip | Galactic_Dominator | Peripheral Hardware | 3 | November 11th, 2010 22:43 |
| hplip and networked printers | scottro | Installation and Maintenance of FreeBSD Ports or Packages | 0 | August 15th, 2010 18:50 |
| Problem with HP Deskjet F4280 with CUPS on FreeBSD8 | threeRd | Peripheral Hardware | 1 | August 12th, 2010 03:34 |
| Success story: building a hosting business on FreeBSD | ChrisHardie | General | 1 | November 17th, 2008 18:20 |