# How I got my usb printer working.

## FINITE

Ok I have compiled usb support into the kernel and compiled UHCI (intel via) as a module and added uhci-usb to modules.auto laod. I shut down the computer and plugged in the printer to the usb port and turned it on and restarted the system and booted into gentoo/kde. I checked the "information" section of the KDE control center and the usb section of information. Both USB ports are recognized and my printer shows on the right port. The name of the printer is there and it seems to be truely recognized. Where do I go from here? I tried to print but there is no device to print to. Do I need cups or maybe I need to add a module to module.autoload for cannon printers? Well I have never attempted to get usb working under linux so I need a little help here. Thanks  :Very Happy: Last edited by FINITE on Fri Jun 07, 2002 11:01 am; edited 3 times in total

----------

## FINITE

I found a driver for my printer at Linuxprinting.org. This one here bj8pa06n.upp. Apparently I can use the same driver the BJC8200 uses. How do I install the driver though so that In my KDE print manager I can set up my printer. I feel so noobed  :Very Happy: 

----------

## gsfgf

install CUPS.  Goto localhost:631. Work from there.

----------

## FINITE

Ok. I was going to assume that you had all of the kernel stuff taken care of but decided to include that in my mini-howto here to get a usb printer working in lgentoo.

First check here http://www.linuxprinting.org./printer_list.cgi to make sure there is a driver for your printer and select the correct one. If you can't find the driver you need then read no further, sorry.

If you find a driver then generate a PPD file and copy the text to file and name it whatever you want with the ".ppd" extension.

First for the kernel side of things. I personaly don't like to recompile the kernel while I am in KDE or whatever desktop environment but its up to you. Either exit x to the "runlevel 3 prompt" or open a term window and maximize it. Change directory to /usr/src/linux and run menu config (make menuconfig). Navigate down to USB and open up that catagory in the "kernel configurator" Highlight usb support and press "Y" to add that option to the kernel "proper". Still in the usb section highlight "Preliminary USB Device Filesystem" and press "Y" again on the KB. Now the next part depends on what chipset you have. If you have an Intel or VIA chiset highligh "UHCI (intel pIIx4, via)" and press "M" to add it as a lodable module. If you have another chipset then you may need to select either "UHCI Alternative" or "OHCI Device" (again they need to be added a modules). Now last but not least you need to highlight "USB printer support" and press "Y".

Exit the usb section and then the "kernel configurator" and select yes to save the new kernel. Do the standard make dep && make clean bzImage etc.. Mount you boot partition and rename the existing bzImage and copy the new one into place (cd /boot, ls to make sure the boot file got copied) and unmount the boot partition. Now run "nano -w /etc/modules.autoload" and add to this file the module to which ever module you added to the kernel. I, having a via chipset, went with UHCI (intel, via) and its module is usb-uhci (yours may be different).

So with "usb-uhci" (again yours will/may be different) added to modules.autoload, your printer hooked up and turned on, reboot the system. If you have an Nvidia video card with the accelerated drivers installed you will have to re-emerge "nvidia-kernel" (I always have to anyways) but you should see your usb-uhci module load fine. After re-emergeing nvidia-kernel (if needed) run you favorite desktop environment and browse to (or cd /dev/usb in term) /dev/usb and make sure you have the lp0 device listed there. If yes great your almost there. If no then you can try in a terminal as root "MAKEDEV lp0" it works for some but not for others. If devfs is compiled into the kernel then the device should have been created automatically (it was for me). Also apparently for some people the device is found in /dev/printer instead of /dev/usb.

So your device is created and your ready to install the driver. Make sure that cups is installed. It is on my system and I didn't put it there must have come with KDE or something. Remember that driver thing you got earlier? Move that to /usr/share/cups/model. Restart cups by running cupsd in /etc/init.d/ (in terminal cd /etc/init.d then type cupsd and hit enter). In your favorite browser type localhost:631 in the address bar and you end up at some cups browser interface of some sort. You will see a black bar accross the top of that page, click on printers. on the next page click on Add Printer. Give you printer a name and for the location type the path to the lp0 device file. In description type whatever you want and then click on continue. In the device field select usb printer #1. For model/driver select your printer modle/make and click contimue. On the next page you should see the driver you downloaded and moved to /usr/share/cups/model, select it and click continue. If all went well you should get a message that the printer was added successfully. Got to printers again and you will see your printer information with some options underneath. Click on "print test page" to make sure its working.

I hope this helps someone. It was pretty daunting for me with all of the different information and options out there. If it were not for chip_s_ahoy and his post on this I would not have gotten my printer working as fast as I did. Thanks again chips.

----------

