micropython / micropython/micropython
USB problem on RPi pico
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 22.1k
- Forks
- 9k
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 16
Description
I have an issue with rshell that seems to be caused by the USB comms.
If I issue the command cp ports/rp2/examples/* /pyboard then rshell will hang, typically on the first file.
If I add some statements in the recv_file_from_host function in rshell (this is the part that runs on the pico) that opens a UART and logs some additional information to the UART, then the copies all succeed.
I tried adding 20 msec delays each place that there was log statement, but that doesn't seem to make things work either.
Sorry I don't have a simpler test case, but I figured I'd log the issue and see if I can create a simple program which reproduces the hang/crash.
Sometimes, things hang, and sometimes the serial port is forcibly closed (I suspect that this might be a crash on the pico side).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing cp ports/rp2/examples/* /pyboard on an RPi Pico and inspect the recv_file_from_host function in rshell. Compare the hang and forcibly closed serial-port cases, including whether logging changes the behavior. Done means the USB transfer failure is reproducible, its cause is identified, and the copy completes reliably without relying on logging or timing changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, raspberry-pi
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100