Error: io/hpmud/musb.c 135: unable get_string_descriptor

Asked by captwiggum

Everything installs fine. The HP PSC 1510 usb printer is detected, usb dev permissions are 666, hp-probe shows the printer, printer shows in cups and hp-toolbox, and the ink levels display fine. Printing is queued but never prints.

The errors in /var/log/messages:
Jan 13 19:59:58 lisa PSC_1500_series?serial=MY647C30Y104GG: io/hpmud/musb.c 135: unable get_string_descriptor -1: Operation not permitted
Jan 13 19:59:58 lisa PSC_1500_series?serial=MY647C30Y104GG: io/hpmud/musb.c 603: invalid product id string ret=-1
Jan 13 19:59:58 lisa PSC_1500_series?serial=MY647C30Y104GG: io/hpmud/musb.c 1057: unable to open hp:/usb/PSC_1500_series?serial=MY647C30Y104GG
Jan 13 19:59:58 lisa PSC_1500_series?serial=MY647C30Y104GG: prnt/backend/hp.c 625: INFO: open device failed; will retry in 30 seconds...

It looks like everything is running, and the requested printer name (above), and available name are the same:
root@lisa~# ps axf | grep hp
28210 26779 john less hplip.6.log
20576 1 root python /usr/share/hplip/hpssd.py
21539 21537 lp sh -c gs '-dBATCH' '-dPARANOIDSAFER' '-dQUIET' '-dNOPAUSE' '-sDEVICE=ijs' '-sIjsServer=hpijs' '-sDeviceManufacturer=HEWLETT-PACKARD' '-sDeviceModel=deskjet 5600' '-dDEVICEWIDTHPOINTS=612' '-dDEVICEHEIGHTPOINTS=792' '-dDuplex=false' '-r300' '-sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2,PS:MediaPosition=7' '-dIjsUseOutputFD' '-sOutputFile=/dev/fd/3' '/dev/fd/0' 3>&1 1>&2
21540 21539 lp gs -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer=HEWLETT-PACKARD -sDeviceModel=deskjet 5600 -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -dDuplex=false -r300 -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2,PS:MediaPosition=7 -dIjsUseOutputFD -sOutputFile=/dev/fd/3 /dev/fd/0
21541 21540 lp hpijs
21532 21440 lp hp:/usb/PSC_1500_series?serial=MY647C30Y104GG 236 root Test Page 1 job-uuid=urn:uuid:1b04ed5a-87e1-3d54-66d1-eee92f2344e6
root@lisa~#

I have spent hours reading posts on various forums about this issue, and have tried several things. Most notably:

1) In response to one suggestion, I have tweaked my udev rules to make the dev mod 666:
root@lisa~# lsusb
Bus 002 Device 003: ID 03f0:4c11 Hewlett-Packard
root@lisa~# dirl /dev/bus/usb/002
crw-rw-rw- 1 root lp 189, 130 Jan 13 20:41 003
This did not fix the problem.

2) I have tried editing /etc/cups/printers.conf to switch between two formats for device name:
# original auto-detected:
DeviceURI hp:/usb/PSC_1500_series?serial=MY647C30Y104GG
# tried this one as suggested by others. No change in problem:
# DeviceURI usb://hp/PSC_1500_series?serial=MY647C30Y104GG
This did not fix the problem.

3) I have tried printing as root. The same behavior occurred, and same

** I think the syslog messages at top are the key. Any clues most appreciated.

System: Linux/Gentoo
Package: [ebuild N ] net-print/hplip-2.7.12 USE="X ppds scanner fax -doc -minimal -parport -snmp" 14,203 kB
# uname -a
Linux lisa 2.6.23.12 #1 PREEMPT Thu Dec 20 19:59:45 EST 2007 i686 AMD Sempron(tm) Processor 3400+ AuthenticAMD GNU/Linux

root@lisa/home/john# hp-probe

HP Linux Imaging and Printing System (ver. 2.7.12)
Printer Discovery Utility ver. 4.0

Copyright (c) 2001-7 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

--------------------------
| CHOOSE CONNECTION TYPE |
--------------------------

  Num. Connection Connection Type Description
                  Type
  -------------- -------------- ----------------------------------------
  0* usb Universal Serial Bus (USB)
  1 net Network/Ethernet/Wireless (direct
                                  connection or JetDirect)
  2 par Parallel Port (LPT:)

Enter number 0...2 for connection type (q=quit, enter=usb*) ? 0

--------------------
| DEVICE DISCOVERY |
--------------------

  Device URI Model
  --------------------------------------------- ------------------
  hp:/usb/PSC_1500_series?serial=MY647C30Y104GG HP PSC 1500 series

