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

USB device removal appears to cause problems in Windows.

Open
#913 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce the failure on Windows using the MIDI example through mpremote, Reaper 7.20, and the unplug/replug sequence described in the issue. Then trace the USB disconnect and reconnect handling; done means mpremote can reacquire the COM port and Windows can restart normally after the board is unplugged while the example is running.

Written by the indexing model from the issue text.

Description

Using the midi example code run from mpremote as per the instructions
Verify that the example logs transmit events over MIDI
Connect the Cockos Reaper DAW (most recent version, 7.20) [this can be downloaded for free]
Observe that the Board USB device appears in Reaper's MIDI device list
Create a track, assigning the board USB device as the input
Verify that MIDI events are correctly received
Exit Reaper
Unplug the Pico from the USB port
Plug the Pico back into the USB port
Attempt to connect via mpremote. The COM port previously used is now marked 'in use'
Attempt to restart the computer. It will hang during restart and require power to be cycled
The current USB implementation appears to leave the device in an undetermined state. Reaper is a very mature and stable product and is highly unlikely to be the cause here. Presumably some event which ought to occur when a USB device is disconnected does not occur for the Pico, leaving resources locked and causing shutdown and port acquisition to both fail.
I do appreciate that when the Pico was unplugged the midi example code was still running but for any practical implementation this will be the case as users are accustomed to unplugging USB devices at any time.

Dominant language
Python
Stars
2.9k
Forks
1.1k
Avg merge
7d 4h
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

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 micropython/micropython-lib

All issues in micropython/micropython-lib

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.