Hello,
I was following the tutorials for sca101, and everything was working perfectly with CW nano and I followed the password bypass tutorial and it was working as expected and I can guess the password.
Later, I couldn’t repeat what I did again and when running scope.capture() I always get the following error
(ChipWhisperer Scope WARNING|File cwnano.py:706) Timeout in cwnano capture()
On the forum it was mentioned if I reproram the firmware, it can fix this issue.
I used the following code to reprogram my cwnano, however I get timeout somewhere once it connect and attempt the upgrade.
Any help would be appreciated.
def get_at91_ports():
from serial.tools import list_ports
at91_ports = [port.device for port in list_ports.comports() if (port.vid, port.pid) == (0x2b3e, 0xace0)]
return at91_ports
import chipwhisperer as cw
def program_sam_firmware(hardware_type=None):
at91_ports = get_at91_ports()
if len(at91_ports) == 0:
raise OSError("Could not find bootloader serial port, please see https://chipwhisperer.readthedocs.io/en/latest/firmware.html")
if len(at91_ports) > 1:
raise OSError("Found multiple bootloaders, please specify com port. See https://chipwhisperer.readthedocs.io/en/latest/firmware.html")
serial_port = at91_ports[0]
print("Found {}".format(serial_port))
prog = cw.SAMFWLoader(None)
prog.program(serial_port, hardware_type=hardware_type)
program_sam_firmware("cwnano")
Error trace:
Found /dev/ttyACM0
Loading cwnano firmware…
Opened!
Connecting…
Traceback (most recent call last):
File “/home/sakr/study/ChipWhisper/reset.py”, line 20, in
program_sam_firmware(“cwnano”)
File “/home/sakr/study/ChipWhisper/reset.py”, line 18, in program_sam_firmware
prog.program(serial_port, hardware_type=hardware_type)
File “/home/sakr/tools/chipwhisperer/software/chipwhisperer/capture/scopes/cwhardware/ChipWhispererSAM3Update.py”, line 273, in program
sam.con(port)
File “/home/sakr/tools/chipwhisperer/software/chipwhisperer/hardware/naeusb/bootloader_sam3u.py”, line 250, in con
cid = self.chip_id()
File “/home/sakr/tools/chipwhisperer/software/chipwhisperer/hardware/naeusb/bootloader_sam3u.py”, line 316, in chip_id
cid = self.read_word(0x400e0740)
File “/home/sakr/tools/chipwhisperer/software/chipwhisperer/hardware/naeusb/bootloader_sam3u.py”, line 333, in read_word
raise IOError(“timeout”)
OSError: timeout