mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-05-16 23:43:01 +00:00
23 lines
862 B
Markdown
23 lines
862 B
Markdown
|
# Listing USB Devices
|
||
|
|
||
|
In the `tools` folder you'll find `usb-list`: a minimal cross-platform version of the `lsusb` tool. Run it (`cargo run` from `tools/usb-list`) to list all USB devices.
|
||
|
|
||
|
``` console
|
||
|
$ cargo run
|
||
|
Bus 002 Device 001: ID 1d6b:0003
|
||
|
Bus 001 Device 002: ID 0cf3:e300
|
||
|
Bus 001 Device 003: ID 0c45:6713
|
||
|
Bus 001 Device 001: ID 1d6b:0002
|
||
|
```
|
||
|
|
||
|
The goal is to get the nRF52840 SoC to show in this list. The embedded application will use the vendor ID (VID) and product ID (PID) defined in `advanced/common/consts`; the `usb-list` tool will highlight the USB device that matches that VID PID pair.
|
||
|
|
||
|
``` console
|
||
|
$ # expected output
|
||
|
$ cargo run
|
||
|
Bus 002 Device 001: ID 1d6b:0003
|
||
|
Bus 001 Device 002: ID 0cf3:e300
|
||
|
Bus 001 Device 003: ID 0c45:6713
|
||
|
Bus 001 Device 001: ID 1d6b:0002
|
||
|
Bus 001 Device 059: ID 2020:0717 <- nRF52840 on the nRF52840 Development Kit
|
||
|
```
|