Virtualbox USB Error CW 5.5 CWLITE ARM

Hi there,

I recently begun playing around with my ChipWhisperer CWLITE ARM and had everything installed natively on my Windows machine in ChipWhisperer version 5.5.
No complaints here it is just working flawlessly and I’m loving it :slight_smile:

Now I wanted to try to use the Virtualbox instead, downloaded the same version as virtualbox image ( (ChipWhisperer.v5.5.0.VMJupyter.7z) and followed the tutorial: https://chipwhisperer.readthedocs.io/en/latest/installing.html#install-virtual-machine. Connection via jupyter and localhost:8888 is working fine.
However, when trying to connect to the scope in the following way:
import chipwhisperer as cw
scope = cw.scope()
I get an Error:
usb.core.USBError: [Errno None] b'could not set config 1: Device or resource busy'

The user vagrant is member of plugdev and dialout so it should have access to the usb device.

The ChipWhisperer is plugged in and cought by virtualbox (Devices -> USB -> NewAE Technology Inc. ChipWhisperer Lite [0100]), the windows native ChipWhisperer installation is not running while I try using the Virtualbox setup.
I tried unplugging / replugging restarting the computer and even replicated the whole setup on a different machine running also Windows 10 as host resulting in exactly the same error. Both machines are lenovo thinkpads if that matters.

I also tried running it on my Macbook pro with all the same versions and got the “error state retrying… error”. Didn’t try around as much though.

The ChipWhisperer board is running fine though in the native installation on Windows. I doubt it is a hardware issue. I did not use any USB hubs. Just plain USB 3 ports on all three machines.

Do you have any pointers or ideas of what I’m doing wrong here?

I hope I didn’t miss any important information. If you need more details please let me know.

I’m new here so feel free to move this to another topic if you see fit.


Host running Win10
VirtualBox Version 6.1.22 r144080
ChipWhisperer CW1173

Full error:
Traceback (most recent call last): File "/home/vagrant/work/projects/chipwhisperer/software/chipwhisperer/hardware/naeusb/naeusb.py", line 316, in txrx response = self.open(serial_number=payload) File "/home/vagrant/work/projects/chipwhisperer/software/chipwhisperer/hardware/naeusb/naeusb.py", line 370, in open dev.set_configuration() File "/home/vagrant/.pyenv/versions/3.6.7/envs/cw/lib/python3.6/site-packages/pyusb-1.1.0-py3.6.egg/usb/core.py", line 903, in set_configuration self._ctx.managed_set_configuration(self, configuration) File "/home/vagrant/.pyenv/versions/3.6.7/envs/cw/lib/python3.6/site-packages/pyusb-1.1.0-py3.6.egg/usb/core.py", line 113, in wrapper return f(self, *args, **kwargs) File "/home/vagrant/.pyenv/versions/3.6.7/envs/cw/lib/python3.6/site-packages/pyusb-1.1.0-py3.6.egg/usb/core.py", line 159, in managed_set_configuration self.backend.set_configuration(self.handle, cfg.bConfigurationValue) File "/home/vagrant/.pyenv/versions/3.6.7/envs/cw/lib/python3.6/site-packages/pyusb-1.1.0-py3.6.egg/usb/backend/libusb0.py", line 509, in set_configuration _check(_lib.usb_set_configuration(dev_handle, config_value)) File "/home/vagrant/.pyenv/versions/3.6.7/envs/cw/lib/python3.6/site-packages/pyusb-1.1.0-py3.6.egg/usb/backend/libusb0.py", line 447, in _check raise USBError(errmsg, ret) usb.core.USBError: [Errno None] b'could not set config 1: Device or resource busy' /home/vagrant/work/projects/chipwhisperer/software/chipwhisperer/common/utils/util.py:505: UserWarning: getName function is deprecated use get_name instead. warnings.warn('{} function is deprecated use {} instead.'.format(cc_func, func.__name__))

Just a short follow up:

import chipwhisperer as cw
scope = cw.scope(sn='dummy')

Leads to:
Warning: Failed to find USB device with S/N %s . Found S/N's: <CW-Serial Nr> (ChipWhisperer Lite)

and with:
import chipwhisperer as cw
scope = cw.scope(sn='<CW-Serial Nr>')

I get the same USB error as before.

Jupyter seems to find the ChipWhisperer board but apparently doesn’t like it very much.

Hi,

Can you try logging into the virtual machine, navigating to ~/work/projects/chipwhisperer and running a git pull? The set_configuration thing is something that I think was required at some point, but is handled by the OS now. Unfortunately, running it twice can cause issues (or running it at all on some OSs). We’ve removed the call in the latest version.

Alex

1 Like

Hi Alex,

thank you very much for your quick reply. That did indeed fix this issue.
I will play around and see if everything works as expected.

Awesome support experience!

Lorz

Edit: yes recording traces, flashing target firmware, etc. seems all to be working just fine.

1 Like