While your Python script using the wmi library can identify the TEMPerHUM device by its device ID, it's not the right tool for reading data from it. The wmi library is for managing and querying Windows system information, not for communicating directly with USB devices to read their data streams. That's why you're able to find the device but not read from it. The "no backend available" error you encountered with other libraries like pyusb and libusb is a common issue on Windows, often caused by a missing or improperly installed backend driver. These libraries need a specific low-level driver (like libusb-win32 or Zadig) to function correctly on Windows.
Solutions
1. Using libusb and pyusb with Zadig 💻
The most reliable way to read data from a USB device on Windows is to use pyusb with a compatible backend driver. The Zadig utility is a popular choice for this. It replaces the default Windows driver for a specific USB device with a generic one (like libusb-win32 or WinUSB) that pyusb can communicate with.
Step 1: Download and run Zadig.
Step 2: Plug in your TEMPerHUM device.
Step 3: In Zadig, go to Options -> List All Devices.
Step 4: Select your TEMPerHUM device from the dropdown list. The device's vendor ID (VID) and product ID (PID) will help you identify it. You've already identified them in your script: 10C4 (the UART bridge) and 3553.
Step 5: Select a driver to install. libusb-win32 is a good choice for pyusb.
Step 6: Click "Replace Driver" or "Install Driver."
After this, pyusb should be able to find and communicate with the device.
2. Using a Specific Library for the UART Chip ⚙️
Your script correctly identified a 10C4 device, which is a common vendor ID for Silicon Labs (SiLabs). This often indicates the presence of a CP210x USB-to-UART bridge chip, which the TEMPerHUM device uses to communicate. Instead of using a generic USB library, you may have more success using a library designed to interact with these specific chips. The pyserial library can be used to communicate with the virtual COM port that the SiLabs driver creates.
Step 1: Install the official Silicon Labs CP210x USB to UART Bridge VCP Drivers for Windows. This will create a virtual COM port (e.g., COM3, COM4) that your Python script can access.
Step 2: Use the pyserial library to open the COM port and read data from it. You can find the correct COM port in your Windows Device Manager under "Ports (COM & LPT)".
import serial
try:
# Replace 'COM3' with the actual COM port for your device
ser = serial.Serial('COM3', 9600, timeout=1)
print(f"Connected to {ser.name}")
while True:
# Read a line of data from the device
line = ser.readline().decode('utf-8').strip()
if line:
print(f"Received data: {line}")
except serial.SerialException as e:
print(f"Error: Could not open COM port - {e}")
finally:
if 'ser' in locals() and ser.is_open:
ser.close()
print("COM port closed.")
libusbversion binaries? Or the vendor's software?libusbitself isn't a driver, it's a wrapper over specific low-level USB APIs. The How to use libusb on Windows section explains how to use different .... backends. WinUSB is a generic driver provided by Windows itself.