From 99a902fad6e62bce4c484edb21a007a51a3c4ada Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sat, 3 Aug 2019 10:46:53 +0100 Subject: Updated webusb article --- md/writeup/webusb_example.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'md/writeup') diff --git a/md/writeup/webusb_example.md b/md/writeup/webusb_example.md index 717e77b..3787ab9 100644 --- a/md/writeup/webusb_example.md +++ b/md/writeup/webusb_example.md @@ -15,7 +15,32 @@ TODO * describe initialisation phase * Describe how to send data on CH341 * Describe how to recieve data on CH341 -* sniffed usbmon traffic desctiption + +## Using example + +Source is located in [http://git.main.lv/cgit.cgi/webusb.git/tree/](http://git.main.lv/cgit.cgi/webusb.git/tree/) + +There is 2 files *index.html* and *webusb.js* both with messy code inside. +To run exmaple download files or clone git repository +``` +git clone http://git.main.lv/cgit.cgi/webusb.git +``` + +Open *index.html* and run sequence + + * Request permissions + * Open + * Claim Interface + * Config + * Set baudrate + * EP1 Out 32 + * BulkOut + +Best option is to open developers console to see logs and results of actions. +And connect to other end of serial other serial converter. Then is possible +to see output from *EP1 Out 32* input box to other device. And with BulkOut +recieve results from other device and save it to inputbox. + ## Gathering info @@ -267,6 +292,13 @@ ffff8c3203c21000 2726380480 S Co:2:022:0 s 40 9a 2518 00c3 0000 0 ffff8c3203c21000 2726380636 C Co:2:022:0 0 0 ``` +| Urb address| Timestamp | Urb Event | Transfer & Control diredtion | Bus number | Device number | Endpoint number | Urb status | Request type | Request | Value | Index | Length | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| ffff8c3203c21000 | 2726380350 | S | Co | 2 | 022 | 0 | s | 40 | 9a | 1312 | b282 | 0000 | +| ffff8c3203c21000 | 2726380459 | C | Co | 2 | 022 | 0 | 0 | 0 | | | | | +| ffff8c3203c21000 | 2726380480 | S | Co | 2 | 022 | 0 | s | 40 | 9a | 2518 | 00c3 | 0000 | +| ffff8c3203c21000 | 2726380636 | C | Co | 2 | 022 | 0 | 0 | 0 | | | | | + ## Thx [daGrevis](https://github.com/daGrevis) - gave tips about using await/async in js -- cgit v1.2.3