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

New backend, fixes and peripherals from the Hydradancer project #95

Open
kauwua opened this issue Jun 6, 2024 · 2 comments
Open

New backend, fixes and peripherals from the Hydradancer project #95

kauwua opened this issue Jun 6, 2024 · 2 comments
Assignees
Labels
enhancement potential new feature

Comments

@kauwua
Copy link
Contributor

kauwua commented Jun 6, 2024

Hi,

Since about a year I've been working on a new Facedancer backend for boards made by Benjamin Vernoux @bvernoux. This is a R&D project I'm doing at my company @quarkslab in direct collaboration with Benjamin.

The backend is for boards based on the WCH569 chip from WCH, a RISC-V chip which supports both USB3 and USB2. The project started with two HydraUSB3 boards connected through HSPI, but we moved to a new single board that splits the USB3/USB2 on a single chip as shown in the image below (currently in prod, nearly finished). The goal is to propose a faster backend than the current Facedancer21 and GreatFET One, support USB2 High-speed and more endpoints.

Here are some characteristics and results of this backend, which I think would make it a good addition to this project:

  • supports USB2 High-speed, Full-speed and should support low-speed
  • 6 endpoints including EP0, in both IN/OUT directions simultaneously
  • endpoint numbers from 0 to 15 (but with incompatibilities, some EP numbers cannot be used together, check backend)
  • increased speed compared to Facedancer21/GreatFET One, results here https://github.com/HydraDancer/hydradancer_fw
  • support for NAKs, but also priming using handle_buffer_empty
  • tested emulation of a mouse peripheral and the included mass storage example
  • tested proxy mode with a High-speed USB key (got 1.5MB transfer rate while proxying a 1.5GB file), tested proxy mode with a Full-speed mouse
  • made the stress tests pass (both highly stressed and regular) : highly stressed crashes after a few thousand tries. This should be ok in regular use, but can explain timeouts or data corruption in highly stressed scenarios.

We published a blogpost a few weeks ago, but there have been quite a few changes to make the stress test work.

I'm proposing the following PRs from high to low priority :

Best,

@kauwua
Copy link
Contributor Author

kauwua commented Sep 6, 2024

Thank you @antoinevg for merging the Hydradancer backend !

@kauwua
Copy link
Contributor Author

kauwua commented Sep 6, 2024

I inadvertently used the logging function instead of the log function in the handle_set_interface_request method of USBInterface, this PR fixes it #116

@antoinevg antoinevg added the enhancement potential new feature label Sep 19, 2024
@antoinevg antoinevg self-assigned this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement potential new feature
Projects
None yet
Development

No branches or pull requests

2 participants