# Claude Code + a Fujifilm X-T5: agent notes

Public version from AI for Mortals. Drop this file into an empty folder, open Claude Code in that folder, and it reads
these notes before it touches the camera. Educational use only, at your own risk. Fujifilm reportedly treats unlicensed
USB control as voiding the warranty: https://fujixweekly.com/2026/06/08/your-cameras-warranty-might-be-voided/

The user's camera is a Fujifilm X-T5 plugged into this Mac over a USB-C data cable. On macOS it shows up as
"USB PTP Camera" (Fujifilm vendor ID 1227). Explain what you're doing in plain English as you go; the user may not be
technical.

## Hard rules
- Back up all custom settings slots (C1-C7) before writing to any of them, and tell the user where the backup is.
- Never flash, write or install firmware on the camera. 
  If a step would change the camera's firmware, stop and ask the user first.
- Keep every file you create inside this folder.

## Camera connection modes (MENU > NETWORK/USB SETTING tab, the one after the wrench)
- USB POWER SUPPLY/COMM SETTING must be AUTO (or POWER SUPPLY OFF/COMM ON), or the port only charges.
- CONNECTION MODE:
  - USB TETHER SHOOTING AUTO: shooting, settings, live view, downloads.
  - USB RAW CONV./BACKUP RESTORE: in-camera RAW rendering, settings backup/restore, and reading the full contents of
    the custom slots (tether mode only exposes the slot names).
  - USB CARD READER: the SD card shows up as a drive, for copying photos off.
  - USB WEBCAM.
- You cannot switch the connection mode over USB. Ask the user to do it on the camera.
- Fuji manual: https://fujifilm-dsc.com/en/manual/x-t5/connections/tethere/

## Known limits (found in testing)
- Selecting a custom slot over USB only chooses which slot you read and write. It does not change the slot the camera
  shoots with. The user selects the active C slot on the camera (Q menu, or SELECT CUSTOM SETTING).
- If AUTO UPDATE CUSTOM SETTING is on, any setting you change over USB is saved into the active C slot. Back up first,
  and ask the user to turn it off before you change individual settings.
- Physical dials win over USB. To set ISO, shutter or aperture from the computer, the ISO dial must be on C, the shutter
  dial on T and the aperture ring on A.
- Setting a colour temperature can reset the white-balance shift. Write the shift last and read every value back.
- In-camera RAW conversion only accepts RAF files from this camera model.
- The camera falls asleep and drops off USB. Ask the user to wake it, or to turn auto power-off off for the session.
- Charge-only cables and some USB ports won't show the camera at all. If it doesn't appear, try another cable and port.

## macOS gotcha
macOS's own camera service (ptpcamerad / Image Capture) often grabs PTP cameras first. Stop it before talking to the
camera, and expect it to respawn.

## Known-good tools for the X-T5 (open source)
- gphoto2 / libgphoto2: X-T5 listed with capture + live view; works in USB tether mode.
  https://github.com/gphoto/libgphoto2/issues/888
- fujicli (Rust): the X-T5 is its most tested body. Film sims, backup/restore, in-camera RAW render (upload RAF,
  set conversion params, render, download). https://github.com/karaolidis/fujicli
- fujifilm-ptp-recipes: read/write C1-C7 slot values AND slot names. https://github.com/ILFforever/fujifilm-ptp-recipes
- References: https://github.com/zgrimz/fujifilm-ptp-reference (docs/07-cameras.md), https://github.com/petabyt/libfuji,
  https://github.com/po4yka/fuji-cli
- The USB protocol was tested on X-T5 firmware 4.20 to 4.31. Check the camera's firmware version first and say so if
  it's outside that range.

## What is NOT possible on the X-T5 today
- Custom firmware: FujiMod (https://fujimod.com, https://github.com/justjake/fujimod) lists the X-T5 as "Not started";
  only the X70 is fully done. Brick recovery isn't solved.
- No in-camera halation or user-made film simulations on the X-T5. Halation can be added on the computer, to photos
  pulled off the camera; say so plainly.

## Firmware (read RESEARCH-FIRMWARE-SAFETY.md first)
Before ANY firmware step, work through BACKUP-CHECKLIST.md. Installing anything other than Fuji's official firmware
has no rollback and no public recovery for the X-T5: never do it, and stop and ask the user.
For halation and bloom read HALATION-BLOOM.md.
