usb.core.find() fails
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- embedded-iot
Direzione di ricerca
Start with the usb.core.find(find_all=True) call in the reproduction and compare its behavior on the listed working and failing CircuitPython builds for the Feather RP2040 USB Host. The issue also points to examples/usb_host_midi_simpletest_rp2040usbfeather.py as related context. Done means the call returns attached devices on the failing builds, including the SanDisk drive and other USB devices mentioned.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
CircuitPython version and board name
Adafruit CircuitPython 10.3.0-alpha.3-22-gdb82b25b4d on 2026-07-10; Adafruit Feather RP2040 USB Host with rp2040
Code/REPL
# List all attached USB devices (probably only one).
# For "Adafruit Feather RP2040 with USB Type A Host" device.
# Based (loosely) on examples/usb_host_midi_simpletest_rp2040usbfeather.py
import usb.core
import time
print("Looking for all USB devices...")
while True:
devices = usb.core.find(find_all=True)
if devices is None:
print("No devices")
else:
n = 0
print(f"Iterating on {devices=}....")
for device in devices:
n += 1
print(f"\t#{n}: {device=}")
try:
print(f"\t**** Found vendor:product {hex(device.idVendor)}:{hex(device.idProduct)}")
except Exception as e:
print(e)
continue
print(" Sleeping...")
time.sleep(1)
Behavior
**** Typical successful output:
soft reboot
code.py output:
Looking for all USB devices...
Iterating on devices=<USBDevices>....
#1: device=<Device>
**** Found vendor:product 0x781:0x5581
Sleeping...
Iterating on devices=<USBDevices>....
#1: device=<Device>
**** Found vendor:product 0x781:0x5581
Sleeping...
Traceback (most recent call last):
File "code.py", line 9, in <module>
File "usb_host_lsusb.py", line 27, in <module>
KeyboardInterrupt:
Code done running.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 10.3.0-alpha.3-13-gbaa3ca8650 on 2026-07-07; Adafruit Feather RP2040 USB Host with rp2040
>>>
**** Typical failure output:
soft reboot
code.py output:
Looking for all USB devices...
Iterating on devices=<USBDevices>....
Sleeping...
Iterating on devices=<USBDevices>....
Sleeping...
Iterating on devices=<USBDevices>....
Sleeping...
Traceback (most recent call last):
File "code.py", line 9, in <module>
File "usb_host_lsusb.py", line 27, in <module>
KeyboardInterrupt:
Code done running.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 10.3.0-alpha.3-22-gdb82b25b4d on 2026-07-10; Adafruit Feather RP2040 USB Host with rp2040
>>>
Description
Problem: usb.core.find(find_all=True) returns an empty generator even when something's plugged into the USB A port.
Additional information
This code stopped working with build
CircuitPython 10.3.0-alpha.3-22-gdb82b25b4d on 2026-07-10 (adafruit-circuitpython-adafruit_feather_rp2040_usb_host-en_US-20260710-main-PR11093-db82b25.uf2)
which was supposed to address a previously-reported issue with some MIDI keyboards. Now the issue happens with all USB devices (a SanDisk USB stick was used for testing, as well as other USB devices).
**** Fails on these builds (the one purporting to fix it, as well as the latest build available):
Adafruit CircuitPython 10.3.0-alpha.3-22-gdb82b25b4d on 2026-07-10; Adafruit Feather RP2040 USB Host with rp2040
Adafruit CircuitPython 10.3.0-alpha.3-25-g242fe31782 on 2026-07-13; Adafruit Feather RP2040 USB Host with rp2040
**** Succeeds on these builds (the one before the purported fix, and the latest alpha):
Adafruit CircuitPython 10.3.0-alpha.3 on 2026-06-24; Adafruit Feather RP2040 USB Host with rp2040
Adafruit CircuitPython 10.3.0-alpha.3-13-gbaa3ca8650 on 2026-07-07; Adafruit Feather RP2040 USB Host with rp2040
- Lingua principale
- C
- Stelle
- 4.6k
- Fork
- 1.4k
- Merge medio
- 1g 8h
- PR unite (30g)
- 155
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di adafruit/circuitpython
-
board breaks api
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
adafruit/circuitpython#11099 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
storage usb zephyr
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
adafruit/circuitpython#11531 ·
I maintainer di solito rispondono entro 1 giorno
-
Move silabs to ZephyrApertasilabs
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
adafruit/circuitpython#11507 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Feature/API request: portable camera capture across ESP-IDF, Zephyr, and parallel interfacesForse già presa @tannewt l’ha presa oggi. Apertacircuitpython api displayio enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
adafruit/circuitpython#11505 · 5 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
adafruit/circuitpython#11472 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di adafruit/circuitpython
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Policy query leaks host primary block (BSL_PrimaryBlock_deinit skipped) on two early-exit pathsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NASA-AMMOS/BSL#355 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
arancormonk/dsd-neo#660 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: remote-ls --updates reports up-to-date OCI refs because it ignores deployed Alt-idForse già presa @Joao-kouznetz l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
#242 leftovers: dated narrative and shas in the social-features test planForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
EchoTools/nevr-runtime#264 ·
I maintainer di solito rispondono entro 1 giorno