Saving Project Issue

Hi Colin,

I am having an issue when saving the project. When I save the project in the capture program and load it from the analyzer program the traces I had captured are not shown or picked up as been saved. Is there a way I can force save the project with the traces.



When clicking on the “M” capture button, the power trace gets saved. However, I can’t go this route since the ADC clock has to be reset to get a lock each time to get a trace. Is there a way to force the ADC to reset on each trace when running the multiple trace capture?


The traces are only saved with a “M”… by default hitting capture 1 doesn’t actually record anything. However using the Auxiliary module it should be possible to reset the ADC DCM - let me try to see if there’s an easy way. I’m at Blackhat/Defcon right now so a little slower!

Hi Colin,

Have you managed to get time to look at this?
My current setup is: the smartcard is connected to the multi target board, with the feed through cable connected to the pc/sc reader. I have two ways of calling the smartcard.

if I use the following code, I am only able to get power trace if I use the “High” method, when using rising or falling edge, it just timeout. However, I am able to use the M capture button since the ADC doesn’t need to be rested.

status = self.hw.sendAPDU(0x00, 0xA4, 0x04, 0x00, [0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x00,0x00])
         if status != 0x9000:
            raise IOError("Invalid Status: %x" % status)

         (resp, pay) = self.hw.sendAPDU(0x80,0x02,0x00,0x00 [0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F], rxdatalen=24)
         if resp != 0x9000:
            raise IOError("Invalid Status: %x" % status)
self.resp = pay

When I use the following code, I am able to get power traces using the rising or falling edge and it gives me much more detailed data over the previous approach. However, I am unable to use the capture M button since the pc/sc reader reset itself after one execution is performed.

SELECT = [0x00,0xA4,0x04,0x00,0x0B,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x00,0x00]
cardtype = AnyCardType()
cardrequest = CardRequest( timeout=100, cardType=cardtype )
cardservice = cardrequest.waitforcard()
cardservice.connection.addObserver( observer )
apdu = SELECT
response, sw1, sw2 = cardservice.connection.transmit( apdu )
apdu = APP
response, sw1, sw2 = cardservice.connection.transmit( apdu )
self.resp = response

Is there a way I could force keep the pc/sc reader alive? or is the a way to manually save the information??



Ah have been running around lots sorry… actually if you are using PC/SC reader, can you send “keep-alive” messages to the card? Basically just sending it a message every few seconds to stop it from turning off the clock.

The ChipWhisperer driver for the PC/SC reader had a keep-alive thingy just for this reason.

Anyway for doing the ADC reset automatically, copy the following code line-by-line into the Python console (NB: there is some error that copying all at once doesn’t work):

from chipwhisperer.capture.auxiliary.AuxiliaryTemplate import AuxiliaryTemplate
def reset_adc():
  self.setParameter(['OpenADC', 'Clock Setup', 'ADC Clock', 'Reset ADC DCM', None])

class resetClass(AuxiliaryTemplate):
  def traceArm(self):

rc = resetClass()

When copying line-by-line, you’ll have to hit “enter” for the blank lines. This is required to finish out of some of the special modes. Also be sure to copy the number of spaces exactly, as it requires the correct level of indent. The new tutorial #B3-1 (located at … asswd.html, see step 3 for details of the entry method).

Thank you soooo much, it works! :smiley:

Awesome! I’ll try to document that as it’s a useful feature (or add as a regular “auxiliary” module), thanks very much for your patience with me too :slight_smile: