OK, I've solved one problem, found a mistake, and have encountered another problem.
I couldn't figure out why
/dev/ulpt0 wasn't being created when the printer was plugged in. Discovered why when I tried power cycling it and nothing happened. Thought it was in power saving mode all this time when in fact I'd unplugged it accidentally when moving it out to pull the parallel port cable out... :OOO
Also, I was mistaken about the printer model - it's an HL-5040. Thought it was a 5240, but must've swapped it out for another somewhere...
OK, so now FreeBSD is creating the correct device nodes, they're owned by
root:cups and have mode 660. Great - now I'll just restart cups with
/usr/local/etc/rc.d/cupsd restart and be able to add the printer, right?
Nope.
Nothing shows up under local printers. At all. The printer is connected directly to a USB port on the back of the motherboard. I was able to add a printer by selecting 'LPD/LPR Host or Printer' and putting
usb:/dev/ulpt0 as the device. Bad part about this is that it didn't work. When trying to do a test print, it says "Waiting for printer to become available."
I also tried using webmin to add the printer. It has the local printer options in a drop-down list and includes Parallel Port (even though there isn't a parallel port in the system) and Serial Port as options, but no USB.
The following is more troubleshooting.
Code:
# lpinfo -v
Password for root on localhost?
network http
network ipp
network lpd
network ipps
network socket
network https
# ls -l /usr/local/libexec/cups/backend/
total 236
lrwxr-xr-x 1 root wheel 3 Nov 11 14:18 http -> ipp
lrwxr-xr-x 1 root wheel 3 Nov 11 14:18 https -> ipp
-rwx------ 1 root wheel 57864 Nov 11 14:18 ipp
lrwxr-xr-x 1 root wheel 3 Nov 11 14:18 ipps -> ipp
-rwx------ 1 root wheel 38920 Nov 11 14:18 lpd
-r-xr-xr-x 1 root wheel 29384 Nov 11 14:18 parallel
-r-xr-xr-x 1 root wheel 29224 Nov 11 14:18 serial
-r-xr-xr-x 1 root wheel 24496 Nov 11 14:18 snmp
-r-xr-xr-x 1 root wheel 33448 Nov 11 14:18 socket
-r-xr-xr-x 1 root wheel 20256 Nov 11 14:18 usb
# /usr/local/libexec/cups/backend/usb
DEBUG: list_devices
DEBUG: usb_find_busses=1
DEBUG: usb_find_devices=8
direct usb://Brother/HL-5040%20series?serial=L3J496832 "Brother HL-5040 series" "Brother HL-5040 series" "MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:HL-5040 series;CLS:PRINTER;" ""
It looks like the CUPS USB backend can see the printer, but CUPS just can't see it's own USB backend. (???)
I've added myself to group 'cups', even though it shouldn't matter for a test page. When I cat a file to the
/dev/ulpt0 device node as root, nothing happens. When using
/dev/unlpt0, nothing happens on the printer and the console port locks up until I control-C out. Went back and confirmed that the USB option was checked in
print/cups-base, so I really don't know what else to check or try.