usb.core.find() fails
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- embedded-iot
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C
- スター
- 4.6k
- フォーク
- 1.4k
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 147
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
adafruit/circuitpython のほかの issue
-
board breaks api
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
adafruit/circuitpython#11099 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
adafruit/circuitpython#11515 ·
メンテナーはふだん 1 日以内に返信
-
Tags and Branchesオープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
adafruit/circuitpython#11514 ·
メンテナーはふだん 1 日以内に返信
-
silabs
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
adafruit/circuitpython#11507 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
circuitpython api enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
adafruit/circuitpython#11505 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
adafruit/circuitpython の issue をすべて見る
似ている issue
-
Discover carries headerEdges that nothing reads since #1914 moved E0507/E0517 to the compiler graphオープンtech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
2个显示的问题オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
coolsnowwolf/lede#14209 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
polhenarejos/pico-hsm#147 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
OpenPrinting/cups#1746 ·
メンテナーはふだん 1 日以内に返信
-
Status: Opened
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信