Found 1 printer(s) on the 'usb' bus.

Question information

Language:
English Edit question
Status:
Expired
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
captwiggum (captwiggum) said :
#1

I forgot to mention, hplip 1.7.x worked fine with this system, printer, cable, etc. Its only when I upgraded to 2.7 that everything stopped working. That's why I do not think its a hardware problem. Thanks for any advice.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#2

Please run hp-check and post the output.

Thanks!

A

Revision history for this message
captwiggum (captwiggum) said :
#3

Below is my output from hp-check. Clean as a whistle.

~$ hp-check

HP Linux Imaging and Printing System (ver. 2.7.12)
Dependency/Version Check Utility ver. 12.2

Copyright (c) 2001-7 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Saving output in log file: hp-check.log

Initializing. Please wait...

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux lisa 2.6.23.12 #1 PREEMPT Thu Dec 20 19:59:45 EST 2007 i686 AMD Sempron(tm) Processor 3400+ AuthenticAMD GNU/Linux

Distribution:
gentoo 0.0

HPOJ running?
No, HPOJ is not running (OK).

Checking Python version...
OK, version 2.4.4 installed

Checking PyQt version...
OK, version 3.17 installed.

Checking SIP version...
OK, Version 4.5.2 installed

Checking for CUPS...
Status: scheduler is running
Version: 1.2.12

Checking for Reportlab...
OK, version >= 2.0

----------------
| DEPENDENCIES |
----------------

Checking for dependency: cups - Common Unix Printing System...
OK, found.

Checking for dependency: cups-devel- Common Unix Printing System development files...
OK, found.

Checking for dependency: gcc - GNU Project C and C++ Compiler...
OK, found.

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: libcrypto - OpenSSL cryptographic library...
OK, found.

Checking for dependency: libjpeg - JPEG library...
OK, found.

Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
OK, found.

Checking for dependency: libpthread - POSIX threads library...
OK, found.

Checking for dependency: libtool - Library building support services...
OK, found.

Checking for dependency: libusb - USB library...
OK, found.

Checking for dependency: make - GNU make utility to maintain groups of programs...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
OK, found.

Checking for dependency: ppdev - Parallel port support kernel module....
OK, found.

Checking for dependency: PyQt - Qt interface for Python...
OK, found.

Checking for dependency: python-devel - Python development files...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Python 2.2 or greater - Python programming language...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
OK, found.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: SANE - Scanning library development files...
OK, found.

Checking for dependency: scanimage - Shell scanning program...
OK, found.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.

----------------------
| HPLIP INSTALLATION |
----------------------

Currently installed HPLIP version...
HPLIP 2.7.12 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hpssd]
# Note: hpssd does not support dynamic ports
# Port 2207 is the IANA assigned port for hpssd
port=2207

[hplip]
version=2.7.12

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-2.7.12
icon=/usr/share/applications
cupsbackend=/usr/libexec/cups/backend
foomatic=/usr/share/foomatic

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=no
cups11-build=no
doc-build=no
shadow-build=no
foomatic-xml-install=no
foomatic-ppd-install=yes
internal-tag=2.7.12.10

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

  Device URI Model
  -------------------------------------------- ----------------------
  hp:/usb/PSC_1500_series?serial=MY647C30Y104G HP PSC 1500 series
  G

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

PSC_1500
--------
Type: Printer
Installed in HPLIP?: Yes, using the hp: CUPS backend.
Device URI: hp:/usb/PSC_1500_series?serial=MY647C30Y104GG
PPD: /etc/cups/ppd/PSC_1500.ppd
PPD Description: HP PSC 1500 Foomatic/hpijs (recommended)
Printer status: printer PSC_1500 now printing PSC_1500-237. enabled since Sun Jan 13 21:53:09 2008
Communication status: Good

----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
OK, found. SANE backend 'hpaio' is properly set up.

Checking output of 'scanimage -L'...
device `hpaio:/usb/PSC_1500_series?serial=MY647C30Y104GG' is a Hewlett-Packard PSC_1500_series all-in-one

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
OK, found.

-----------------
| USB I/O SETUP |
-----------------

Checking for permissions of USB attached printers...

HP Device 0x4c11 at 002:004:
    Device URI: hp:/usb/PSC_1500_series?serial=MY647C30Y104GG
    Device node: /dev/bus/usb/002/004
    Mode: 0664

-----------
| SUMMARY |
-----------

No errors or warnings.
~$

Revision history for this message
captwiggum (captwiggum) said :
#4

I mentioned above that hp-toolbox seems to read the ink levels successfully. It just occurred to me to check scanning on the device. The scanning works fine also:

~$ scanimage -L
device `hpaio:/usb/PSC_1500_series?serial=MY647C30Y104GG' is a Hewlett-Packard PSC_1500_series all-in-one
~$ scanimage --mode color --res 200 --format=pnm -p >t.png
Progress: 74.3%
Progress: 80.8%
Progress: 94.5%
Progress: 100.0%
~$ dirl t.png
-rw-r--r-- 1 john john 12M Jan 15 19:44 t.png

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#5

Can you run:

groups

and paste the output?

Thanks!

A

Revision history for this message
captwiggum (captwiggum) said :
#6

Thanks for the reply! Any ideas will be greatly appreciated.

john@lisa~$ groups
lp wheel audio cdrom usb plugdev games john
john@lisa~$

Also note from original post, the device mode is 666, so all can read and write it, and the same behavior occurs when printing as root.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#7

Check in the file:/etc/cups/cupsd.conf

and in the line for group change from sys to lp, and restart cups.

ie

Group sys

to

Group lp

Any chance?

A

Revision history for this message
captwiggum (captwiggum) said :
#8

There was no "Group" line in my cupsd.conf file. I added one, restarted cups but no change. If you suspect something in my cupsd.conf you can look at it here:
http://captwiggum.com/tmp/cups/cupsd.conf
Thanks again for taking the time to offer ideas.

Revision history for this message
captwiggum (captwiggum) said :
#9

I'm looking in the code, and if it triggers a thought for anyone, this is the line that fails, although I do not have the function parameter values:

io/hpmud/musb.c:
static int get_string_descriptor(usb_dev_handle *dev, int index, char *buf, size_t buflen) {
   ...
    ret = usb_control_msg(dev, USB_ENDPOINT_IN, USB_REQ_GET_DESCRIPTOR, (USB_DT_STRING << 8) + index,
            0x409, tbuf, sizeof(tbuf), LIBUSB_CONTROL_REQ_TIMEOUT);

produces the first error msg found in /var/log/messages:
Jan 13 19:59:58 lisa PSC_1500_series?serial=MY647C30Y104GG: io/hpmud/musb.c 135: unable get_string_descriptor -1: Operation not permitted

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#10

Are you using any usb hubs or anything? If so remove them and go directly into the usb port.

Also run lsusb

then you'll get an output similiar to:

Bus 002 Device 005: ID 03f0:6511 Hewlett-Packard

then run:

lsusb -v -s 002:005

where 002 is the bus id and the 005 is the device id, and thwy will be different on your system.

then post the output.

A

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#11

After looking at this again the ultimately the error: Operation not permitted
is telling us something something doesn't have the correct permissions. Although we try and support as many distros as possible because there can be so many configuration variables with Gentoo we don't fully support HPLIP on it. Although in theory it should work.

You could try looking here http://gentoo-wiki.com/HPLIP for some possible hints. Although it appears to be a little outdated.

Sorry we couldn't help more.

Aaron

Revision history for this message
captwiggum (captwiggum) said :
#12

Thank you for your time and effort. When I find a solution, I'll post it back here.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#13

That would be great! I'd love to make a Gentoo how to and your feedback would be greatly appreciated.

If you don't mind for now I'm going to set this to answered, in the future feel free to update as needed.

Thanks for your support of hplip!

Aaron

Revision history for this message
rayl (rayl) said :
#14

same thing happens to me on opensuse. try unmounting /proc/bus/usb, then edit /etc/fstab like so:

usbfs /proc/bus/usb usbfs noauto,devmode=0666 0 0

then remount. it then works fine for me. for whatever reason, i have to unmount and remount on
every reboot to fix the permissions. haven't bothered to figure out why.

Revision history for this message
captwiggum (captwiggum) said :
#15

Thank you very much for the reply Ray. I've done a lot of reading about this issue, and the USB device permissions was very prevalent. That was one of the first things I tried. My device is 0666 but that was not the problem in my case. I also note that I can scan and read ink levels fine, but can not print.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#16

Lets try setting cups to debug mode from the instructions here (issue 2):

http://hplip.sourceforge.net/troubleshooting/printing.html

View the cups log:

tail -f /var/log/cups/error_log

then try to print and paste the log. If possible paste the log to http://pastebin.org/ and then paste the link.

Sorry for the delay.

Aaron

Revision history for this message
captwiggum (captwiggum) said :
#17

Thank you for revisiting my case! It is very much appreciated. I've moved past frustration, and now its pure curiosity that drives me onward.

I have run the above test, cupsd on debug logging, and attempt a print job. You can see the full log here: http://pastebin.org/17321

But I think the crux of the matter is this line from the log:
D [29/Jan/2008:21:26:52 -0500] [Job 262] prnt/backend/hp.c 625: INFO: open device failed; will retry in 30 seconds...

But it does not list the device name. The USB device is wide open:
john@lisa~/tmp$ lsusb
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 009: ID 03f0:4c11 Hewlett-Packard
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
john@lisa~/tmp$ ls -al /dev/bus/usb/002
total 0
drwxrwxrwx 2 root john 80 Jan 29 21:11 .
drwxr-xr-x 5 root root 100 Jan 11 15:18 ..
crwxrwxrwx 1 root usb 189, 128 Jan 11 15:18 001
crwxrwxrwx 1 root lp 189, 136 Jan 29 21:11 009

udev brought it up as "rw-rw---" but the cupsd conf sets group to 'lp' just like the device, so that should have worked "as is". From cupsd.conf:
  # execute external programs with this group
  Group lp
But when that did not, I chmod'ed the device to 777, and restarted cups, and there was no change in the behavior.

The code that the log message references from hp.c is this:
   /* Open hp device. */
   while ((stat = hpmud_open_device(argv[0], ma.prt_mode, &hd)) != HPMUD_R_OK)
   {
       /* Display user error. */
       device_event(argv[0], argv[1], 5000+stat, "error", RETRY_TIMEOUT);
       BUG("INFO: open device failed; will retry in %d seconds...\n", RETRY_TIMEOUT);
       sleep(RETRY_TIMEOUT);
       retry = 1;
   }

But the log just does not display the device name. Perhaps it is the hplip device of "PSC_1500_series?serial=MY647C30Y104GG" rather than the literal usb device. I dont' know.

Any tips appreciated.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#18

If you use the cups usb backend does it print okay? You can configure this in the cups interface. (http://localhost:631/printers) You can just add a new printer, and use the usb backend, not the hp:/ backend.

A

Revision history for this message
captwiggum (captwiggum) said :
#19

Yes it works as USB backend! In other words, this works (setup with cups):

HP_PSC_1500_series_USB_1
Description: HP PSC 1500 series
Location: Local Printer
Make and Model: HP PSC 1510 Foomatic/hpijs (recommended)
Printer State: idle, accepting jobs, published.
Device URI: usb://HP/PSC%201500%20series?serial=MY647C30Y104GG

And this does NOT work (setup either with cups or hp-toolbox):

PSC_1500
Description: HP Ink Jet
Location: John's Desk
Make and Model: HP PSC 1500 Foomatic/hpijs (recommended)
Printer State: idle, accepting jobs, published.
Device URI: hp:/usb/PSC_1500_series?serial=MY647C30Y104GG

I had read that many users used this solution, and I had previously tried this by changing the device in cupsd.conf (and restarting cups of course). But at that time it did not fix it. I don't understand. This time I added the usb backend via cups, as you suggested, and it works.

Now, more interesting...

I left the previous hp:/ printer in tact. Now, hp-toolbox reads ink levels from the hp:/ printer, but can not print to it. Also, once anything accesses the hp:/ printer, such as hp-toolbox or a print attempt, then the previously working usb backend printer no longer works, with cups saying "device not connected."

To fix this state I did this:

-I deleted both printers.
-killed /usr/share/hplip/hpssd.py (which was started by hp-toolbox, in trying to access the hp:/ device)
-Added the usb backend printer again

It works now! So in other words, I can print, but can not check ink levels nor use hp-toolbox at all. Any ideas what's up with this?

Revision history for this message
captwiggum (captwiggum) said :
#20

Correction, in order to allow cups to auto-detect the new printer, so that the cups backend printer was available from the list of backends when adding the new printer, this is exactly how I added the usb backend printer which now works:

-I deleted both printers.
-killed /usr/share/hplip/hpssd.py (which was started by hp-toolbox, in trying to access the hp:/ device)
-stopped cups
-turned off the printer
-start cups
-start the printer
-wait a minute for the usb device to be recognized
-in cups, click "Administration", you will see two "news printers found", one as hplip backend, one as usb backend.
-Added the usb backend printer again

Revision history for this message
Launchpad Janitor (janitor) said :
#21

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
John Lumby (johnlumby) said :
#22

John Lumby suggests this article as an answer to your question:

http://<email address hidden>/msg03847.html

You came very close to solving it yourself : the method is :
 run lsusb and find your printer (you did) let's suppose it shows
     Bus 0WX Device 0YZ: ID ????:???? Hewlett-Packard
the usb dirname and filename 0WX and 0YZ are significant
then chmod 666 /proc/bus/usb/0WX/0YZ

FAQ #74: “Installing on Red Hat 9”.