Monday, February 9, 2015

Using a Netgear WNDR3400 as an OpenWRT Wireless Print Server (Part 2)

This is part of a series of blog posts.
Continued from Part 1

Note: Always `opkg update` before you `opkg install.`

First, load up the correct USB modules. You'll want to make sure USB 1.1 drivers as well as USB 2.0 drivers are loaded because somethings that should be 2.0 default to 1.1 really easily and you'll get confused. Luckily we know the WNDR3400 uses the OHCI (Open Host Controller Interface) parts for USB v1.1 so you can load those easily enough.
opkg install kmod-usb-ohci
This threw an error, but it doesn't seem to hurt anything. Now you'll want to install the USB v2.0 drivers because you'll probably need them as well.
opkg install kmod-usb2
Did you like how you got an error that didn't make sense last time? Did you like getting another error that seemingly shouldn't happen?

Second, reboot your router. After the router is booted wait a minute or two then plug in your printer and run `dmesg` to look for confirmation that your router is talking to your printer. Because you waited for some amount of time your printer detection should be the last line of `dmesg.`
usb 2-1: new full-speed USB device number 2 using ohci-platform
Third, install the printer software. The p910nd printer server is ideal because it is a diskless print setup. So you don't have to worry about print jobs filling up the RAM or storage on your router. That's obviously an issue that'd quickly arrive if you print any PDF. The documentation on the subject is excessive so I'm gonna just give you the good parts.

You'll just need to install support for USB printers and the print server package.
opkg install kmod-usb-printer
opkg install p910nd
After seeing random errors from the last directions it's nice to see things run smoothly isn't it?

Fourth, reboot and make sure everything is working as expected.  Use `dmesg` again and you should find a line in there that's something like below if you did everything correctly.
usblp 2-1:1.0: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x043D pid 0x0091
Fifth, enable your printer in the p910nd config. I used `vi /etc/config/p910nd` and change the value for `option enabled` from 0 to 1. At this point you can reboot again to make sure everything is working as expected but I'm tired of all that so just restart the p910nd service with `/etc/init.d/p910nd restart` and you are ready to go.

Occasionally the p910nd doesn't completely enable it self properly. So you might need to enable it here or later or a couple times even.
/etc/init.d/p910nd enable
(Optional) Sixth, verify that your pinter works. The Print Server Documentation linked above has a bit about setting up every client that's available. It's hard to trudge through to find what you are looking for and we'll actually set it up on the Mac easier than all that later. So check if you want. I won't blame you.

Continued in Part 3

No comments:

Post a Comment