SOLN_Lab 2_1B - Power Analysis for Password Bypass Attribute Error

Hi,

When I run the

trace_test = cap_pass_trace("h\n")

#Basic sanity check
assert(len(trace_test) == 3000)
print("✔️ OK to continue!")

cell in the SOLN_Lab 2_1B - Power Analysis for Password Bypass notebook, I get the following error:

AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_10285/343439027.py in <module>
----> 1 trace_test = cap_pass_trace("h\n")
      2 
      3 #Basic sanity check
      4 assert(len(trace_test) == 3000)
      5 print("✔️ OK to continue!")

/tmp/ipykernel_10285/2128796535.py in cap_pass_trace(pass_guess)
      1 def cap_pass_trace(pass_guess):
----> 2     reset_target(scope)
      3     num_char = target.in_waiting()
      4     while num_char > 0:
      5         target.read(num_char, 10)

/tmp/ipykernel_10285/10278096.py in reset_target(scope)
     11         raise IOError("Default iCE40 neorv32 build does not have external reset - reprogram device to reset")
     12     else:
---> 13         scope.io.nrst = 'low'
     14         time.sleep(0.05)
     15         scope.io.nrst = 'high_z'

~/work/projects/chipwhisperer/software/chipwhisperer/common/utils/util.py 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)
    354 

AttributeError: ("Attempt to set unknown attribute in <class 'chipwhisperer.capture.scopes.cwhardware.ChipWhispererExtra.GPIOSettings'>", 'nrst')

I’m using the VM in VirtualBox on a windows 10 host, with the ChipWhisperer CW1200 scope and STM32F3 target on the CW308 UFO board. Both of those are set correctly in the notebook as well, as far as I know (shown below)

SCOPETYPE = 'OPENADC'
PLATFORM = 'CW308_STM32F3'
VERSION = 'HARDWARE'
SS_VER = 'SS_VER_1_1'

How do I fix this error?

Hi,

I don’t think I’ve seen this error before. Did you get any error when you connected the scope? If so, what was it? If not, what happens if you do a print(scope)?

Alex

Issue appears to have been fixed by reverting to 5.5 instead of the prerelease VM, but thanks for your help!