History: my HP PS 8250 printer (usb) have been working with hplip since teh days of the port to FreeBSD. Recently I moved the printer to a new workstation. I installed hplip from ports, but hp-setup would not detect the printer. Further investigation revealed that hp-probe thinks the serial number is zero: Device URI Model --------------------------------------- ------------------------- hp:/usb/Photosmart_8200_series?serial=0 HP Photosmart 8200 series and that is wrong, because on my old workstation, it got the serial number right. I found a patch by searchin the net (see Fix section), and that got me as afr as hp-probe working correctly. hp-setup still doesn't work, ending with this error message: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed I used the cups web interface to set up my printer. Fix: A bit of searching found this thread[1] and this patch[2] by Isaac Mushinsky. His patch is backwards (it need to be added with the -R flag), but that was easily fixed, see attached patch. With this patch hp-probe reports the serial number correctly: Device URI Model ---------------------------------------------------- ------------------------- hp:/usb/Photosmart_8200_series?serial=MY61B3X1NC04KJ HP Photosmart 8200 series References: 1) http://lists.freebsd.org/pipermail/freebsd-questions/2008-March/171994.html 2) http://lists.freebsd.org/pipermail/freebsd-questions/2008-March/172250.html--kJJFhttw7ZLL1UHmqNRpYClMqySVQy6oQMmwd87RGSMeRn3x Content-Type: text/plain; name="patch-io_hpmud_musb.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-io_hpmud_musb.c" $FreeBSD$ --- io/hpmud/musb.c.orig +++ io/hpmud/musb.c @@ -121,10 +121,12 @@ { 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); - if (ret==0) + if (ret <=0 ) { - /* This retry is necessary for lj1000 and lj1005. des 12/12/07 */ - BUG("get_string_descriptor zero result, retrying..."); + /* This retry is necessary for lj1000 and lj1005. des 12/12/07 + Also HP Photosmart 42xx seems to suffer transient errors with serial id */ + BUG("get_string_descriptor error result %d, retrying in 2 secs...", ret); + sleep(2); continue; } break; How-To-Repeat: - install HPLIP from ports - attach HP PS 8250 printer via usb - try to use hp-setup or hp-probe to find the printer
Maintainer of print/hplip, Please note that PR ports/127810 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/127810 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
State Changed From-To: feedback->closed Committed, thanks!
pav 2009-03-25 16:42:56 UTC FreeBSD ports repository Modified files: print/hplip Makefile pkg-descr Added files: print/hplip/files patch-io-hpmud-musb.c Log: - Fix probing HP PS 8250 printer PR: ports/127810 Submitted by: Torfinn Ingolfsen <torfinn.ingolfsen@broadpark.no> Approved by: maintainer timeout (5 months) Revision Changes Path 1.23 +2 -1 ports/print/hplip/Makefile 1.1 +15 -0 ports/print/hplip/files/patch-io-hpmud-musb.c (new) 1.2 +1 -1 ports/print/hplip/pkg-descr _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
The patch was committed partially; the line with the if test was dropped. With the patch, scanning works fine (on my hp photosmart c6180) but with the comitted form without the if test it'll cause the errors. I do not know how it works as I tried printing the variable and found it repeats the loop when it looks to me like it shouldn't, but in the end it gets the scanner working. The print/hplip port has a different if test modification; maybe it addresses the issue in a more focused manner but I don't know driver programming to have any clue.