-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HP Color LaserJet Enterprise MFP M578 issues #32
Comments
…ist Fax See #32, HP Color LaserJet Enterprise MFP M578 behaves incorrectly, when probing for /ipp/faxout, if fax unit is not present
Hi Timo, I've probably fixed /ipp/faxout issue, please retest. And please test on some fax-capable devices too, I never tried this method of fax presence detection before (based in IPP-over-USB class-specific device capabilities instead of probing), so who knows how will it work on various firmwares. Regarding Regarding timeout in Regarding requestion only the needed attributes, I prefer all attributes to be listed in the log, because it helps solving other issues without need to ask users to do something special to obtain more info. How large is response for this device, in bytes? |
P.S. The price of this device is very impressive! I see, the more expensive device is, the more likely it will have some noticeable bugs in firmware... |
Will test when I get back to the device again. Though, the device does support faxing, it just needs an optional add-on module for that. So I am not sure how the USB descriptor bit is set when the module is not present. The unit I have, does not have this module, so that's why the http GET response is likely 503 (URI recognized, support not present). Anyhow, I remember seeing this with all the "Enterprise" series devices in HP lab. So "Server: HP_Compact_Server" would be fairly good way to recognize the broken device.
Right. Then again, if the attributes requested is reduces, this does not need increasing. The maximum time I've seen is just around 5 seconds. But this device also gives the zero-size USB reads, and given how the backoff strategy works there, it also adds little likelyness for the
Yeah. I have no good ideas. I was thinking to assume the channel is reset after a long timeout. The main issue is that clean exit is not possible when device is attached with stuck channel. After receiving quit signal, it waits indefinitely for the channel to enter clean state. Perhaps the quit process should at least have some hard timeout for this? It can then USB reset the whole device because the daemon is exiting.
It was around 30 kB or so. Other HP devices gave even more (as in seveal 100kBs). It seems the "Pro" series devices support More importantly, it seems that requesting the whole set also increases the device's processing time of the request considerably (up to several seconds 3-5 seconds). Much of the bulk data comes from the printer dumping all the support paper format sizes/margins, paper types, etc. When just requesting few needed attributes the request is usually sub-second. So this would be one important place for me to reduce latency from USB cable connect to the device being usable by user. |
This is a special kind of USB descriptor; it exists only in the IPP-USB devices and indicates what device can expose via the IPP-USB interface (print/scan/web console). So I think, firmware may set it correctly, according to the actual hardware capabilities. We should test. I'm worry if some devices that actually have fax support don't set "fax" bit in the USB descriptor.
OK. I've changed
This logic actually exists in the shutdown path. If device could not be shut down within a reasonable time, USB reset is issued. I will review this code to understand why doesn't it work in your case. |
I can confirm that the IPP-USB descriptor fax bit is off in my device which does not have the module installed. Likely the commit fixes the issues mentioned, and speeds up things by avoiding a round trip. I can also confirm that the requesting only needed attributes for the printer query improves things:
|
By default, during initialization ipp-usb requests only those IPP printer attributes that it needs by itself. If this option is enabled, it will request **all** printer attributes. Normally, it should affect only logging (as returned attributes are written to log). However, some enterprise-quality HP printers are so slow in returning all attributes, so it can cause initializatio timeouts, so by default this option is disabled. See also #32 for some details on initialization timeout when all printer attributes are requested.
When a new device is added, ipp-usb performs several HTTP requests (IPP/eSCL) to obtain device parameters for DNS-SD advertising. Previously, the entire initialization process was governed by a single timeout, which placed different requests in the sequence at an unequal disadvantage. Additionally, fetching unnecessary response bodies was not covered by the timeout at all, which could cause ipp-usb to keep a failed USB interface busy indefinitely and prevent a clean shutdown (see #32 for details). The updated implementation uses individual timeouts for each HTTP request made during initialization and also includes a timeout for body reception.
Some enterprise-level HP devices, during the initialization phase (which can last several minutes), may respond with an HTTP 503 status or similar, which is expected. However, the response body may be truncated (typically, the terminating '\n' is lost). In such cases, `ipp-usb` will wait indefinitely for a response to maintain synchronization with the device. At the same time, these devices send a zero-length UDP packet at the end of the truncated output. If the zlp-recv-hack quirk is enabled, when ipp-usb receives a zero-length packet from the USB followed by a receive timeout, it interprets this combination of events as a valid termination of the response body. It works only at the initialization time and doesn't affect futher operations. See discussion under #64 for details. Related issues are #83 and #32.
If this quirk is enabled, device initialization is retried in case only part of the device's functions have been initialized (say, only the printer or only the scanner), instead of continuing to operate with incomplete functionality. It can be useful if the device takes a long time to fully initialize. During this period, some components may respond normally while others are still initializing. For example, the device may quickly report its scanning capabilities shortly after startup, while its printing functionality may take several minutes to become operational. Some enterprise-level HP printers are known to have this problem. See #64, #83 and #32 for details.
Seems that the new HP M578 has few issues that would need improvements / additional quirks:
DevInitTimeout
to 10 seconds/ipp/print
request sometimes takes long time, partly due to random delays on printer side, but partly because the response is fairly large and compression is not supported. PerhapsippGetPrinterAttributes
could be updated to request only the attributes really needed, instead of theall
which is slow to construct and generates more data than wanted./ipp/faxout
when the fax unit is not installed is broken. It will return 503 Service Unavailable, headers and the empty line to indicate end of headers. However, it never sends the empty line to indicate end of body. This triggersippGetPrinterAttributes
to exit early (from HTTP status check), and that triggers theclient has gone; draining response from USB
logic in background. However, that logic never finishes since the final newline is not received. While everything works still, this causes issues because one channel is kept allocated, and that also prevents clean shutdown ofipp-usb
when the printer is attached.Suggestions:
DevInitTimeout
slightly higherfunc (wrap *usbResponseBodyWrapper) Close()
ippGetPrinterAttributes
request only named attributes instead ofall
I will also try to reach out to the HP support on the mentioned firmware issues. And perhaps request if they could support
Content-Encoding: gzip
because that would likely speed up things over the slow USB2.0.The text was updated successfully, but these errors were encountered: