Skip to content

Use serial file transfer on supported firmware#537

Merged
makermelissa merged 3 commits into
circuitpython:betafrom
makermelissa-ai-assistant:issue-399-serial-files
Jul 23, 2026
Merged

Use serial file transfer on supported firmware#537
makermelissa merged 3 commits into
circuitpython:betafrom
makermelissa-ai-assistant:issue-399-serial-files

Conversation

@makermelissa-ai-assistant

@makermelissa-ai-assistant makermelissa-ai-assistant commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • feature-probe storage.unsafe_disable_usb_drive() when the USB workflow
    connects to a read-only CIRCUITPY filesystem
  • use REPL-based file transfer when the firmware can temporarily disable USB
    mass storage
  • retain the existing File System Access API folder-picker workflow as the
    fallback for older or unsupported firmware
  • restore the CIRCUITPY USB drive after a clean editor disconnect

Why

New CircuitPython firmware support from
adafruit/circuitpython#11124 allows the editor to take CIRCUITPY offline after
USB has started. This makes the filesystem writable through the REPL and
removes the folder-operation limitations of the browser File System Access API.

The capability is detected at runtime rather than inferred from the firmware
version, so existing boards and firmware continue to use the current workflow.

Closes #399.

Dependency

Uses @adafruit/circuitpython-repl-js 3.4.0, which includes the USB-drive
control helpers added by adafruit/circuitpython-repl-js#24.

Validation

  • npm run build
  • git diff --check
  • manually tested with the latest CircuitPython alpha firmware:
    CIRCUITPY disappeared during the serial editing session, REPL file operations
    worked, and the drive returned after disconnecting

@makermelissa

Copy link
Copy Markdown
Collaborator

While it tests functionally, we're going to move some of this code over to https://github.com/adafruit/circuitpython-repl-js

@makermelissa makermelissa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and working.

@makermelissa
makermelissa merged commit af6b10c into circuitpython:beta Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants