Hi
I’m getting started with a CWNANO, and am having difficulty with the Jupyter course Lab 2_1A - Instruction Power Differences. I get through the (HARDWARE) tutorial part, but when it’s done I don’t seem to be able to pass the capture test:
wave = capture_trace()
print(“OK to continue!”)
Instead I get an error:
KeyError Traceback (most recent call last)
~/.pyenv/versions/3.7.7/envs/cw/lib/python3.7/site-packages/pyusb-1.1.1-py3.7.egg/usb/core.py in get_interface_and_endpoint(self, device, endpoint_address)
235 try:
–> 236 return self._ep_info[endpoint_address]
237 except KeyError:KeyError: None
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
in
----> 1 wave = capture_trace()
2 print(“OK to continue!”)
in capture_trace(_ignored)
2 ktp = cw.ktp.Basic()
3 key, text = ktp.next()
----> 4 return cw.capture_trace(scope, target, text).wave~/work/projects/chipwhisperer/software/chipwhisperer/init.py in capture_trace(scope, target, plaintext, key, ack)
336 target.simpleserial_write(‘p’, plaintext)
337
–> 338 ret = scope.capture()
339
340 i = 0~/work/projects/chipwhisperer/software/chipwhisperer/capture/scopes/cwnano.py in capture(self)
694 return True
695
–> 696 self._lasttrace = self._cwusb.cmdReadMem(0, self.adc.samples)
697
698 # can just keep rerunning this until it works I think~/work/projects/chipwhisperer/software/chipwhisperer/hardware/naeusb/naeusb.py in cmdReadMem(self, addr, dlen)
798 “”"
799
–> 800 return self.usbseralizer.cmdReadMem(addr, dlen)
801
802 def cmdWriteMem(self, addr, data):~/work/projects/chipwhisperer/software/chipwhisperer/hardware/naeusb/naeusb.py in cmdReadMem(self, addr, dlen)
202 cmdpacket = self.make_cmd(self.CMD_READ_MEM, payload)
203
–> 204 return self.process_rx(self.txrx(tx=cmdpacket))
205
206 def cmdWriteMem(self, addr, data):~/work/projects/chipwhisperer/software/chipwhisperer/hardware/naeusb/naeusb.py in txrx(self, tx)
311 addr = payload[0]
312 dlen = payload[1]
–> 313 response = self.cmdReadMem(addr, dlen)
314 naeusb_logger.debug(“CMD_READ_MEM: addr: {:08X}, dlen: {:08X}, response: {}”.format(addr, dlen, response))
315 elif cmd == self.CMD_WRITE_MEM:~/work/projects/chipwhisperer/software/chipwhisperer/hardware/naeusb/naeusb.py in cmdReadMem(self, addr, dlen)
531 # Get data
532 if cmd == self.CMD_READMEM_BULK:
–> 533 data = self.usbdev().read(self.rep, dlen, timeout=self._timeout)
534 # XXX Husky debug:
535 naeusb_logger.info(‘YYY BULK rep=%d, dlen=%d, got len=%d’ % (self.rep, dlen, len(data)))~/.pyenv/versions/3.7.7/envs/cw/lib/python3.7/site-packages/pyusb-1.1.1-py3.7.egg/usb/core.py in read(self, endpoint, size_or_buffer, timeout)
1009 }
1010
-> 1011 intf, ep = self._ctx.setup_request(self, endpoint)
1012 fn = fn_map[util.endpoint_type(ep.bmAttributes)]
1013~/.pyenv/versions/3.7.7/envs/cw/lib/python3.7/site-packages/pyusb-1.1.1-py3.7.egg/usb/core.py in wrapper(self, *args, **kwargs)
111 try:
112 self.lock.acquire()
–> 113 return f(self, *args, **kwargs)
114 finally:
115 self.lock.release()~/.pyenv/versions/3.7.7/envs/cw/lib/python3.7/site-packages/pyusb-1.1.1-py3.7.egg/usb/core.py in setup_request(self, device, endpoint)
226 endpoint_address = endpoint
227
–> 228 intf, ep = self.get_interface_and_endpoint(device, endpoint_address)
229 self.managed_claim_interface(device, intf)
230 return (intf, ep)~/.pyenv/versions/3.7.7/envs/cw/lib/python3.7/site-packages/pyusb-1.1.1-py3.7.egg/usb/core.py in wrapper(self, *args, **kwargs)
111 try:
112 self.lock.acquire()
–> 113 return f(self, *args, **kwargs)
114 finally:
115 self.lock.release()~/.pyenv/versions/3.7.7/envs/cw/lib/python3.7/site-packages/pyusb-1.1.1-py3.7.egg/usb/core.py in get_interface_and_endpoint(self, device, endpoint_address)
242 return intf, ep
243
–> 244 raise ValueError('Invalid endpoint address ’ + hex(endpoint_address))
245
246 @synchronizedTypeError: ‘NoneType’ object cannot be interpreted as an integer
I’m running VMware on a Mac, running the prebuilt VM from release 5.5.2, and I’ve updated the firmware to 0.30. Any suggestions on where I might be going wrong?
Many thanks
Dan