Thursday, February 7, 2008

WRTSL54GS printing Kamikaze 7.09 and HP 5550

So I've had my share of luck with getting things to work under embedded systems such as the WRTSL54GS. Its often times hit and miss, and unless you're willing to go through code, sometimes you're just stuck. Nevertheless I've been a big fan of the work people have been doing at X-WRT and OpenWRT. Here are the steps I followed to get the WRTSL54GS to work as a print server with my older HP 5550. I also tried it with my newer HP PSC 1350, but I didn't actually test printing to it, but it did show up.

NOTE:
Make sure you connect to your WRTSL54GS using a wired connection as you may have problems getting wireless to work. I have another router working as my wireless router, so that wasn't an issue with me

Step 1.
Install the newest version of x-wrt it can be found here.

Go to your WRTSL54GS website, type in 192.168.1.1 if you haven't changed any settings on your browser. Go to the last page and click update, browse for the place where you stored the file and take a break. It takes 5-10 minutes to install and reboot. Be patient.

Step 2
Configure your router.
type in 192.168.1.1 It will reset to this IP address regardless of what it was before. Use the web interface to set up your router to your hearts desire. When you first log in it will ask for a new password. Remember this as you will need this password to ssh into the router.

Step 3
SSH into router
Use your favorite program to ssh into the router. In linux the command would be

$ssh root@192.168.1.1

It will then ask for the password you set earlier. Now you have to ensure you have a connection to the internet, if you. I always try pinging google as a test


root@OpenWrt:/# ping www.google.com


Now, you actually don't need all these packages, but since you're already in the router, might as well install all the packages you need related to usb.


root@OpenWrt:/# ipkg install kmod-usb-core kmod-usb-ohci kmod-usb-uhci kmod-usb2 p910nd kmod-usb-printer


I know thats a bit long, but if you're not pressed for memory, it just works, and installs printer support.

Step 4
Configuration

Plug in your printer into the usb port. type

root@OpenWrt:/# dmesg

It should reply with something along these lines

usb 3-1.4: new full speed USB device using ehci_hcd and address 4
usb 3-1.4: configuration #1 chosen from 1 choice
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x03F0 pid 0x6004


Next we will check for the printer. Until this point I was following the excellent instructions located at the OpenWRT site

Here's where I differ, for some reason, my printer did not show up as

/dev/usb/lp0 but rather /dev/lp0
uci show p910nd

p910nd.cfg1=p910nd
p910nd.cfg1.device=/dev/usb/lp0
p910nd.cfg1.port=0
p910nd.cfg1.bidirectional=1
p910nd.cfg1.enabled=0

I simply used the command



root@OpenWrt:/# uci set p910nd.cfg1.device=/dev/lp0
root@OpenWrt:/# uci set p910nd.cfg1.enable=1
root@OpenWrt:/# uci commit p910nd
root@OpenWrt:/# /etc/init.d/p910nd enable


And I followed the instructions on adding a printer shown on the same site, under Ubuntu:

  • Start kprinter
  • Select 'Add printer'
  • Select Network printer (TCP)
  • Use 192.168.1.1 (the router's IP address) as the printer's IP
  • Fill in the port you want to use (normally defaults to 9100)
  • Pick manufacturer and model
  • Pick the recommended driver
  • Then you can new print a test page or change the settings of the printer further
After this I clicked print test page and I heard the wonderful sound of the printer spooling. Hope this is helpful to you, it was to me.

1 comment:

Anonymous said...

Great description. Especially the part about p910 and the uci settings saved my day