Skip to content

CrError_Connect_TimeOut (0x8208) is reported as "Camera refused the connection" — points at camera settings instead of the USB link #39

Description

@jordlee

Symptom

A connect failure caused by a bad USB link (camera behind a USB hub) surfaced as:

Camera refused the connection (0x00008208)

0x8208 is CrError_Connect_TimeOut — the SDK timed out establishing the PTP session. "Refused" reads as the camera actively said no, which sends you to credentials, control mode, and remote-shooting settings. The real fix was plugging the camera directly into the machine instead of through the hub.

Cause

CrError_Connect_TimeOut has no case of its own and falls into default::

https://github.com/crsdk/alpha-sdk-api/blob/main/api/server/src/CameraWebController.cpp#L705-L713

The switch handles the three SSH auth codes specifically and lumps everything else under "Camera refused the connection". That default is a reasonable catch-all for genuine refusals (FailRejected, FailUnspecified), but it is actively misleading for the transport-level codes.

Impact

The most common physical failure mode — marginal USB link (hub, cable, port) — is reported as a camera-side rejection. Nothing in the message hints at the link, so diagnosis starts in the wrong place. In our case it cost a full round of config investigation before the hub was suspected.

Suggested fix

Give the transport/state codes their own cases, in the same specific style as the SSH ones:

  • CrError_Connect_TimeOut (0x8208) — name the link: "Timed out establishing the session. If the camera is on a USB hub, try a direct port; otherwise check the cable. For a network body, confirm remote shooting is enabled."
  • CrError_Connect_FailBusy (0x820A) — camera busy / another client holds the session
  • CrError_Connect_SessionAlreadyOpened (0x820D) — a session is already open

Worth a look alongside #38: both make a connect failure describe something other than what happened, and they compound — #38 hides the code entirely, this one mislabels it once it is visible.

Environment

macOS 15 (arm64), ILCE-7M5, main @ 4e1927a. Reproduced through a USB hub; resolved by connecting directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions