mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-10-31 22:28:49 +00:00
Merge pull request #44 from ferrous-systems/linux-logs
include Linux logs as text files
This commit is contained in:
commit
a1ba8d8dd7
4 changed files with 90 additions and 5 deletions
42
advanced/linux-configured.txt
Normal file
42
advanced/linux-configured.txt
Normal file
|
@ -0,0 +1,42 @@
|
|||
INFO:usb_5 -- USB: UsbReset @ 397.15576ms
|
||||
INFO:usb_5 -- USB reset condition detected
|
||||
INFO:usb_5 -- USB: UsbEp0Setup @ 470.00122ms
|
||||
INFO:usb_5 -- EP0: GetDescriptor { descriptor: Device, length: 64 }
|
||||
INFO:dk::usbd -- EP0IN: start 18B transfer
|
||||
INFO:usb_5 -- USB: UsbEp0DataDone @ 470.306395ms
|
||||
INFO:usb_5 -- EP0IN: transfer complete
|
||||
INFO:dk::usbd -- EP0IN: transfer done
|
||||
INFO:usb_5 -- USB: UsbReset @ 520.721433ms
|
||||
INFO:usb_5 -- USB reset condition detected
|
||||
INFO:usb_5 -- USB: UsbEp0Setup @ 593.292235ms
|
||||
INFO:usb_5 -- EP0: SetAddress { address: Some(21) }
|
||||
INFO:usb_5 -- USB: UsbEp0Setup @ 609.954832ms
|
||||
INFO:usb_5 -- EP0: GetDescriptor { descriptor: Device, length: 18 }
|
||||
INFO:dk::usbd -- EP0IN: start 18B transfer
|
||||
INFO:usb_5 -- USB: UsbEp0DataDone @ 610.260008ms
|
||||
INFO:usb_5 -- EP0IN: transfer complete
|
||||
INFO:dk::usbd -- EP0IN: transfer done
|
||||
INFO:usb_5 -- USB: UsbEp0Setup @ 610.443113ms
|
||||
INFO:usb_5 -- EP0: GetDescriptor { descriptor: DeviceQualifier, length: 10 }
|
||||
WARN:usb_5 -- EP0IN: stalled
|
||||
INFO:usb_5 -- USB: UsbEp0Setup @ 610.809325ms
|
||||
INFO:usb_5 -- EP0: GetDescriptor { descriptor: DeviceQualifier, length: 10 }
|
||||
WARN:usb_5 -- EP0IN: stalled
|
||||
INFO:usb_5 -- USB: UsbEp0Setup @ 611.175535ms
|
||||
INFO:usb_5 -- EP0: GetDescriptor { descriptor: DeviceQualifier, length: 10 }
|
||||
WARN:usb_5 -- EP0IN: stalled
|
||||
INFO:usb_5 -- USB: UsbEp0Setup @ 611.511228ms
|
||||
INFO:usb_5 -- EP0: GetDescriptor { descriptor: Configuration { index: 0 }, length: 9 }
|
||||
INFO:dk::usbd -- EP0IN: start 9B transfer
|
||||
INFO:usb_5 -- USB: UsbEp0DataDone @ 611.846922ms
|
||||
INFO:usb_5 -- EP0IN: transfer complete
|
||||
INFO:dk::usbd -- EP0IN: transfer done
|
||||
INFO:usb_5 -- USB: UsbEp0Setup @ 612.030027ms
|
||||
INFO:usb_5 -- EP0: GetDescriptor { descriptor: Configuration { index: 0 }, length: 18 }
|
||||
INFO:dk::usbd -- EP0IN: start 18B transfer
|
||||
INFO:usb_5 -- USB: UsbEp0DataDone @ 612.365721ms
|
||||
INFO:usb_5 -- EP0IN: transfer complete
|
||||
INFO:dk::usbd -- EP0IN: transfer done
|
||||
INFO:usb_5 -- USB: UsbEp0Setup @ 612.640378ms
|
||||
INFO:usb_5 -- EP0: SetConfiguration { value: Some(42) }
|
||||
INFO:usb_5 -- entering the configured state
|
42
advanced/linux-enumeration.txt
Normal file
42
advanced/linux-enumeration.txt
Normal file
|
@ -0,0 +1,42 @@
|
|||
INFO:usb_4 -- USB: UsbReset @ 318.66455ms
|
||||
INFO:usb_4 -- USB reset condition detected
|
||||
INFO:usb_4 -- USB: UsbEp0Setup @ 391.418456ms
|
||||
INFO:usb_4 -- EP0: GetDescriptor { descriptor: Device, length: 64 }
|
||||
INFO:dk::usbd -- EP0IN: start 18B transfer
|
||||
INFO:usb_4 -- USB: UsbEp0DataDone @ 391.723632ms
|
||||
INFO:usb_4 -- EP0IN: transfer complete
|
||||
INFO:dk::usbd -- EP0IN: transfer done
|
||||
INFO:usb_4 -- USB: UsbReset @ 442.016601ms
|
||||
INFO:usb_4 -- USB reset condition detected
|
||||
INFO:usb_4 -- USB: UsbEp0Setup @ 514.709471ms
|
||||
INFO:usb_4 -- EP0: SetAddress { address: Some(17) }
|
||||
INFO:usb_4 -- USB: UsbEp0Setup @ 531.37207ms
|
||||
INFO:usb_4 -- EP0: GetDescriptor { descriptor: Device, length: 18 }
|
||||
INFO:dk::usbd -- EP0IN: start 18B transfer
|
||||
INFO:usb_4 -- USB: UsbEp0DataDone @ 531.646727ms
|
||||
INFO:usb_4 -- EP0IN: transfer complete
|
||||
INFO:dk::usbd -- EP0IN: transfer done
|
||||
INFO:usb_4 -- USB: UsbEp0Setup @ 531.829832ms
|
||||
INFO:usb_4 -- EP0: GetDescriptor { descriptor: DeviceQualifier, length: 10 }
|
||||
ERROR:usb_4 -- EP0IN: unexpected request; stalling the endpoint
|
||||
INFO:usb_4 -- USB: UsbEp0Setup @ 532.226562ms
|
||||
INFO:usb_4 -- EP0: GetDescriptor { descriptor: DeviceQualifier, length: 10 }
|
||||
ERROR:usb_4 -- EP0IN: unexpected request; stalling the endpoint
|
||||
INFO:usb_4 -- USB: UsbEp0Setup @ 532.592772ms
|
||||
INFO:usb_4 -- EP0: GetDescriptor { descriptor: DeviceQualifier, length: 10 }
|
||||
ERROR:usb_4 -- EP0IN: unexpected request; stalling the endpoint
|
||||
INFO:usb_4 -- USB: UsbEp0Setup @ 533.020018ms
|
||||
INFO:usb_4 -- EP0: GetDescriptor { descriptor: Configuration { index: 0 }, length: 9 }
|
||||
INFO:dk::usbd -- EP0IN: start 9B transfer
|
||||
INFO:usb_4 -- USB: UsbEp0DataDone @ 533.386228ms
|
||||
INFO:usb_4 -- EP0IN: transfer complete
|
||||
INFO:dk::usbd -- EP0IN: transfer done
|
||||
INFO:usb_4 -- USB: UsbEp0Setup @ 533.569335ms
|
||||
INFO:usb_4 -- EP0: GetDescriptor { descriptor: Configuration { index: 0 }, length: 18 }
|
||||
INFO:dk::usbd -- EP0IN: start 18B transfer
|
||||
INFO:usb_4 -- USB: UsbEp0DataDone @ 533.935546ms
|
||||
INFO:usb_4 -- EP0IN: transfer complete
|
||||
INFO:dk::usbd -- EP0IN: transfer done
|
||||
INFO:usb_4 -- USB: UsbEp0Setup @ 534.118651ms
|
||||
INFO:usb_4 -- EP0: SetConfiguration { value: Some(42) }
|
||||
ERROR:usb_4 -- EP0IN: unexpected request; stalling the endpoint
|
|
@ -91,8 +91,9 @@ INFO:usb_5 -- EP0: SetConfiguration { value: Some(42) }
|
|||
INFO:usb_5 -- entering the configured state
|
||||
```
|
||||
|
||||
These logs are from a Linux host. You can find traces for other OSes in these files (they are next to this README):
|
||||
These logs are from a Linux host. You can find traces for other OSes in these files (they are in the `advanced` folder):
|
||||
|
||||
- `linux-configured.txt` (same logs as the ones shown above)
|
||||
- `win-configured.txt`, this file only contains the logs produced by running `print-descs`
|
||||
- `macos-configured.txt`
|
||||
|
||||
|
|
|
@ -49,10 +49,11 @@ ERROR:usb_4 -- EP0IN: unexpected request; stalling the endpoint
|
|||
|
||||
Note that these logs are from a Linux host where a `SET_CONFIGURATION` request is sent after the `SET_ADDRESS` request. On other OSes you may not get that request before the bus goes idle. Also note that there are some `GET_DESCRIPTOR DeviceQualifier` requests in this case; you do not need to parse them in the `usb` crate as they'll be rejected (stalled) anyways.
|
||||
|
||||
You can find traces for other OSes in these files (they are next to this README):
|
||||
You can find traces for other OSes in these files (they are in the `advanced` folder):
|
||||
|
||||
- `win-enumeration.txt`
|
||||
- `linux-enumeration.txt` (same logs as the ones shown above)
|
||||
- `macos-enumeration.txt`
|
||||
- `win-enumeration.txt`
|
||||
|
||||
At this point you can double check that the enumeration works by running the [`usb-list` tool](#listing-usb-devices) while `usb-4.rs` is running.
|
||||
|
||||
|
@ -65,4 +66,3 @@ Bus 001 Device 016: ID 2020:0717 <- nRF52840 on the nRF52840 Development Kit
|
|||
Both the J-Link and the nRF52840 should appear in the list.
|
||||
|
||||
You can find a working solution up to this point in `src/bin/usb-4-solution.rs`. Note that the solution uses the `usb2` crate to parse SETUP packets and that crate supports parsing all standard requests.
|
||||
|
||||
|
|
Loading…
Reference in a new issue