OpenPrinting / OpenPrinting/ipp-usb

Printing impossible after disconnect at wrong time

Open
#72 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
209
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Hi there,

I am facing an issue where printing is not possible anymore until I restart the printer. When I try to print something and disconnect the USB-connection during this process (when I see the "! USB[1]: zero-size read" log entries in the IPP-USB printer log) then sometimes the printer initialization of IPP-USB gets stuck in an endless initilization loop. Re-connecting the printer or even restarting IPP-USB does not help. Only shutting down the printer and starting it up again. I know that this is not just a problem of this one printer (HP OfficeJet 200 Mobile Series), but also for example a Brother printer acted like this.
Is there a way of getting more information about what the actual problem is? Here are my logs for this situation:

// printing process:
31-10-2023 08:38:13: ! USB[1]: zero-size read
31-10-2023 08:38:14: ! USB[0]: zero-size read
31-10-2023 08:38:14: ! USB[1]: zero-size read
31-10-2023 08:38:14: ! USB[0]: zero-size read
31-10-2023 08:38:14: ! USB[1]: zero-size read
31-10-2023 08:38:15: ! USB[1]: zero-size read
31-10-2023 08:38:15: ! USB[1]: zero-size read

// disconnecting USB (the printer still has power but is not connected anymore)
31-10-2023 08:38:16: - DNS-SD: HP OfficeJet 200 Mobile Series [17EF3C] (USB): removed
31-10-2023 08:38:16: ! HTTP[155]: read tcp 127.0.0.1:60000->127.0.0.1:44058: use of closed network connection
31-10-2023 08:38:16: ! HTTP[155]: read tcp 127.0.0.1:60000->127.0.0.1:44058: use of closed network connection
31-10-2023 08:38:16: - Bus 003 Device 011: removed OfficeJet 200 Mobile Series
31-10-2023 08:38:29: + Bus 003 Device 012: added OfficeJet 200 Mobile Series

// and the loop begins
31-10-2023 08:38:35: ! USB[0]: send: libusb_bulk_transfer: Operation timed out
31-10-2023 08:38:35: ! HTTP[158]: libusb_bulk_transfer: Operation timed out
31-10-2023 08:38:35: ! IPP: HTTP: Post "http://localhost:60000/ipp/print": libusb_bulk_transfer: Operation timed out
31-10-2023 08:38:35: - Bus 003 Device 012: resetting OfficeJet 200 Mobile Series
31-10-2023 08:38:35: - Bus 003 Device 012: removed OfficeJet 200 Mobile Series
31-10-2023 08:38:37: + Bus 003 Device 012: added OfficeJet 200 Mobile Series
31-10-2023 08:38:38: ! HTTP[160]: ipp-usb is not ready for this device
31-10-2023 08:38:38: ! HTTP[161]: ipp-usb is not ready for this device
31-10-2023 08:38:39: ! HTTP[162]: ipp-usb is not ready for this device
31-10-2023 08:38:39: ! HTTP[163]: ipp-usb is not ready for this device
31-10-2023 08:38:40: ! HTTP[164]: ipp-usb is not ready for this device
31-10-2023 08:38:40: ! HTTP[165]: ipp-usb is not ready for this device
31-10-2023 08:38:42: ! HTTP[166]: ipp-usb is not ready for this device
31-10-2023 08:38:42: ! HTTP[167]: ipp-usb is not ready for this device
31-10-2023 08:38:42: ! USB[0]: send: libusb_bulk_transfer: Operation timed out
31-10-2023 08:38:42: ! HTTP[159]: libusb_bulk_transfer: Operation timed out
31-10-2023 08:38:42: ! IPP: HTTP: Post "http://localhost:60000/ipp/print": libusb_bulk_transfer: Operation timed out
31-10-2023 08:38:42: - Bus 003 Device 012: resetting OfficeJet 200 Mobile Series
31-10-2023 08:38:43: - Bus 003 Device 012: removed OfficeJet 200 Mobile Series
31-10-2023 08:38:45: + Bus 003 Device 012: added OfficeJet 200 Mobile Series

Thank you for any help on this topic.

Regards
Lars

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named. Start by reproducing the failure while disconnecting USB during printing, then follow the USB, HTTP, and IPP log paths around the timeout and initialization loop. Done means the printer becomes usable again after reconnection without requiring a power cycle, with regression coverage for this sequence.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.