How to connect CW305 via python?

Hello,
I have a trouble connecting my CW305 via python.
I installed “Chipwhisperer.v5.5.0.Setup.64-bit.exe” directly for my windows computer.
When running below code it showed that USB Device no found.
But device manager has recognized CW305!

Did I miss some installation/operation steps so it doesn’t work?

from chipwhisperer.capture.targets.CW305 import CW305
import chipwhisperer as cw
bitstream_file = r"D:\APP\ChipWhisperer5_64\git\home\portable\chipwhisperer\hardware\victims\cw305_artixtarget\fpga\vivado_examples" \
    r"\aes128_verilog\aes128_verilog.runs\impl_35t\cw305_top.bit"

scope = cw.scope()
self.scope = scope

target = cw.target(scope, fpga_id='35t',bsfile=bitstream_file, force=False)
self.target = target

OSError Traceback (most recent call last)
in
5 r"\aes128_verilog\aes128_verilog.runs\impl_35t\cw305_top.bit"
6
----> 7 scope = cw.scope()
8 self.scope = scope
9

d:\app\chipwhisperer5_64\git\home\portable\chipwhisperer\software\chipwhisperer_init_.py in scope(scope_type, sn)
226 from chipwhisperer.common.utils.util import get_cw_type
227 if scope_type is None:
→ 228 scope_type = get_cw_type(sn)
229 scope = scope_type()
230 try:

d:\app\chipwhisperer5_64\git\home\portable\chipwhisperer\software\chipwhisperer\common\utils\util.py in get_cw_type(sn)
501 name = “”
502 if len(possible_sn) == 0:
→ 503 raise OSError(“USB Device not found. Did you connect it first?”)
504
505 if (len(possible_sn) > 1):

OSError: USB Device not found. Did you connect it first?

Hi,

If you’re just connecting the CW305, you can skip the scope = cw.scope() part and just run

target = cw.target(None, cw.targets.CW305, fpga_id='35t', bsfile=bitstream_file, force=False)

I’d recommend taking a look at https://github.com/newaetech/chipwhisperer-jupyter/blob/master/demos/PA_HW_CW305_1-Attacking_AES_on_an_FPGA.ipynb for basic usage and https://chipwhisperer.readthedocs.io/en/latest/api.html#cw305-fpga-target for API documentation.

Alex

Hi,
Thank you, now it is working fine.

I have other questions.

Is it possible to generate clock glitch and voltage glitch like below image only using CW305 board?

How can I read the output signals (i.e. values stored in registers) of FPGA on CW305 board by python?

No, you’ll need a ChipWhisperer capture board (Nano, Lite or Pro) for that.

You can read/write register values via target.fpga_read() and target.fpga_write(), which are implemented here: chipwhisperer/software/chipwhisperer/capture/targets/CW305.py at develop · newaetech/chipwhisperer · GitHub

Alex