LEDE/OpenWRT — Printer Setup
Getting your printer setup on your network using a LEDE/OpenWRT device is not as difficult as you might think.
Here we will run you through the steps needed to get printing over your network.
Prerequisite — USB Support
Getting your printer set up requires you to have basic USB support prior to configuring.
SSH to your LEDE/OpenWRT device
If you are using Windows then start PuTTY and click Session on the left side, select SSH from the options, and then enter in the IP Address of your LEDE/OpenWRT box into the Host Name field.
Once you’ve done this just click on Open to start up the SSH connection.
If you are connecting via terminal, then just SSH to your LEDE/OpenWRT device using the following command, where 192.168.1.1 is your LEDE/OpenWRT device’s IP address.
Before we jump into installing things we need to make sure that the needed ports will be able to be used.
So run the following command to edit your firewall configuration:
Then you will need to add the following rule into it:
option 'src' 'lan'
option 'proto' 'tcp'
option 'dest_port' '9100'
option 'target' 'ACCEPT'
Now we can get into installing support for the printer.
So run the following commands to get the packages installed:
opkg install kmod-usb-printer kmod-lp p910nd
This adds support for the USB printer device as well as a service to handle passing print jobs to your printer.
Once you’ve installed support for your printer, it is just a matter of setting up your clients (PC, laptops etc) to work with it. How to do this can vary between operating system/device, so it is best to look at your device’s documentation for how to do it.