Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nusb: retry control request on stall #54

Merged
merged 3 commits into from
Dec 5, 2024
Merged

nusb: retry control request on stall #54

merged 3 commits into from
Dec 5, 2024

Conversation

tuna-f1sh
Copy link
Owner

@tuna-f1sh tuna-f1sh commented Dec 5, 2024

I noticed 'endpoint 0x00: status 0xe0005000 (pipe stalled)' in macOS log nusb profiler. Reading docs, appear this is not unusual and one should claim_interface and clear_halt. Seems to resolve; though the messages will still be present in log as will be on second attempt.

I started digging into this due to Facedancer panicing on device side with 'usb1.USBErrorTimeout: LIBUSB_ERROR_TIMEOUT [-7]'. With --F=libusb this did not happen. Appears it is with read of Debug descriptor specifically so have added claim interface to ControlRequest on macOS for this - was not an issue on Linux.

Tools used: log | ag 'IOUSB' and Cynthion/Facedancer.

I noticed 'endpoint 0x00: status 0xe0005000 (pipe stalled)' in macOS
`log` nusb profiler. Reading docs, appear this is not unusual and one
should `claim_interface` and `clear_halt`. Seems to resolve; thought the
messages will still be present in `log` as will be on second attempt.

I started digging into this due to Facedancer panicing on device side
with 'usb1.USBErrorTimeout: LIBUSB_ERROR_TIMEOUT [-7]'. With
`--F=libusb` this did not happen. Appears it is with read of Debug
descriptor specifically so have added claim interface to
`ControlRequest` on macOS for this - was not an issue on Linux.

Tools used: `log | ag 'IOUSB'` and Cynthion/Facedancer.
@tuna-f1sh tuna-f1sh merged commit 0f0bd17 into main Dec 5, 2024
4 checks passed
@tuna-f1sh tuna-f1sh deleted the stall_retry branch December 5, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant