CWHUSKY encountered an issue

CWHUSKY encountered an issue.
SCOPETYPE = ‘OPENADC’
PLATFORM = ‘CWHUSKY’
CRYPTO_TARGET=‘TINYAES128C’
SS_VER=‘SS_VER_2_1’





def cap_pass_trace(pass_guess):
    reset_target(scope)
    num_char = target.in_waiting()
    while num_char > 0:
        target.read(num_char, 10)
        time.sleep(0.01)
        num_char = target.in_waiting()

    scope.arm()
    target.write(pass_guess)
    ret = scope.capture()
    if ret:
        print('Timeout happened during acquisition')

    trace = scope.get_last_trace()
    return trace

trace_test = cap_pass_trace("h\n")

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

The following issue occurred: “(ChipWhisperer Target WARNING|File SimpleSerial2.py:502) Read timed out:
(ChipWhisperer Target ERROR|File SimpleSerial2.py:285) Device did not ack”

This means that the target did not respond to Husky’s command.
Usually this is either because:

  1. The target is not programmed with the correct firmware.
  2. The firmware was compiled with a different SS_VER than what is used in the notebook.

I have tried other serial ports such as SS_VER_1_1, but the issue persists. Could it be due to other reasons? I am unable to resolve thi

I have tried other serial ports such as SS_VER_1_1, but the issue persists. Could it be due to other reasons? I am unable to resolve thi

SCOPETYPE = 'OPENADC'
PLATFORM = 'CWHUSKY'
CRYPTO_TARGET='TINYAES128C'
SS_VER='SS_VER_2_1'

%run "../../Setup_Scripts/Setup_Generic.ipynb"

%%bash -s "$PLATFORM" "$CRYPTO_TARGET" "$SS_VER"
cd ../../../hardware/victims/firmware/simpleserial-aes
make PLATFORM=$1 CRYPTO_TARGET=$2 SS_VER=$3 -j

cw.program_target(scope, prog, "../../../hardware/victims/firmware/simpleserial-aes/simpleserial-aes-{}.hex".format(PLATFORM))

from tqdm import trange
import numpy as np
import time

ktp = cw.ktp.Basic()
trace_array = []
textin_array = []

key,text = ktp.next()

target.set_key(key)

N = 100
for i in trange(N, desc='Capturing traces'):
    scope.arm()
    if text[0] & 0x01:
        text[0] = 0xFF
    else:
        text[0] = 0x00
    target.simpleserial_write('p', text)
    
    ret = scope.capture()
    if ret:
        print("Target timed out!")
        continue
    
    response = target.simpleserial_read('r', 16)
    
    trace_array.append(scope.get_last_trace())
    textin_array.append(text)
    
    key, text = ktp.next() 



Capturing traces:   0%|          | 0/100 [00:00<?, ?it/s](ChipWhisperer Scope WARNING|File _OpenADCInterface.py:642) Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: 17
(ChipWhisperer Scope WARNING|File _OpenADCInterface.py:642) Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: 16
Capturing traces:   1%|          | 1/100 [00:02<03:34,  2.17s/it]
  1. What is your target?
  2. What is the output of the make command?
  3. What is the output of the cw.program_target() command?