Discussions on Python software that powers the ChipWhisperer system
#1311 by industrialist
Fri May 19, 2017 4:08 am
my first time with ChipWhisperer-Lite 2-Part Version.
When I follow the tutorial "B1 Building a SimpleSerial Project" I get this error on the Debug_Logging of the Capture-SW.
I am running on Windows Pro 8.1 with Python 2.7 and the newest CW-Version 3.4.1:
The error in question is " Response length from target shorter than expected (0<34): "".
As a result, the "Encryption Status Monitor" is always showing '?' in "Test Out" and "Expected"
The CWLite has a continous blinking blue light (USB?) and a blinking green light and is connected with the flat broad wirecable and the golden "measure" cable.

Any Idea?
INFO - Found ChipWhisperer-Lite, Serial Number = 53313120313436373230372033......
INFO - SAM3U Firmware version = 0.11 b0
INFO - Detected ChipWhisperer with USB ID ace2 - switching firmware loader
INFO - FPGA programmed
INFO - OpenADC Found, Connecting
INFO - Target and Scope Connected
INFO - SimpleSerial: protocol V1.0 detected
WARNING - Response length from target shorter than expected (0<34): "".
INFO - Capture completed

thanx Holger
#1313 by gdeon
Fri May 19, 2017 9:41 am
Hi there,

Hope you're enjoying your ChipWhisperer so far!

What this means is that the CWLite is sending serial data to the target XMEGA, but the target isn't answering. It sounds like your hardware setup (the SMA and ribbon cables) is right, so there's probably something wrong with your setup. This is usually one of the following problems:
- The target doesn't have the right firmware programmed onto it
- The CWLite clock output is disabled (Target HS IO-Out isn't set to CLKGEN)
- The CLKGEN speed is wrong (the XMEGA target expects CLKGEN to be 7.37 MHz)
- The CLKGEN speed is set right but the DCMs aren't locked - press the DCM Reset buttons in the software (if this happens, the red LED on the board should be on)
- The Serial TX/RX lines are flipped
Try these and let me know if it's still not working.
#1315 by industrialist
Fri May 19, 2017 10:27 am
Hi gdeon,
thanks for your help.
I followed your instruction (I lost the CLKGEN Setting while trying)
Now it is a z30 sync error: (I tried to re-programmed the Firmware as well)

WARNING - FPGA mode switched to 'builtin' from invalid setting of 'None'
WARNING - FPGA mode switched to 'builtin' from invalid setting of 'None'
INFO - FPGA Configuration skipped - detected already programmed
INFO - FPGA programmed
INFO - SimpleSerial: protocol V1.0 detected
Sync Error: z30
Hex Version: 7a 33 30 0a 72 43 41 33 38 32 34 39 34 36 30 45 30 37 33 46 43 30 30 31 46 31 44 38 33 43 34 37 39 35
INFO - Capture completed.

If I try to work in the Terminal Window, I see a

but no reaction to any of my manual Inputs,. When I send an x I'll get a z30 in return

Thanks Holger
#1317 by gdeon
Fri May 19, 2017 11:46 am
This is completely my fault! We recently improved our firmware to use SimpleSerial V1.1, but I forgot to fix the simpleserial-base firmware.

We'll push out ChipWhisperer v3.4.2 with a fix ASAP. Until then, you can use the following code for simpleserial-base.c:
Code: Select all#include "hal.h"
#include <stdint.h>
#include <stdlib.h>

#include "simpleserial.h"

uint8_t get_key(uint8_t* k)
   // Load key here
   return 0x00;

uint8_t get_pt(uint8_t* pt)
   * Start user-specific code here. */
   for(int i = 0; i < 16; i++)
   //16 hex bytes held in 'pt' were sent
   //from the computer. Store your response
   //back into 'pt', which will send 16 bytes
   //back to computer. Can ignore of course if
   //not needed
   /* End user-specific code here. *
   simpleserial_put('r', 16, pt);
   return 0x00;

uint8_t reset(uint8_t* x)
   // Reset key here if needed
   return 0x00;

int main(void)
    /* Uncomment this to get a HELLO message for debug */
   simpleserial_addcmd('k', 16, get_key);
   simpleserial_addcmd('p', 16, get_pt);
   simpleserial_addcmd('x', 0, reset);
#1320 by industrialist
Fri May 19, 2017 12:24 pm
Hi gdeon,
thanks for the quick fix - Errors give you a better understanding of the topic than a tutorial that runs through - no worries.
I recompiled it and we are somewhat there:
Now, I can see the response but the "Expected" field still shows a '?'. And the count in the encryption Status Monitor shows "xx Total Ops 0 OK xx failed " after xx attempts.

The Debug Windows says:
INFO - SimpleSerial: protocol V1.1 detected
DEBUG - PlainText: 2cdc041ffc7031716223e6d6ba1fa1b4
DEBUG - CipherText: 2ddd0520fd7132726324e7d7bb20a2b5
DEBUG - Reading data fromm OpenADC...
DEBUG - Processed data, ended up with 24430 samples total
INFO - Capture completed.
#1321 by gdeon
Fri May 19, 2017 12:34 pm
Yes, the Expected field is broken too - I wouldn't worry about it too much. It's just meant to show you the expected output of an AES encryption. It's definitely on our to-do list! Maybe you can fix it and send us a pull request on Github :)

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest