Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

USB connection timeouts when attempting to attach a Canon SELPHY CP1200

Open
#33 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
embedded-iot

Research direction

The issue names no files or tests; start by tracing the USB interface selection and timeout/reset path represented by USB[0] and USB[1] in the attached log. Done means the device can fall back to the second IPP-over-USB interface when the first times out, with the behavior covered by an appropriate test.

Written by the indexing model from the issue text.

Description

An example of the failure. This repeats endlessly:

04-06-2021 21:29:35:   ===============================
04-06-2021 21:29:35: + Bus 003 Device 015: added SELPHY CP1200
04-06-2021 21:29:35:   Device info:
04-06-2021 21:29:35:     Ident:         04a9-32b1-ZT15120100000091-Canon-SELPHY-CP1200
04-06-2021 21:29:35:     Manufacturer:  Canon
04-06-2021 21:29:35:     Product:       SELPHY CP1200
04-06-2021 21:29:35:     SerialNumber:  ZT15120100000091
04-06-2021 21:29:35:     MfgAndProduct: Canon SELPHY CP1200
04-06-2021 21:29:35:
04-06-2021 21:29:35:   Device quirks:
04-06-2021 21:29:35:
04-06-2021 21:29:35:   USB stack parameters
04-06-2021 21:29:35:     authorized_default:          -1
04-06-2021 21:29:35:     autosuspend:                 2
04-06-2021 21:29:35:     blinkenlights:               N
04-06-2021 21:29:35:     initial_descriptor_timeout:  5000
04-06-2021 21:29:35:     nousb:                       N
04-06-2021 21:29:35:     old_scheme_first:            N
04-06-2021 21:29:35:     quirks:
04-06-2021 21:29:35:     usbfs_memory_mb:             16
04-06-2021 21:29:35:     usbfs_snoop:                 N
04-06-2021 21:29:35:     usbfs_snoop_max:             65536
04-06-2021 21:29:35:     use_both_schemes:            Y
04-06-2021 21:29:35:
04-06-2021 21:29:35:   USB interfaces:
04-06-2021 21:29:35:     Config Interface Alt Class SubClass Proto
04-06-2021 21:29:35:        1       0      0   7      1       2
04-06-2021 21:29:35: *      1       0      1   7      1       4
04-06-2021 21:29:35:        1       1      0   255    0       0
04-06-2021 21:29:35: *      1       1      1   7      1       4
04-06-2021 21:29:35:
04-06-2021 21:29:35:   USB[0]: open: Bus 003 Device 015 Interface 0 Alt 1
04-06-2021 21:29:35:   USB[1]: open: Bus 003 Device 015 Interface 1 Alt 1
04-06-2021 21:29:35: > IPP request:
04-06-2021 21:29:35: > {
04-06-2021 21:29:35: >     VERSION 2.0
04-06-2021 21:29:35: >     OPERATION Get-Printer-Attributes
04-06-2021 21:29:35: >
04-06-2021 21:29:35: >     GROUP operation-attributes-tag
04-06-2021 21:29:35: >     ATTR "attributes-charset" charset: utf-8
04-06-2021 21:29:35: >     ATTR "attributes-natural-language" naturalLanguage: en-US
04-06-2021 21:29:35: >     ATTR "printer-uri" uri: http://localhost:60000/ipp/print
04-06-2021 21:29:35: >     ATTR "requested-attributes" keyword: all
04-06-2021 21:29:35: > }
04-06-2021 21:29:35:
04-06-2021 21:29:35: > HTTP[038]: POST http://localhost:60000/ipp/print
04-06-2021 21:29:35: > HTTP[038]: request body: got 151 bytes; closed
04-06-2021 21:29:35: > HTTP[038]: body is small (151 bytes), prefetched before sending
04-06-2021 21:29:35: > HTTP[038]: HTTP request header:
04-06-2021 21:29:35: >   POST /ipp/print HTTP/1.1
04-06-2021 21:29:35: >   Host: localhost:60000
04-06-2021 21:29:35: >   User-Agent: ipp-usb
04-06-2021 21:29:35: >   Content-Length: 151
04-06-2021 21:29:35: >   Content-Type: application/ipp
04-06-2021 21:29:35: >
04-06-2021 21:29:35:   USB[0]: connection allocated, 1 in use: a-- ---
04-06-2021 21:29:35:   HTTP[038]: connection 0 allocated
04-06-2021 21:29:35: > USB[0]: write: wanted 275 sent 275 total 275
04-06-2021 21:29:40: < USB[0]: read: wanted 4096 got 0 total 0
04-06-2021 21:29:40: ! USB[0]: recv: libusb_bulk_transfer: Operation timed out
04-06-2021 21:29:40: ! HTTP[038]: libusb_bulk_transfer: Operation timed out
04-06-2021 21:29:40:   USB[0]: connection released, 0 in use: --- ---
04-06-2021 21:29:40: ! IPP: HTTP: Post "http://localhost:60000/ipp/print": libusb_bulk_transfer: Operation timed out
04-06-2021 21:29:40: - Bus 003 Device 015: resetting SELPHY CP1200
04-06-2021 21:29:40:   USB[0]: closed
04-06-2021 21:29:40:   USB[1]: closed
04-06-2021 21:29:40: - Bus 003 Device 015: removed SELPHY CP1200

I'm using ipp-usb 0.9.19, on a Fedora 34 box.

It appears the printer exports two interface/configurations that claim to support ipp-over-usb, but ipp-usb only ever attempts to bind to the first...

EDIT: I mean to say we never attempt to use USB[1], even when USB[0] is failing. That seems like an oversight!

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

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from OpenPrinting/ipp-usb

All issues in OpenPrinting/ipp-usb

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.