Unable to write on isochronous OUT
See original GitHub issueHi, I’ve been trying to run the code on tutorial docs but found no luck.
import usb.core
import usb.util
dev = usb.core.find(idVendor=0x2F9D, idProduct=0x3101)
reattach = False
if dev.is_kernel_driver_active(1):
reattach = True
dev.detach_kernel_driver(1)
if dev is None:
raise ValueError("Device not found")
cfg = dev.get_active_configuration()
print(cfg)
dev.write(0x2, [0])
if reattach:
dev.attach_kernel_driver(1)
outputs
2021-05-20 14:05:46,094 DEBUG:usb.backend.libusb1:_LibUSB.__init__(<CDLL 'libusb-1.0.so.0', handle 55eeac719720 at 0x7f0133210460>)
[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
[ 0.000012] [00027103] libusb: debug [libusb_init] created default context
[ 0.000021] [00027103] libusb: debug [libusb_init] libusb v1.0.24.11584
[ 0.000028] [00027103] libusb: debug [get_kernel_version] reported kernel version is 5.10.34-1-MANJARO
[ 0.000046] [00027103] libusb: debug [op_init] found usbfs at /dev/bus/usb
[ 0.000049] [00027103] libusb: debug [op_init] max iso packet length is (likely) 98304 bytes
[ 0.000055] [00027103] libusb: debug [op_init] sysfs is available
[ 0.000399] [0002715e] libusb: debug [linux_udev_event_thread_main] udev event thread entering
[ 0.004676] [00027103] libusb: debug [linux_get_device_address] getting address for device: usb1 detached: 0
[ 0.004700] [00027103] libusb: debug [linux_get_device_address] scan usb1
[ 0.004725] [00027103] libusb: debug [linux_get_device_address] bus=1 dev=1
[ 0.004729] [00027103] libusb: debug [linux_enumerate_device] busnum 1 devaddr 1 session_id 257
[ 0.004733] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 1/1 (session 257)
[ 0.004799] [00027103] libusb: debug [linux_get_device_address] getting address for device: 1-5 detached: 0
[ 0.004803] [00027103] libusb: debug [linux_get_device_address] scan 1-5
[ 0.004819] [00027103] libusb: debug [linux_get_device_address] bus=1 dev=6
[ 0.004822] [00027103] libusb: debug [linux_enumerate_device] busnum 1 devaddr 6 session_id 262
[ 0.004824] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 1/6 (session 262)
[ 0.004840] [00027103] libusb: debug [linux_get_parent_info] dev 0x55eeac73cdf0 (1-5) has parent 0x55eeac73c540 (usb1) port 5
[ 0.004891] [00027103] libusb: debug [linux_get_device_address] getting address for device: 1-6 detached: 0
[ 0.004895] [00027103] libusb: debug [linux_get_device_address] scan 1-6
[ 0.004909] [00027103] libusb: debug [linux_get_device_address] bus=1 dev=3
[ 0.004911] [00027103] libusb: debug [linux_enumerate_device] busnum 1 devaddr 3 session_id 259
[ 0.004914] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 1/3 (session 259)
[ 0.004930] [00027103] libusb: debug [linux_get_parent_info] dev 0x55eeac73caa0 (1-6) has parent 0x55eeac73c540 (usb1) port 6
[ 0.004978] [00027103] libusb: debug [linux_get_device_address] getting address for device: usb2 detached: 0
[ 0.004983] [00027103] libusb: debug [linux_get_device_address] scan usb2
[ 0.004997] [00027103] libusb: debug [linux_get_device_address] bus=2 dev=1
[ 0.005000] [00027103] libusb: debug [linux_enumerate_device] busnum 2 devaddr 1 session_id 513
[ 0.005002] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 2/1 (session 513)
[ 0.005062] [00027103] libusb: debug [linux_get_device_address] getting address for device: 2-2 detached: 0
[ 0.005066] [00027103] libusb: debug [linux_get_device_address] scan 2-2
[ 0.005081] [00027103] libusb: debug [linux_get_device_address] bus=2 dev=2
[ 0.005083] [00027103] libusb: debug [linux_enumerate_device] busnum 2 devaddr 2 session_id 514
[ 0.005086] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 2/2 (session 514)
[ 0.005106] [00027103] libusb: debug [linux_get_parent_info] dev 0x55eeac71f570 (2-2) has parent 0x55eeac73d0d0 (usb2) port 2
[ 0.005174] [00027103] libusb: debug [linux_get_device_address] getting address for device: usb3 detached: 0
[ 0.005182] [00027103] libusb: debug [linux_get_device_address] scan usb3
[ 0.005206] [00027103] libusb: debug [linux_get_device_address] bus=3 dev=1
[ 0.005210] [00027103] libusb: debug [linux_enumerate_device] busnum 3 devaddr 1 session_id 769
[ 0.005214] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 3/1 (session 769)
[ 0.005292] [00027103] libusb: debug [linux_get_device_address] getting address for device: 3-2 detached: 0
[ 0.005311] [00027103] libusb: debug [linux_get_device_address] scan 3-2
[ 0.005327] [00027103] libusb: debug [linux_get_device_address] bus=3 dev=2
[ 0.005330] [00027103] libusb: debug [linux_enumerate_device] busnum 3 devaddr 2 session_id 770
[ 0.005332] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 3/2 (session 770)
[ 0.005347] [00027103] libusb: debug [linux_get_parent_info] dev 0x55eeac71e7e0 (3-2) has parent 0x55eeac71f6a0 (usb3) port 2
[ 0.005398] [00027103] libusb: debug [linux_get_device_address] getting address for device: 3-3 detached: 0
[ 0.005402] [00027103] libusb: debug [linux_get_device_address] scan 3-3
[ 0.005417] [00027103] libusb: debug [linux_get_device_address] bus=3 dev=3
[ 0.005419] [00027103] libusb: debug [linux_enumerate_device] busnum 3 devaddr 3 session_id 771
[ 0.005422] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 3/3 (session 771)
[ 0.005436] [00027103] libusb: debug [linux_get_parent_info] dev 0x55eeac71ebc0 (3-3) has parent 0x55eeac71f6a0 (usb3) port 3
[ 0.005485] [00027103] libusb: debug [linux_get_device_address] getting address for device: usb4 detached: 0
[ 0.005490] [00027103] libusb: debug [linux_get_device_address] scan usb4
[ 0.005505] [00027103] libusb: debug [linux_get_device_address] bus=4 dev=1
[ 0.005507] [00027103] libusb: debug [linux_enumerate_device] busnum 4 devaddr 1 session_id 1025
[ 0.005510] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 4/1 (session 1025)
[ 0.005566] [00027103] libusb: debug [linux_get_device_address] getting address for device: usb5 detached: 0
[ 0.005571] [00027103] libusb: debug [linux_get_device_address] scan usb5
[ 0.005585] [00027103] libusb: debug [linux_get_device_address] bus=5 dev=1
[ 0.005587] [00027103] libusb: debug [linux_enumerate_device] busnum 5 devaddr 1 session_id 1281
[ 0.005590] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 5/1 (session 1281)
[ 0.005646] [00027103] libusb: debug [linux_get_device_address] getting address for device: usb6 detached: 0
[ 0.005650] [00027103] libusb: debug [linux_get_device_address] scan usb6
[ 0.005664] [00027103] libusb: debug [linux_get_device_address] bus=6 dev=1
[ 0.005667] [00027103] libusb: debug [linux_enumerate_device] busnum 6 devaddr 1 session_id 1537
[ 0.005669] [00027103] libusb: debug [linux_enumerate_device] allocating new device for 6/1 (session 1537)
[ 0.005750] [00027103] libusb: debug [usbi_add_event_source] add fd 5 events 1
[ 0.005755] [00027103] libusb: debug [usbi_io_init] using timer for timeouts
[ 0.005757] [00027103] libusb: debug [usbi_add_event_source] add fd 6 events 1
2021-05-20 14:05:46,100 INFO:usb.core:find(): using backend "usb.backend.libusb1"
2021-05-20 14:05:46,100 DEBUG:usb.backend.libusb1:_LibUSB.enumerate_devices()
[ 0.006111] [00027103] libusb: debug [libusb_get_device_list]
[ 0.006123] [00027103] libusb: debug [discovered_devs_append] need to increase capacity
2021-05-20 14:05:46,100 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fbbfd0>)
[ 0.006278] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,100 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd01c0>)
[ 0.006485] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,100 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fbbfd0>)
[ 0.006623] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,100 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0220>)
[ 0.006718] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,100 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fbbfd0>)
[ 0.006811] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0280>)
[ 0.006910] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fbbfd0>)
[ 0.007001] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd01f0>)
[ 0.007087] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fbbfd0>)
[ 0.007175] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>)
[ 0.007261] [00027103] libusb: debug [libusb_get_device_descriptor]
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.open_device(<usb.backend.libusb1._Device object at 0x7f0132fd0250>)
[ 0.007378] [00027103] libusb: debug [libusb_open] open 1.6
[ 0.007403] [00027103] libusb: debug [usbi_add_event_source] add fd 7 events 4
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.is_kernel_driver_active(<usb.backend.libusb1._DeviceHandle object at 0x7f0133335fa0>, 1)
[ 0.007457] [00027103] libusb: debug [libusb_kernel_driver_active] interface 1
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration(<usb.backend.libusb1._DeviceHandle object at 0x7f0133335fa0>)
[ 0.007518] [00027103] libusb: debug [libusb_get_configuration]
[ 0.007545] [00027103] libusb: debug [libusb_get_configuration] active config 1
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.007615] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.007622] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.007624] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0, 0, 0)
2021-05-20 14:05:46,101 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.007800] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.007805] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.007808] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0, 1, 0)
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.007961] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.007966] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.007969] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 1, 0, 0)
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.008080] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.008085] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.008088] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 1, 1, 0)
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.008217] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.008222] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.008232] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0, 1, 1, 0)
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 1, 1, 0)
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.008407] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.008412] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.008415] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 1, 2, 0)
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.008558] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.008563] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.008566] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 2, 0, 0)
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.008674] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.008679] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.008681] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 2, 1, 0)
2021-05-20 14:05:46,102 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.008810] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.008814] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.008817] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0, 2, 1, 0)
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 2, 1, 0)
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.008983] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.008988] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.008990] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 2, 2, 0)
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.009123] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.009128] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.009131] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 3, 0, 0)
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.009238] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.009242] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.009245] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0, 3, 0, 0)
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 3, 0, 0)
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.009417] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.009422] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.009425] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 3, 1, 0)
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.009558] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.009563] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.009565] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.009653] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.009658] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.009660] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0, 0, 0)
2021-05-20 14:05:46,103 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.009776] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.009781] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.009783] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0, 1, 0)
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.009909] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.009914] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.009917] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 1, 0, 0)
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.010025] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.010029] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.010032] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 1, 1, 0)
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.010154] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.010159] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.010161] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0, 1, 1, 0)
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 1, 1, 0)
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x7f0132fd0250>, 0)
[ 0.010329] [00027103] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.010334] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.010336] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.claim_interface(<usb.backend.libusb1._DeviceHandle object at 0x7f0133335fa0>, 1)
[ 0.010431] [00027103] libusb: debug [libusb_claim_interface] interface 1
2021-05-20 14:05:46,104 DEBUG:usb.backend.libusb1:_LibUSB.iso_write(<usb.backend.libusb1._DeviceHandle object at 0x7f0133335fa0>, 2, 1, array('B', [0]), 1000)
[ 0.010572] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.010577] [00027103] libusb: debug [parse_endpoint] skipping descriptor 0x25
[ 0.010588] [00027103] libusb: debug [libusb_alloc_transfer] transfer 0x55eeac6b7098
[ 0.010801] [00027103] libusb: debug [libusb_submit_transfer] transfer 0x55eeac6b7098
[ 0.010809] [00027103] libusb: debug [add_to_flying_list] arm timer for timeout in 1000ms (first in line)
[ 0.010815] [00027103] libusb: debug [submit_iso_transfer] need 1 urbs for new transfer with length 1
[ 0.010819] [00027103] libusb: error [submit_iso_transfer] submiturb failed, errno=2
[ 0.010822] [00027103] libusb: debug [submit_iso_transfer] first URB failed, easy peasy
[ 0.010824] [00027103] libusb: debug [arm_timer_for_next_timeout] no timeouts, disarming timer
CONFIGURATION 1: 100 mA ==================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x2 Configuration
wTotalLength : 0xdd (221 bytes)
bNumInterfaces : 0x4
bConfigurationValue : 0x1
iConfiguration : 0x0
bmAttributes : 0xc0 Self Powered
bMaxPower : 0x32 (100 mA)
INTERFACE 0: Audio =====================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x0
bAlternateSetting : 0x0
bNumEndpoints : 0x0
bInterfaceClass : 0x1 Audio
bInterfaceSubClass : 0x1
bInterfaceProtocol : 0x0
iInterface : 0x0
INTERFACE 1: Audio =====================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x1
bAlternateSetting : 0x0
bNumEndpoints : 0x0
bInterfaceClass : 0x1 Audio
bInterfaceSubClass : 0x2
bInterfaceProtocol : 0x0
iInterface : 0x0
INTERFACE 1, 1: Audio ==================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x1
bAlternateSetting : 0x1
bNumEndpoints : 0x1
bInterfaceClass : 0x1 Audio
bInterfaceSubClass : 0x2
bInterfaceProtocol : 0x0
iInterface : 0x0
ENDPOINT 0x2: Isochronous OUT ========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x2 OUT
bmAttributes : 0xd Isochronous
wMaxPacketSize : 0xc0 (192 bytes)
bInterval : 0x4
INTERFACE 2: Audio =====================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x2
bAlternateSetting : 0x0
bNumEndpoints : 0x0
bInterfaceClass : 0x1 Audio
bInterfaceSubClass : 0x2
bInterfaceProtocol : 0x0
iInterface : 0x0
INTERFACE 2, 1: Audio ==================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x2
bAlternateSetting : 0x1
bNumEndpoints : 0x1
bInterfaceClass : 0x1 Audio
bInterfaceSubClass : 0x2
bInterfaceProtocol : 0x0
iInterface : 0x0
ENDPOINT 0x81: Isochronous IN ========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x81 IN
bmAttributes : 0x5 Isochronous
wMaxPacketSize : 0xc0 (192 bytes)
bInterval : 0x4
INTERFACE 3: Human Interface Device ====================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x3
bAlternateSetting : 0x0
bNumEndpoints : 0x1
bInterfaceClass : 0x3 Human Interface Device
bInterfaceSubClass : 0x0
bInterfaceProtocol : 0x0
iInterface : 0x0
ENDPOINT 0x82: Interrupt IN ==========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x82 IN
bmAttributes : 0x3 Interrupt
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x4
Traceback (most recent call last):
File "/home/xinbg/Documents/pyusb/main.py", line 15, in <module>
dev.write(0x2, [0])
File "/usr/lib/python3.9/site-packages/usb/core.py", line 979, in write
return fn(
File "/usr/lib/python3.9/site-packages/usb/_debug.py", line 62, in do_trace
return f(*args, **named_args)
File "/usr/lib/python3.9/site-packages/usb/backend/libusb1.py", line 874, in iso_write
return handler.submit(self.ctx)
File "/usr/lib/python3.9/site-packages/usb/backend/libusb1.py", line 680, in submit
_check(_lib.libusb_submit_transfer(self.transfer))
File "/usr/lib/python3.9/site-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 5] Input/Output Error
[ 0.011766] [00027103] libusb: debug [libusb_free_transfer] transfer 0x55eeac6b7098
2021-05-20 14:05:46,106 DEBUG:usb.backend.libusb1:_LibUSB.release_interface(<usb.backend.libusb1._DeviceHandle object at 0x7f0133335fa0>, 1)
[ 0.011869] [00027103] libusb: debug [libusb_release_interface] interface 1
2021-05-20 14:05:46,106 DEBUG:usb.backend.libusb1:_LibUSB.close_device(<usb.backend.libusb1._DeviceHandle object at 0x7f0133335fa0>)
[ 0.011936] [00027103] libusb: debug [libusb_close]
[ 0.011941] [00027103] libusb: debug [usbi_remove_event_source] remove fd 7
2021-05-20 14:05:46,106 DEBUG:usb.backend.libusb1:_LibUSB._finalize_object()
[ 0.012002] [00027103] libusb: debug [libusb_exit]
[ 0.012006] [00027103] libusb: debug [libusb_exit] destroying default context
[ 0.012009] [00027103] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 0.012011] [00027103] libusb: debug [handle_events] event sources modified, reallocating event data
[ 0.012015] [00027103] libusb: debug [usbi_wait_for_events] poll() 2 fds with timeout in 0ms
[ 0.012020] [00027103] libusb: debug [usbi_wait_for_events] poll() returned 0
[ 0.012022] [00027103] libusb: debug [libusb_unref_device] destroy device 6.1
[ 0.012025] [00027103] libusb: debug [libusb_unref_device] destroy device 5.1
[ 0.012028] [00027103] libusb: debug [libusb_unref_device] destroy device 4.1
[ 0.012030] [00027103] libusb: debug [libusb_unref_device] destroy device 3.3
[ 0.012032] [00027103] libusb: debug [libusb_unref_device] destroy device 3.2
[ 0.012035] [00027103] libusb: debug [libusb_unref_device] destroy device 3.1
[ 0.012037] [00027103] libusb: debug [libusb_unref_device] destroy device 2.2
[ 0.012039] [00027103] libusb: debug [libusb_unref_device] destroy device 2.1
[ 0.012042] [00027103] libusb: debug [libusb_unref_device] destroy device 1.3
[ 0.012044] [00027103] libusb: debug [libusb_unref_device] destroy device 1.6
[ 0.012046] [00027103] libusb: debug [libusb_unref_device] destroy device 1.1
[ 0.012049] [00027103] libusb: debug [usbi_remove_event_source] remove fd 6
[ 0.012055] [00027103] libusb: debug [usbi_remove_event_source] remove fd 5
[ 0.012074] [0002715e] libusb: debug [linux_udev_event_thread_main] udev event thread exiting
The problem seems to be something wrong with submitting the transfer.
[ 0.009953] [00026f4e] libusb: error [submit_iso_transfer] submiturb failed, errno=2
[ 0.009955] [00026f4e] libusb: debug [submit_iso_transfer] first URB failed, easy peasy
I search through libusb’s docs, but there is no errno=2 found, only negative error numbers. I’m confused here, can someone help?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
winusb driver - isochronous endpoint not working - Microsoft Tech ...
I write some wrapper code (So my Application will work as is) to use winusb ... "nvUSB.lib: Endpoint index: %d Pipe type: Isochronous...
Read more >libusb not writing to buffer in isochronous mode
It seems that with isochronous transfers from the AVR device to the rpi, the kernel is not copying the received data into the...
Read more >while using libusb, for Isochronous OUT transfers the callback ...
Hi, I was using libusb for reading and writing data to usb devices through isochronous endpoints. For isochronous In endpoint it is ...
Read more >Understanding why USB Isochronous Bandwidth Errors Occur
This shows us that our single video stream is using 34% of the available bandwidth. The USB specification requires that no more than...
Read more >USB in a NutShell - Chapter 4 - Endpoint Types - Beyondlogic
These are Control, Interrupt, Isochronous and Bulk Transfers. ... OUT: When the host needs to send the device a control data packet, it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good progress.
I recommend you to read the basic of USB here. https://www.usbmadesimple.co.uk/
And read pyusb tutorial in more detail about dev.set_interface_altsetting(). https://github.com/pyusb/pyusb/blob/master/docs/tutorial.rst