adafruit / adafruit/Adafruit_CircuitPython_USB_Host_Mass_Storage

usb_host_mass_storage_simpletest.py take for ever, block a cp and kill tio

Open
#2 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Not sure what to report but here is what I did and observed.

I deployed `8.2.0-75-gc75640eb0` on a Feather RP2040 USB Host.
Then I added in /lib the library from:
* https://github.com/adafruit/Adafruit_CircuitPython_
* https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_Mass_Storage
And copied the simple_test from USB_Host_Mass_Storage to code.py

At that point I inserted a USB key and I started to get output, and a directory listing of the root of the USB key.
The USB key continued to blink, but there was no further output.

So at that point I took another terminal window and tried to copy over the simple_test from USB_Host_Descriptors on the Feather.
But that copy was stuck, and the prompt not coming back. The USB key was still blinking, then `tio` told me I was disconnected from the REPL. And in the other window, my cp command ended (but likely not successfully).

At that point the USB key was still blinking, but the CP board was not visible from `discotool` anymore.

I just tested a second time with a `cp CODE_OF_CONDUCT.md /media/dglaude/CIRCUITPY/` and same scenario `cp` does not end and `tio` disconnect.

I don't have many USB key (mass storage) to try, but I will try again to see if it content specific.

Some output:

```Adafruit CircuitPython 8.2.0-75-gc75640eb0 on 2023-08-14; Adafruit Feather RP2040 USB Host with rp2040
>>>
>>>
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
searching for devices
pid 0x3e00
vid 0x13fe
man
product USB DISK 2.0
serial 0701C20FB2DEE160
mounting
['.disk', 'boot', 'boot.catalog', 'casper', 'dists', 'EFI', 'install', 'md5sum.txt', 'pool', 'ubuntu', 'autorun.inf', 'autorun.ico', 'System Volume Information']

[tio 14:49:06] Disconnected
```

```
/media/dglaude/CIRCUITPY/:
boot_out.txt
code.py
lib
settings.toml
usb_host_mass_storage_simpletest.py

/media/dglaude/CIRCUITPY/lib:
adafruit_usb_host_descriptors.py
adafruit_usb_host_mass_storage.py
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the report with usb_host_mass_storage_simpletest.py on an Adafruit Feather RP2040 USB Host and a USB key. Read adafruit_usb_host_mass_storage.py and adafruit_usb_host_descriptors.py alongside the reported output, then investigate where the directory listing or a CIRCUITPY copy causes the REPL to disconnect. Done means the simple test completes and file copies no longer hang or make the board disappear from discotool.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.