- A+
Introduction
Printing is an essential part of any office or household, and it's much easier to share a printer among multiple devices when it's set up as a network printer. In this article, we will explain how to set up a HP 1020 printer as a network printer on OpenWrt.
Step 1: Check Printer Compatibility
The first step is to ensure that the HP 1020 printer is compatible with your OpenWrt router. To do this, check the OpenWrt printer compatibility list to make sure it is included.
If the printer is compatible, connect it to your OpenWrt router with a USB cable. Then, check that it is detected by running the following command in the terminal:
ls /dev/usb/
Your printer should be listed as "usblp0".
Step 2: Install Printer Packages
Next, you need to install the necessary packages on your OpenWrt router to enable printing. Run the following command to install the packages:
opkg update
opkg install kmod-usb-printer cups cups-filters
The above command installs the CUPS (Common Unix Printing System) and filter packages to enable printing.
Step 3: Configure CUPS
Now that CUPS is installed, you need to configure it. First, enable and start the CUPS service by running the following commands:
/etc/init.d/cupsd enable
/etc/init.d/cupsd start
You can then access the CUPS web interface by navigating to http://your-router-IP-address:631 in your web browser.
Click on the "Administration" tab, then click on "Add Printer".
Follow the on-screen instructions to add your HP 1020 printer. You will need to select the printer driver; choose the "HP LaserJet 1020" driver.
Step 4: Print a Test Page
After adding the printer, you can print a test page to confirm that everything is working correctly. To do this, click on the "Maintenance" tab in the CUPS web interface and then click "Print Test Page".
Conclusion
Your HP 1020 printer should now be set up as a network printer on your OpenWrt router. You can print from any device connected to the same network and have access to your printer. If you encounter any issues, double-check that your printer is compatible with OpenWrt and ensure that you have installed the necessary packages and configured CUPS correctly.