Suramya's Blog : Welcome to my crazy life…

December 30, 2009

Getting my HP-Deskjet F380 scanner/printer/copier working on Debian Squeeze

Filed under: Knowledgebase,Linux/Unix Related — Suramya @ 11:20 PM

I have a HP Deskjet F380 All-in-One scanner/printer/copier systems and it is a great machine. I plugged it into my system and started GIMP to scan an image from it. Within about 20 seconds of me powering on the printer I got a popup message in Gimp telling me that my HP printer is ready for use. I printed a test page and it came out fine.

Then I tried to scan an image and I got a message back from SANE that it didn’t find any devices. Checked the system log in /var/log/system and noticed the following error message in the log:

Dec 28 13:36:04 Wyrm python: io/hpmud/musb.c 136: unable get_string_descriptor -1: Operation not permitted
Dec 28 13:36:04 Wyrm python: io/hpmud/musb.c 603: invalid product id string ret=-1

Did a search on the net about the error message and in one of the forums it suggested that I run hp-check to see if I was missing any of the required files. The program gave me a list of missing dependencies that I installed. But the problem still wasn’t solved.

While searching for a solution I found a post on a forum that stated that this person was able to scan an image when running as root but not as a regular user. So I decided to try running xsane as root. When I did that the program ran successfully and detected my scanner. I was also able to scan an image without any issues.

However since its not a good idea to run programs as root, I needed a permanent fix. The same forum gave me a not so elegant but permanent solution to try.

To fix the problem run lsusb and locate the line containing your printer information. On my system the output of the command is:

Bus 002 Device 002: ID 046e:556a Behavior Tech. Computer Corp.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 009: ID 03f0:5511 Hewlett-Packard DeskJet F300 series
Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

As you can see the third line gives the the information for my Printer. Now we need to get the vendor and product ID for the printer. The first set of alphanumeric after the ID is the Vendor ID and the numbers after the ‘:’ denote the Product ID. In my case the ‘Vendor ID’ = 03f0 and the ‘Product ID’ = 5511.

Once we have that information we need to create a new file as root at ‘/etc/udev/rules.d/99-custom.rules‘ with the following content:

ATTR{idVendor}==”VendorID”, ATTR{idProduct}==”ProductID”, MODE=”0666″, GROUP=”lp”

where the ProductID and VendorID are the values we got earlier. Once you make the changes, save the file. Then you can disconnect the printer and reconnect it for the new changes to take effect and your scanner will be ready for use.

Another approach which could have worked was to add the user scanning the image to the group ‘lp’ and ‘scanner’ to give them access to the printer. Keep in mind that I haven’t really tried this approach yet

Thanks to Meson at LinuxQuestions.org for the steps to make the printer accessible to all users.

Hope this helps.

– Suramya

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress