USB error Windows 10 installation


I have ChipWhisperer-Lite working on Ubuntu in a VM, but I can not get it working with the Windows installation. The ChipWhisperer is found but scope.default_setup() always results in ‘USB error: [Errno 32] Pipe error’.

What could be causing this, and how do I fix it?

Thanks in advance.

I have included the output here below:
INFO: Found ChipWhisperer😍

USBError Traceback (most recent call last)
25 import time
26 time.sleep(0.05)
—> 27 scope.default_setup()
28 def reset_target(scope):

…\cw\home\portable\chipwhisperer\software\chipwhisperer\capture\scopes\ in default_setup(self)
166 self.clock.adc_src = “clkgen_x4”
–> 167 = 0
169 count = 0

…\cw\home\portable\chipwhisperer\software\chipwhisperer\common\utils\ in setattr(self, name, value)
350 def setattr(self, name, value):
–> 351 if hasattr(self, ‘_new_attributes_disabled’) and self._new_attributes_disabled and not hasattr(self, name): # would this create a new attribute?
352 raise AttributeError(“Attempt to set unknown attribute in %s”%self.class, name)
353 super(DisableNewAttr, self).setattr(name, value)

…\cw\home\portable\chipwhisperer\software\chipwhisperer\capture\scopes\cwhardware\ in cdc_settings(self)
210 if ver < ‘0.30’:
211 return None
–> 212 return self.cwe.oa.serial.get_cdc_settings()
214 @cdc_settings.setter

…\cw\home\portable\chipwhisperer\software\chipwhisperer\hardware\naeusb\ in get_cdc_settings(self)
671 def get_cdc_settings(self):
–> 672 return self.usbtx.readCtrl(self.CMD_CDC_SETTINGS_EN, dlen=2)
674 def set_cdc_settings(self, port=[1, 1]):

…\cw\home\portable\chipwhisperer\software\chipwhisperer\hardware\naeusb\ in readCtrl(self, cmd, value, dlen)
501 “”"
502 # Vendor-specific, IN, interface control transfer
–> 503 return self.usbdev().ctrl_transfer(0xC1, cmd, value, 0, dlen, timeout=self._timeout)
505 def cmdReadMem(self, addr, dlen):

~\WPy64-3771\python-3.7.7.amd64\lib\site-packages\usb\ in ctrl_transfer(self, bmRequestType, bRequest, wValue, wIndex, data_or_wLength, timeout)
1077 wIndex,
1078 buff,
-> 1079 self.__get_timeout(timeout))
1081 if isinstance(data_or_wLength, array.array) \

~\WPy64-3771\python-3.7.7.amd64\lib\site-packages\usb\backend\ in ctrl_transfer(self, dev_handle, bmRequestType, bRequest, wValue, wIndex, data, timeout)
899 cast(addr, POINTER(c_ubyte)),
900 length,
–> 901 timeout))
903 return ret

~\WPy64-3771\python-3.7.7.amd64\lib\site-packages\usb\backend\ in _check(ret)
602 raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
603 else:
–> 604 raise USBError(_strerror(ret), ret, _libusb_errno[ret])
606 return ret

USBError: [Errno 32] Pipe error


Do you know what firmware version your ChipWhisperer is on (scope.fw_version)? CDC serial support and control was added in firmware 0.30, so if your firmware is older than that, your ChipWhisperer won’t support that command. We do check if your firmware is new enough (210 if ver < ‘0.30’:), but it’s possible this check could be failing for some reason.


scope.fw_version = {‘major’: 0, ‘minor’: 50, ‘debug’: 0}

Hm, so what I think is happening is that firmware 0.50 sends back 4 bytes for that CDC command, but older firmware only sent back 2 bytes. Both firmware versions also do a check on the requested length to make sure it matches and will reject the request if it doesn’t. This release corresponds to the 2 byte version, so when the python code only requests 2 bytes, the ChipWhisperer rejects the request. Your VM probably has the newer ChipWhisperer code that requests 4 bytes instead.

I’ll make an update to the firmware to not reject requests of an incorrect length, but in the meantime, you can modify line 672 of chipwhisperer5_64\cw\home\portable\chipwhisperer\software\chipwhisperer\hardware\naeusb\ to return self.usbtx.readCtrl(self.CMD_CDC_SETTINGS_EN, dlen=4). Alternatively, you can reflash your ChipWhisperer with the firmware that comes with the Windows release you have.

I’ve made a github issue to track this ( and will report back when I’ve built new firmware that fixes this.


I modified the line in, and it works now.

Thank you for your help!