hp-clean doesn't work for HP photosmart C1410

Bug #1882193 reported by zdohnal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

Hi,

we have the report https://bugzilla.redhat.com/show_bug.cgi?id=1833308 , where the user is not able to activate a cleaning process for his HP Photosmart C1410 by hp-clean, because it ends with 'Device I/O error'.

The cause of the issue is that you use a string object length in __writeChannel() in base/device.py, but when you call write_channel() from hpmudext C extension, it works with a buffer size, which is different from a string length for string objects (I guess it contains encoding info...).

The fix is to define the object which goes to the device (in this case 'p' object in buildLIDILPacket in prnt/ldl.py when packet_type is PACKET_TYPE_RESET_LIDIL) as a bytes-like object instead of a string object - then bytes-like object length matches with buffer size.

The patch was tested by the user and it works at least for level 1 cleaning of the device (he doesn't need more).

Plus it contains the fix for better error message - generic 'Device I/O error' doesn't give to user/debugger much info about what really happened...

Would you mind adding the patch to the project? Please let me know if I should change something.

Thank you in advance and have a nice day!

Zdenek Dohnal
RHEL/Fedora/CentOS HPLIP maintainer

Revision history for this message
zdohnal (zdohnal) wrote :
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.