i've been messing around to get server printer functionality on raspbian using p910nd. Cups is a terrible overhead, and this small server is perfect for our tiny pi. My printer is a usb one, and I found that raspbian has no usblp.ko module, so no usb printer support in stock kernel (I'm using version 3.2.27+). Thus, kernel compilation is needed. To save time for those with the same kernel version and trusting me enough, here is the compiled module usblp.ko:
Code: Select all
sudo wget http://dl.dropbox.com/u/5684427/archives/usblp.ko -o /lib/modules/3.2.27+/kernel/drivers/usb/class/usblp.ko
sudo depmod -a
A great resource of information on kernel compile for rasberrypi is: http://elinux.org/Rpi_kernel_compilation#Common
Compiling in rpi is a bit of a crazy idea, evenmore because configuring a crosscompiling environment is a matter of minutes. Those are the steps I used to compile usblp module (in a amd64 squeeze host):
1- Add emdebian repository to /etc/apt/sources.list:
Code: Select all
deb http://www.emdebian.org/debian squeeze main
Code: Select all
sudo apt-get update
sudo apt-get install emdebian-archive-keyring
Code: Select all
sudo apt-get install git g++-4.4-arm-linux-gnueabi make ncurses-dev
Code: Select all
cd (It will download to user's home directory)
git clone --depth 1 git://github.com/raspberrypi/linux.git
Code: Select all
sudo zcat /proc/config.gz > config
scp config USER@SERVER:BUILDIR/.config
6-Configure kernel compilation
Code: Select all
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- oldconfig
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig
Code: Select all
Device Drivers--->USB Support--->USB Printer support
8- Do the actual compilation
Code: Select all
make -j 6 ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k
9- Install modules in local /tmp directory
Code: Select all
mkdir /tmp/modules
make ARCH=arm modules_install INSTALL_MOD_PATH=/tmp
Code: Select all
cd /tmp/lib/modules/
tar cJf - * > ~/mod.tar
Code: Select all
cd /lib/modules
sudo mv 3.2.27+ 3.2.27+.bk
sudo scp USER@SERVER:mod.tar ./
sudo tar xJf mod.tar
sudo chown -R root:root 3.2.27+
sudo rm mod.tar
Code: Select all
sudo mv /boot/kernel.img /boot/kernel.img.bk
sudo scp USER@SERVER:linux/arch/arm/boot/Image /boot/kernel.img
Code: Select all
sudo reboot
Code: Select all
sudo modprobe usblp
Code: Select all
usbcore: registered new interface driver usblp
Code: Select all
usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x04E8 pid 0x3301
15 - Install p910nd server
Code: Select all
sudo apt-get install p910nd
Code: Select all
P910ND_OPTS="-f /dev/usb/lp0"
P910ND_START=1
Code: Select all
sudo service p910nd restart
18 - To access the network printer from a linux client, you need to configure CUPS to use raspberripy printer.
For that, access the url http://localhost:631 from the client computer. There click on “Administration”, and then “Add Printer”. You will prompted for password authentication. In network printers, select “AppSocket/HP JetDirect”. Fill the address text input with the following:
Code: Select all
socket://raspberrypi:9100
19 - For windows clients, see openwrt wiki for detailled instructions:
http://wiki.openwrt.org/doc/howto/p910n ... 000xpvista
That's all. I hope you find it usefull.
Cheers.