Ich kann das Gerät aus Linux lesen.
Code: Select all
import wmi
try:
c = wmi.WMI()
print("Connected USB Devices:")
count = 0
for usb in c.Win32_USBControllerDevice():
dependent_device = usb.Dependent
if dependent_device:
# Extract relevant information from the dependent device object
# The 'Dependent' property refers to the connected USB device
print(f" Device ID: {dependent_device.DeviceID}")
print(f" Description: {dependent_device.Description}")
if '10C4' in dependent_device.DeviceID:
print('Found UART Bridge')
if '3553' in dependent_device.DeviceID:
print('Found TEMPerHUM')
print("-" * 20)
count += 1
except Exception as e:
print(f"An error occurred: {e}")
print(dir(usb.Dependent))
print(f'Found {count} devices.')
x = input('Press enter to continue: ')
Mobile version