Open
Conversation
5f18514 to
589f611
Compare
Closed
request.reply() expects the bytes type.
Slower backend impementations (e.g. Raw Gadget) need some time to process the bulk OUT transfers performed in the tests and record their size. Wait for a bit before checking such transfers in tests.
Stress and Transfers tests reset the device state (including the expected endpoint transfer length) only after changing the interface altsetting (which should restart endpoint transfers with the new length). This causes a problem in the case when the backend schedules an endpoint transfer with the old transfer length before the new one gets set. Reset the device state before changing the interface altsetting.
Drop the log message printed before the Hydradancer backend checked whether the environment supports it.
The backend_name could be None, so annotate it appropriately. Co-developed-by: Andrey Konovalov <andreyknvl@gmail.com>
The device argument corresponds to the backend device that should be used when emulating USB devices, not to the device being emulated. Thus, drop the USBDevice annotation. Co-developed-by: Andrey Konovalov <andreyknvl@gmail.com>
This is the latest version of the Raw Gadget backend implementation by @akvadrako sent in greatscottgadgets#160 (with a few minor changes dropped or separated into other patches). The patch that follows contains fixes for that implementation. Co-developed-by: Andrey Konovalov <andreyknvl@gmail.com>
This patch contains assorted fixes and improvements for the implementation from greatscottgadgets#160.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a backed based on Raw Gadget. This backend allows running Facedancer on any Linux-based board with a functional USB Device Controller.
This PR is an updated version of #160 by @akvadrako with fixes from me. I kept the patches by @akvadrako separate to allow recording the contribution. (You can also find the unsqashed changes that I made here to see the patch-by-patch changes.)
From the Raw Gadget side, this is ready to be reviewed and merged. There are still a few TODOs in the implementation, but addressing those will be easier once we have the proxy fixes from #162 merged.
From the backend API side, the main question to be addressed: Since
handle_data_requested()can block when proxying, calling it fromservice_irqs()does not seem like a good option. Thus, the Raw Gadget backend spawns a separate thread for calling it. Is this OK? How do other backends handle this blocking?Running the tests with both the Dummy UDC and on a Raspberry Pi 4 (with the dwc2 UDC) works (except for occasional timeouts, but that's expected). All examples also appear to work.
Proxying does not yet work, as it requires some changes from #162 (but it does work for some devices when this PR is rebased onto #162.)
Closes #15.