HP Officejet Pro 8600 found twice with scanimage -L

Asked by Andudi

I am not sure if this problem is sane or hplip related... the sane guys are not willing to help my, thus I try it here:

I have a HP Officejet Pro 8600 with the libusb (hpaio) driver running perfectly:

root@wheezy:~# sane-find-scanner -q
found USB scanner (vendor=0x03f0 [HP], product=0x5912 [Officejet Pro 8600]) at
libusb:005:002

...but I am not happy with the fact that since I changed from lenny to wheezy, the
scanner is found twice when running scanimage -L (or even with xsane):

root@wheezy:~# scanimage -L
device `hpaio:/usb/Officejet_Pro_8600?serial=CN261BK2W705KD' is a Hewlett-
Packard Officejet_Pro_8600 all-in-one
device `hpaio:/usb/Officejet_Pro_8600?serial=CN261BK2W705KD' is a Hewlett-
Packard Officejet_Pro_8600 all-in-one

the bad thing is that xsane allways asks which one I want to use, even if
they are identical!

I am using hplip version 3.12.6-3 (debian wheezy) but even if I install the newest hplip 3.12.11 manually, the issu is the same.
sane is in version 1.0.14-9

can you please give me a tip how I can debug that kind of problem?

thanks
Andreas

Question information

Language:
English Edit question
Status:
Answered
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) said :
#1

Hi Andudi,

Thank you for reporting the issue. This issue will be fixed in next HPLIP release.

However meanwhile, please try following workaround.
1) go to hplip source directory (assuming hplip-3.12.11 is downloaded to ~/Downloads)
$ cd ~/Downloads/hplip-3.12.11

2) open io/hpmud/musb.c file
$ gedit io/hpmud/musb.c

a) change from (line no: 2034):
<----------
 int r, size=0;

 libusb_init(&ctx);
<-----------
To:
--------------->
 int r, size=0;
 int dev_already_counted = 0;

 libusb_init(&ctx);
--------------->

b) Change from (line no: 2044)
<----------
 for (i = 0; i < numdevs; i++)
 {
  dev = list[i];
<----------
To:
------------------>
 for (i = 0; i < numdevs; i++)
 {
        dev_already_counted = 0
  dev = list[i];
----------------->

c) Change from (line: 2119)
<------
  *cnt+=1;
<------
To:
------------->
              if (dev_already_counted == 0)
              {
                      *cnt+=1;
                    dev_already_counted = 1;
              }
------------->

3) run Make
$ make
$ sudo make install
or
$ su -c 'make install'

Try scanning now...

Thanks & Regards,
Amarnath

Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) said :
#2

Typo
Please read as " dev_already_counted = 0; " instead of " dev_already_counted = 0 "

Revision history for this message
Andudi (andudi) said :
#3

hei Amarnath

thank you for your answer.

hmmm... I tried your patch but it do not change the number of scanners:
root@server:~# scanimage -L
device `hpaio:/usb/Officejet_Pro_8600?serial=CN261BK2W705KD' is a Hewlett-
Packard Officejet_Pro_8600 all-in-one
device `hpaio:/usb/Officejet_Pro_8600?serial=CN261BK2W705KD' is a Hewlett-
Packard Officejet_Pro_8600 all-in-one

please find my unified diff attached, such that you can controll me!

what I am not sure is if the new installed version is really used? how can I
check that? I even tried a ./hplip-install but no change...

what else can I do to get debug informatons? I can well code in
C/python/perl/bash/... and try out things... please guide me!

Andreas

Am Dienstag, 15. Januar 2013, 10.15:52 schrieben Sie:
> Your question #218871 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/218871
>
> Amarnath Chitumalla posted a new comment:
> Typo
> Please read as " dev_already_counted = 0; " instead of " dev_already_counted
> = 0 "

Revision history for this message
Andudi (andudi) said :
#4

is there anything I can try?
- your patch do not help but I am not sure if the new installed version is
really used... how can I be sure?
- I am even not sure if this bug is in hplip since I tried the same on
debian/lenny (with an old sane version) and with the same hplip installed, I
get just one scanner... how can I find out (debuging) if sane or hplip is
buggy?

thanks
Andreas

Am Dienstag, 15. Januar 2013, 21.21:08 schrieben Sie:
> Your question #218871 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/218871
>
> Status: Answered => Open
>
> You are still having a problem:
> hei Amarnath
>
> thank you for your answer.
>
> hmmm... I tried your patch but it do not change the number of scanners:
> root@server:~# scanimage -L
> device `hpaio:/usb/Officejet_Pro_8600?serial=CN261BK2W705KD' is a Hewlett-
> Packard Officejet_Pro_8600 all-in-one
> device `hpaio:/usb/Officejet_Pro_8600?serial=CN261BK2W705KD' is a Hewlett-
> Packard Officejet_Pro_8600 all-in-one
>
> please find my unified diff attached, such that you can controll me!
>
> what I am not sure is if the new installed version is really used? how can I
> check that? I even tried a ./hplip-install but no change...
>
> what else can I do to get debug informatons? I can well code in
> C/python/perl/bash/... and try out things... please guide me!
>
> Andreas
>
> Am Dienstag, 15. Januar 2013, 10.15:52 schrieben Sie:
> > Your question #218871 on HPLIP changed:
> > https://answers.launchpad.net/hplip/+question/218871
> >
> > Amarnath Chitumalla posted a new comment:
> > Typo
> > Please read as " dev_already_counted = 0; " instead of "
> > dev_already_counted = 0 "

Revision history for this message
Andudi (andudi) said :
#5

hm, I found the problem of your patch, if I remove the b) part (reinitalizing the variable in the for loop) it works, just one scanner is found then... but of coarse, if I would have more scanners connected, I would get just the first one, and this could not be a solution for others...

I could improve the patch like testing if two following devices have the same output string (variable sz on line 2097 in orig musb.c) ... this would better filter doubletts, what do you think?

I found now the source of the problem, I added the output of lsusb -v at the end of this message. Since 4 Interface Descriptors are listed, two of them are printers! The only difference I can see is that bEndpointAddress is 8/9 resp. 10/11 ... but no idea what that mean. I allready debuged the musb.c part and found that this is really the problem.

*************************************************
Bus 001 Device 009: ID 03f0:5912 Hewlett-Packard
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x03f0 Hewlett-Packard
  idProduct 0x5912
  bcdDevice 1.00
  iManufacturer 1 HP
  iProduct 2 Officejet Pro 8600
  iSerial 3 CN261BK2W705KD
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 108
    bNumInterfaces 4
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xc0
      Self Powered
    MaxPower 2mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 3
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 204
      bInterfaceProtocol 0
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x83 EP 3 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 7
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 1
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 7 Printer
      bInterfaceSubClass 1 Printer
      bInterfaceProtocol 2 Bidirectional
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x08 EP 8 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x89 EP 9 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 2
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 8 Mass Storage
      bInterfaceSubClass 6 SCSI
      bInterfaceProtocol 80 Bulk-Only
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x04 EP 4 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x85 EP 5 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 3
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 7 Printer
      bInterfaceSubClass 1 Printer
      bInterfaceProtocol 2 Bidirectional
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x0a EP 10 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x8b EP 11 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
Device Qualifier (for other device speed):
  bLength 10
  bDescriptorType 6
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  bNumConfigurations 1
Device Status: 0x0001
  Self Powered

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

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

Revision history for this message
Sarbeswar Meher (sarbeswar-meher) said :
#7

This will be fixed in the next release hplip3.13.2

Can you help with this problem?

Provide an answer of your own, or ask Andudi for more information if necessary.

To post a message you must log in.