You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-13Lines changed: 19 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,21 +11,11 @@ The following examples have been confirmed working:
11
11
* template.py
12
12
* usbproxy.py : USB Flash Drive in USB2 High-Speed
13
13
14
-
**DISCLAIMER** : current results for the [highly-stressed stress test of Facedancer](https://github.com/greatscottgadgets/facedancer/blob/main/test/test_stress.py) with 20000 tries.
14
+
**NOTE** : current results for the [highly-stressed stress test of Facedancer](https://github.com/greatscottgadgets/facedancer/blob/main/test/test_stress.py) with 20000 tries.
15
15
16
-
The current Facedancer stress test results are the following.
17
-
* USB2 High-Speed
18
-
* bulk IN/ctrl IN : pass
19
-
* bulk OUT/ctrl OUT : fails after a few hundred/thousand tries, never reaches 20000
20
-
* USB2 Full-Speed
21
-
* bulk IN/ctrl IN : fails after a few hundred/thousand tries, never reaches 20000
22
-
* bulk OUT/ctrl OUT : fails after a few hundred/thousand tries, never reaches 20000
16
+
TLDR : the stress test usually fails after a few thousand tries in both Full-Speed and High-Speed. In practice, Hydradancer is usable (see list of devices above) but might fail in highly-stressed situations. Note that we increased the requirements for this stress test (using the highly-stressed one by default and going up to 20000 tries instead of 100)
23
17
24
-
We are currently working on fixing those issues and we have a few culprits in mind :
25
-
* missed interrupts : the main culprit for now, it puts Hydradancer in a blocked state.
26
-
* differences between HS/FS : HS has PING packets which reduces the amount of data transfers for OUT transactions. Since there are no FS examples from WCH and no indications in the datasheet, we experimented to solve this issue.
27
-
28
-
We implemented a [firmware](https://github.com/hydrausb3/wch-ch56x-lib/tree/main/tests/test_firmware_usb_stress_test) to test the USB2 implementation of `wch-ch56x-lib` with the same stress test and it passes with 100000 tries in both HS and FS. However, Hydradancer's firmware is more complex (more interrupts, USB3 and USB2 at the same time, delays to synchronize with Facedancer).
18
+
More about it [here](#stress-test-results).
29
19
30
20
# Getting started (Hydradancer dongle)
31
21
@@ -236,6 +226,22 @@ For now, the tests in hydradancer/tests consist in loop-back devices, to test fo
236
226
237
227
More information about the different scenarios can be found in [docs/Testing.md](docs/Testing.md).
238
228
229
+
## Stress-test results
230
+
231
+
The current Facedancer stress test results are the following.
232
+
* USB2 High-Speed
233
+
* bulk IN/ctrl IN : pass
234
+
* bulk OUT/ctrl OUT : fails after a few hundred/thousand tries, rarely reaches 20000
235
+
* USB2 Full-Speed
236
+
* bulk IN/ctrl IN : fails after a few hundred/thousand tries, rarely reaches 20000
237
+
* bulk OUT/ctrl OUT : fails after a few hundred/thousand tries, rarely reaches 20000
238
+
239
+
Currently Hydradancer is usable (see the list of working devices above), however data corruption or timeouts might happen in very stressed conditions. The highly stressed stress test blasts USB transfers of random size and type (control/bulk) and then verifies the integrity of the transfer using USB control transfers.
240
+
241
+
Solving this issue has proven difficult : it looks random, does not happen immediately (sometimes never). Adding logs or debugging using a USB sniffer can add additional delays and issues. Other architectures have been tried (FreeRTOS, doing all the processing in the interrupt handlers) however they proved to be slower and not more stable.
242
+
243
+
We implemented a [firmware](https://github.com/hydrausb3/wch-ch56x-lib/tree/main/tests/test_firmware_usb_stress_test) to test the USB2 implementation of `wch-ch56x-lib` with the same stress test and it passes with 100000 tries in both HS and FS. However, Hydradancer's firmware is more complex (more interrupts, USB3 and USB2 at the same time, delays to synchronize with Facedancer).
244
+
239
245
# How to contribute
240
246
241
247
If you encounter bugs or want to suggest new features, please check the existing issues and create a new issue if necessary.
0 commit comments