MATLAB Control of CW Lite for Python 3.x

I am trying to control and interface my CW-Lite using MATLAB. I’ve tried going through this tutorial, but it appears to be very outdated (stuck to Python 2.7). Any mention of MATLAB in this forum seems to be very old aswell, so I was wondering if you have any kind of updated support for it. I tried to follow the tutorial and modify it to work for the up-to-date APIs, but I’m having issues connecting to the device. I get this error:

Error using util>get_cw_type
Python Error: OSError: USB Device not found. Did you connect it first?

Error in __init__>scope (line 229)

Error in cw_setup (line 10)

I’ve checked my USB drivers for the device and they seem to be installed just fine.
Thanks in advance for any help you can give me.


Yeah, we don’t support MATLAB anymore, though I don’t think your error is related to that. What operating system are you on?


Hi Alex, thank you for your time. I’m on Windows 10

Do you see a ChipWhisperer-Lite under Universal Serial Bus devices in Device Manager?

Yes, I confirm I see the ChipWhisperer-Lite in Device Manager


EDIT: In the meantime I tried to follow this guide in order to check if USB Drivers are correctly installed. My installation seems to follow what the guide says, so I’m assuming the issue lies somewhere else.

Yeah, those driver settings look right. Have you tried connecting via Python outside of matlab?

Yeah, tried to connect through command line using Python and I can connect to the target just fine

As an update to this question, I managed to connect successfully using both Python and MATLAB.The issue I am facing right now is with the serial communication. At first I thought it was due to MATLAB, but I realized have issue with Python aswell. I used to work with chipwhisperer in a VM, and I’ve never had any similar issue. If I try to connect by Python in command line, I can connect to the device properly (both cw.scope and work fine), but the simpleserial commands are not executing properly. In particular, the target.simpleserial_read() and _read_witherrors() functions do not work. After a lot of inspection I found out the communication is working properly, as I can read data of both SimpleSerial 1v1 and 2v1 using the function. This makes me think the issue is software-related, so I tried to update the software and even uninstall and reinstall from scratch (using pypi). Still I experience the same issue. Do you have any advice?

Do you get any errors? Is the serial you’re getting valid simpleserial?

No errors in Python, just no response on the serial. “Read timed out” is the output of simpleserial_read. The serial I get is valid, I tried both SS_1v1 and SS_2v1.

Can you try setting the target logging to debug? cw.target_logger.setLevel(cw.logging.DEBUG) and posting the resulting log?