Repository navigation
Releases
Build v0.1
Switch USB Inspector
A lightweight USB inspection tool written in C using libusb 1.0. Switch USB Inspector lists USB devices visible to Linux and displays their basic descriptor information, optional string metadata, and an estimated device type.
Features
- Lists USB devices detected by Linux through libusb.
- Displays each device's Vendor ID (VID) and Product ID (PID).
- Displays the USB version, device class, and number of configurations.
- Attempts to read the manufacturer, product/model name, and serial number.
- Classifies common USB device types, such as keyboards, mice, gamepads, storage devices, printers, hubs, webcams, and wireless adapters.
- Includes special identification rules for Nintendo devices and Nintendo Switch RCM mode.
- Displays an informational notice for certain device categories about the limits of standard USB access to internal hardware information.
Note: Manufacturer, model/name, and serial-number information depends on the descriptors exposed by the device and on USB access permissions. Some fields may appear as Unknown, Model Not Exposed, or N/A.
Windows Support
Native Windows support is planned for the future. Once a native Windows version of Switch USB Inspector has been developed, it will be released in the project's Releases section.
Using Switch USB Inspector with WSL 2
If you're running Switch USB Inspector inside WSL 2, you'll need to forward your USB device from Windows to your Linux distribution using usbipd-win.
1. Install usbipd-win
Open PowerShell on Windows and run:
winget install --interactive --exact dorssel.usbipd-win2. Update WSL
wsl --updateMake sure your Linux distribution is running under WSL 2.
3. Connect your USB device
Connect your device to Windows, then open PowerShell as Administrator and list the available USB devices:
usbipd listFind the device you want to use and note its BUSID.
Share the device with WSL (replace BUSID with the actual ID):
usbipd bind --busid BUSID4. Attach the device to WSL
Keep your WSL terminal open, then run this command from a normal PowerShell window:
usbipd attach --wsl --busid BUSID5. Verify the connection
Inside your Linux distribution, install lsusb if needed.
For Debian:
sudo apt update
sudo apt install usbutilsThen list the detected USB devices:
lsusbIf your device appears in the output, WSL can see it. You can now try running Switch USB Inspector.
Important notes
- While a device is attached to WSL, Windows generally cannot use it normally.
- You may need additional USB permissions or device-specific configuration.
- USB forwarding does not guarantee that every device or protocol will work.
- When finished, detach the device from a normal PowerShell window:
usbipd detach --busid BUSIDDownload
Download the precompiled Linux x86-64 binary from the project's Releases page.
Usage
-
Download
switch-inspector-linux-v0.1-x86_64. -
Open a terminal in the directory where you saved it.
-
Make the binary executable:
chmod +x switch-inspector-linux-v0.1-x86_64
-
Run it:
./switch-inspector-linux-v0.1-x86_64
The program will list the USB devices visible to the Linux environment in which it is running.
Requirements
- Linux x86-64.
- The
libusb 1.0runtime library. - USB device access permissions.
- The binary's other required shared runtime libraries must also be available on the system.
On Debian-based distributions, install the libusb runtime library with:
sudo apt update
sudo apt install libusb-1.0-0If the program cannot access a device, check the device's permissions and your Linux USB access configuration. Running with elevated permissions may expose additional device descriptors, but should only be done when necessary.
Source Code & Open Source
Switch USB Inspector is an open-source project. You can download the source code, study how it works, modify it, build your own versions, and test your changes.
Download the Source Code
Download sourcecode.zip from the project's Releases section and extract it:
unzip sourcecode.zip
cd switch-usb-inspectorIf the extracted directory has a different name, enter that directory instead.
Build from Source
To compile the program yourself, you will need GCC, Make, pkg-config, and the libusb development files.
On Debian-based distributions, install the required dependencies:
sudo apt update
sudo apt install build-essential make pkg-config libusb-1.0-0-devBuild the project:
makeThe compiled executable will be available at:
build/switch-inspector
Run it with:
./build/switch-inspectorModify and Test
You are welcome to modify the source code, experiment with new features, fix bugs, and test your own builds.
After making changes, run make again to compile your version.
To remove the generated build files and start a fresh build:
make clean
makeNote: You are responsible for testing your modifications. Changes may introduce bugs or make the program behave differently from the official release.
License
Switch USB Inspector is distributed under the GNU General Public License v2.0 (GPL-2.0). See the project's license file for the complete license terms.
Limitations
Switch USB Inspector reads standard USB device descriptors and attempts to retrieve string descriptors when access is available. The information exposed varies by device.
- A device may not provide manufacturer, product/model, or serial-number strings.
- USB permissions may prevent the program from opening a device to read its string descriptors.
- The displayed device type is an estimate based on the USB device class and selected VID/PID rules.
- Standard USB descriptors do not provide unrestricted access to internal hardware details such as a device's CPU/GPU configuration, firmware internals, or battery status.
- Detecting a USB device does not mean that every feature or protocol of that device is supported.
Version
v0.1
Build v0.1-beta
Switch USB Inspector
A lightweight USB inspection tool written in C using libusb.
Windows Support
Windows support is planned for the future. Once a native Windows version of Switch USB Inspector has been developed, it will be released here in the project's Releases section.
Using Switch USB Inspector with WSL 2
If you're running Switch USB Inspector inside WSL 2, you'll need to forward your USB device from Windows to your Linux distribution using usbipd-win.
1. Install usbipd-win
Open PowerShell on Windows and run:
winget install --interactive --exact dorssel.usbipd-win2. Update WSL
wsl --updateMake sure your Linux distribution is running under WSL 2.
3. Connect your USB device
Connect your device to Windows, then open PowerShell as Administrator and list the available USB devices:
usbipd listFind the device you want to use and note its BUSID.
Share the device with WSL (replace BUSID with the actual ID):
usbipd bind --busid BUSID4. Attach the device to WSL
Keep your WSL terminal open, then run this command from a normal PowerShell window:
usbipd attach --wsl --busid BUSID5. Verify the connection
Inside your Linux distribution, install lsusb if needed.
For Debian:
sudo apt update
sudo apt install usbutilsThen list the detected USB devices:
lsusbIf your device appears in the output, WSL can see it. You can now try running Switch USB Inspector.
Important notes
- While a device is attached to WSL, Windows generally cannot use it normally.
- You may need additional USB permissions or device-specific configuration.
- USB forwarding does not guarantee that every device or protocol will work.
- When finished, detach the device from a normal PowerShell window:
usbipd detach --busid BUSIDFeatures
- Lists USB devices visible to Linux.
- Displays Vendor ID (VID) and Product ID (PID).
- Displays USB version, device class and configuration count.
- Supports USB devices exposed to Linux, including WSL2 with USB/IP configured.
Download
Download the precompiled binary from the project's Releases page.
Usage
-
Download
switch-inspector-linux-v0.1-beta-x86_64. -
Open a terminal in the directory where you saved it.
-
Make the binary executable:
chmod +x switch-inspector-linux-v0.1-beta-x86_64
-
Run it:
./switch-inspector-linux-v0.1-beta-x86_64
Requirements
- Linux x86-64.
- A compatible version of the libusb 1.0 runtime library.
- USB device access permissions.
On Debian, if the required runtime library is missing:
sudo apt install libusb-1.0-0Source Code & Open Source
Switch USB Inspector is an open-source project. Anyone can download the source code, study how it works, modify it, build their own versions and test their changes.
Download the Source Code
Download sourcecode.tar.gz from the project's Releases section and extract it.
tar -xzf sourcecode.tar.gz
cd switch-usb-inspectorBuild from Source
To compile the program yourself, you will need GCC, Make, pkg-config and the libusb development files.
On Debian-based distributions, install the required dependencies:
sudo apt install build-essential make pkg-config libusb-1.0-0-devBuild the project:
makeThe compiled executable will be available at:
build/switch-inspector
Run it with:
./build/switch-inspectorModify and Test
You are welcome to modify the source code, experiment with new features, fix bugs and test your own builds.
After making changes, run make again to compile your version.
To remove the generated build files and start a fresh build:
make clean
makeNote: You are responsible for testing your modifications. Changes may introduce bugs or make the program behave differently from the official release.
License
The permissions and conditions for using, modifying and redistributing this project will be defined by its open-source license.
Limitations
The program reads USB device descriptors. Firmware, battery status, serial numbers and other internal information may not be exposed by every device.
Source Code
The source code is available in this repository.
Version
v0.1-beta