You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connect to a USB debugger and print device and debugger information.
fromsiutilimportSiUtil, SiUtilErrortry:
# Initialize the wrappers=SiUtil()
print(f"SiUtil DLL Version: {s.get_dll_version()}")
# Find available USB debug adaptersnum_adapters=s.usb_debug_devices()
ifnum_adapters==0:
print("No USB debug adapters found.")
else:
print(f"Found {num_adapters} USB adapter(s).")
# Get serial number of the first adapterserial_number=s.get_usb_device_sn(0)
print(f"Connecting to adapter with S/N: {serial_number}")
# Connect to the device using C2 protocols.connect_usb(serial_number, ec_protocol=1)
ifs.connected():
print(f"-> Successfully connected to: {s.get_device_name()}")
print(f"-> USB Adapter Firmware Version: {s.get_usb_firmware_version()}")
s.disconnect_usb()
print("-> Disconnected.")
exceptSiUtilErrorase:
print(f"An error occurred: {e}")