Table of Contents
Purchased a Brother HL-L2310D
Install
- snippet.bash
echo 'net-print/cups usb -X zeroconf' >> /etc/portage/package.use/net-print echo 'net-print/cups-filters ldap zeroconf' >> /etc/portage/package.use/net-print emerge brlaser cups cups-filters ghostscript-gpl gutenprint
I also downloaded the RPM from the official page and used rpm2targz
to convert the RPM and extract all the files and then copied the ppd
to the
- snippet.bash
cp /home/user/backup/backup/hardware/brother/./opt/brother/Printers/HLL2310D/cupswrapper/brother-HLL2310D-cups-en.ppd /usr/share/ppd/cupsfilters/
Detecting
This is a USB device, plug it in and its detected by the kernel automatically and visible via lsusb
- snippet.bash
dmesg | grep -i brother -B4 -A1 [15782.837194] usb 1-9: new high-speed USB device number 13 using xhci_hcd [15782.850042] usb 1-9: New USB device found, idVendor=04f9, idProduct=009a, bcdDevice= 1.00 [15782.850043] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [15782.850044] usb 1-9: Product: HL-L2310D series [15782.850044] usb 1-9: Manufacturer: Brother [15782.850045] usb 1-9: SerialNumber: E78096L9N400161 lsusb -s 001:013 -v Bus 001 Device 013: ID 04f9:009a Brother Industries, Ltd HL-L2310D series Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x04f9 Brother Industries, Ltd idProduct 0x009a bcdDevice 1.00 iManufacturer 1 Brother iProduct 2 HL-L2310D series iSerial 3 E78096L9N400161 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0020 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceProtocol 2 Bidirectional iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 1 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0001 Self Powered
However, lpinfo
doesn't find the device…
- snippet.bash
But there is a usb backend that ships with Cups (found via `equery f cups | grep usb`) and it does find the device... /usr/libexec/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 181 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=12 DEBUG2: Printer found with device ID: MFG:Brother;CMD:PJL,HBP;MDL:HL-L2310D series;CLS:PRINTER;CID:Brother Laser Type1; Device URI: usb://Brother/HL-L2310D%20series?serial=E78096L9N400161 direct usb://Brother/HL-L2310D%20series?serial=E78096L9N400161 "Brother HL-L2310D series" "Brother HL-L2310D series" "MFG:Brother;CMD:PJL,HBP;MDL:HL-L2310D series;CLS:PRINTER;CID:Brother Laser Type1;" ""
This means we can add a new queue…
- snippet.bash
lpadmin -p Chompy -E -D "Eats up your yummy printing!" -v usb://Brother/HL-L2310D%20series?serial=E78096L9N400161 -i /usr/share/ppd/cupsfilters/brother-HLL2310D-cups-en.ppd -L "Study" -o printer-is-shared=true lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
At this point the printer is now listed in the CUPS WebUI (http://localhost:631/
) but not quite working, it lists it as being Idle - "File "/usr/libexec/cups/filter/brother_lpdwrapper_HLL2310D" not available: No such file or directory"
.
Reading the section Downloading Driver from Brother on the Brother networked printer - Gentoo Wiki page again led to insights, you need to download both the files from the Official Brother product support page.
Having extracted the RPM I had a look around and in there are the following files in there…
- snippet.bash
├── [4.0K Apr 17 21:25] ./etc │ └── [4.0K Apr 17 21:25] ./etc/opt │ └── [4.0K Apr 17 21:25] ./etc/opt/brother │ └── [4.0K Apr 17 21:25] ./etc/opt/brother/Printers │ └── [4.0K Apr 17 21:25] ./etc/opt/brother/Printers/HLL2310D │ └── [4.0K Jul 18 2017] ./etc/opt/brother/Printers/HLL2310D/inf ├── [130K Apr 18 17:36] ./hll2310dpdrv-4.0.0-1.i386.rpm ├── [124K Apr 17 21:25] ./hll2310dpdrv-4.0.0-1.i386.tar.gz ├── [4.0K Apr 17 21:25] ./opt │ └── [4.0K Apr 17 21:25] ./opt/brother │ └── [4.0K Apr 17 21:25] ./opt/brother/Printers │ └── [4.0K Apr 17 21:25] ./opt/brother/Printers/HLL2310D │ ├── [4.0K Apr 17 21:25] ./opt/brother/Printers/HLL2310D/cupswrapper │ │ ├── [ 17K Jul 18 2017] ./opt/brother/Printers/HLL2310D/cupswrapper/brother-HLL2310D-cups-en.ppd │ │ ├── [ 18K Jul 18 2017] ./opt/brother/Printers/HLL2310D/cupswrapper/Copying │ │ ├── [ 26K Jul 18 2017] ./opt/brother/Printers/HLL2310D/cupswrapper/lpdwrapper │ │ └── [7.4K Jul 18 2017] ./opt/brother/Printers/HLL2310D/cupswrapper/paperconfigml2 │ ├── [4.0K Apr 17 21:25] ./opt/brother/Printers/HLL2310D/inf │ │ ├── [ 890 Jul 18 2017] ./opt/brother/Printers/HLL2310D/inf/brHLL2310Dfunc │ │ ├── [ 167 Jul 18 2017] ./opt/brother/Printers/HLL2310D/inf/brHLL2310Drc │ │ └── [ 863 Jul 18 2017] ./opt/brother/Printers/HLL2310D/inf/setupPrintcap │ ├── [ 20K Jul 18 2017] ./opt/brother/Printers/HLL2310D/LICENSE_ENG.txt │ ├── [ 20K Jul 18 2017] ./opt/brother/Printers/HLL2310D/LICENSE_JPN.txt │ └── [4.0K Apr 17 21:25] ./opt/brother/Printers/HLL2310D/lpd │ ├── [4.0K Apr 17 21:25] ./opt/brother/Printers/HLL2310D/lpd/armv7l │ │ ├── [ 31K Jul 18 2017] ./opt/brother/Printers/HLL2310D/lpd/armv7l/brprintconflsr3 │ │ └── [ 64K Jul 18 2017] ./opt/brother/Printers/HLL2310D/lpd/armv7l/rawtobr3 │ ├── [4.0K Apr 17 21:25] ./opt/brother/Printers/HLL2310D/lpd/i686 │ │ ├── [ 28K Jul 18 2017] ./opt/brother/Printers/HLL2310D/lpd/i686/brprintconflsr3 │ │ └── [ 58K Jul 18 2017] ./opt/brother/Printers/HLL2310D/lpd/i686/rawtobr3 │ ├── [6.5K Jul 18 2017] ./opt/brother/Printers/HLL2310D/lpd/lpdfilter │ └── [4.0K Apr 17 21:25] ./opt/brother/Printers/HLL2310D/lpd/x86_64 │ ├── [ 35K Jul 18 2017] ./opt/brother/Printers/HLL2310D/lpd/x86_64/brprintconflsr3 │ └── [ 66K Jul 18 2017] ./opt/brother/Printers/HLL2310D/lpd/x86_64/rawtobr3 └── [4.0K Apr 17 21:25] ./var └── [4.0K Apr 17 21:25] ./var/spool └── [4.0K Apr 17 21:25] ./var/spool/lpd └── [4.0K Jul 18 2017] ./var/spool/lpd/HLL2310D
Ahha! This is looking promising, but careful reading of Downloading the Driver from Brother resulted in me installing the rpm directly using rpm
(which I had to install first with emerge rpm
).
- snippet.bash
emerge -av rpm rpm -i --nodeps hll2310dpdrv-4.0.0-1.i386.rpm ... lpadmin -p HLL2310D -E -v usb://dev/usb/lp0 -P /usr/share/ppd/brother/brother-HLL2310D-cups-en.ppd lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
I had a play around based on this thread and added printers manually as…
- snippet.bash
lpadmin -p Chompy -E -v usb://Brother/HL-L2310D%20series?serial=E78096L9N400161 -i /usr/share/ppd/cupsfilters/brother-HLL2310D-cups-en.ppd -L "Study" lpadmin -p Chompy2 -E -v usb://dev/usb/lp0 -P /usr/share/ppd/brother/brother-HLL2310D-cups-en.ppd -L "Study"
I added udev
rules in /etc/udev/rules.d/97-printer.rules
and one key factor was to set the GROUP:=
and MODE:=
fields (described in this thread.
- snippet.bash
KERNEL=="1-9", SUBSYSTEM=="usb", ATTR{product}=="HL-L2310D series", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d6b", ATTRS{idProduct}=="0002", SYMLINK+="usb/lp0", MODE:="0664", GROUP:="lp"
Networking
The next step was to make the printer available to other computers on the home network. This can be done through the WebUI by setting the printer as default and then under Administration > Server
checking the tick box next to Share printers connected to this system
.
Arch Linux
This required installation of CUPS package from AUR.
- snippet.bash
pacman -Syu cups git clone https://aur.archlinux.org/brother-hll2310d.git makepkg -sri
Windows
- Printer > Add Printer > Add by TCP/IP Address.
- Enter IP address and port (
631
)