Corrupted IEEE1284 device ID string - 3.15.2

Bug #1422490 reported by guido
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Sahil Gupta

Bug Description

v 3.15.2 will find my scanner. scanimage -L -> device `hpaio:/usb/HP_LaserJet_3050?serial=00CNBJ231125' is a Hewlett-Packard HP_LaserJet_3050 all-in-one. But, it will not scan. scanimage -T "hangs|polls" for a few minutes & then reports no device could be opened. My own build reports no errors, neither does hp-check. If I change the pMf var declaration in is-hp() function in hpmud.c from char * pMf; to static char * pMf;, & rebuild (make ; make install), everything works PERFECTLY! After the new pMf var declaration, I added a printf("%s\n",id); to see the IEEE1284 defined string. Here it is when functioning correctly:

MFG:Hewlett-Packard;CMD:L,PML,MLC,POSTSCRIPT,PCLXL,PCL;MDL:HP P LaserJet 3050;CLS:PRINTER;DES:Hewlett-Packa LaserJet 3050EMEM:MEM=53MB;12.4.4DL:4d,4e,1;1;CMEMENT:RES=1200x1;

And here it is without the static prefix:

MFG:Hewlett-Packard;CMD:PJL,PML,MLC,POSTSCRIPT,PCLXL,PCLDL:HP P LaserJet 3050;CLS:PRINTER;DES:Hewlett-Packa LaserJet 305050EMEM:MEM=53MB;12.4.4DL:4d,4e,1;CMEMENT:RES=1200x1;

Both strings have 173 bytes/chars & have the same beginning & end. But, in between, they are different. Note the key word MDL: in the first case is NOT in the second. Without MDL:, you cannot parse the ID string to extract the model from strstr() a few lines later.

If I add another printf("%s\n",id); near the final return statement, the entire program fails again! And I see exactly the same mangled ID string. I have also tried SANE_DEBUG_HPAIO=99 SANE_DEBUG_DLL=99 scanimage & I have used the Linux debugger gdb & have not learned anything new. Once the damaged 1284 ID string is gotten, all else fails.

I have been sucessfully building all hplip versions for about 10 years & never had any problem. My latest problem free is v 3.14.6. v 3.14.10 is like 3.15.2 despite claims made in changelogs about fixing ID strings.

Placing printf(...); in a few other places can also turn on/off the correct behavior (hpaio.c, sclpml.c, ...). The original ID string comes from the libusb_control_transfer(..) call in musb.c device_id() function at line 754; note that even the functioning ID string is corrupted. COMMENT is printed as CMEMENT + a few other errors.

I have found a resolution: enable-pp-build (even though I have no such devices) allows the scanner to work. However, the IEEE1284 ID is not exactly right, but close enough to extract a model.

Even though the latest HPLIP can be made to artificially work, there is/are bug/s that need to be fixed.

guido (rds1944)
description: updated
description: updated
description: updated
guido (rds1944)
description: updated
guido (rds1944)
description: updated
Changed in hplip:
assignee: nobody → Sahil Gupta (sahilh14)
Revision history for this message
guido (rds1944) wrote :

I have rebuilt hplip using the just released 3.15.4 using my own AND the Slackware build scripts.

It now works!!!

(But, will it work in the next version?)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.