CWnano connection Issue

Hi,
I have got CWnano board and i am using Virtual machine to use chipwhisperer software and my local machine is a windows10. When i am trying to communicate with the board by using the following commands

import chipwhisperer as cw
scope = cw.scope()

I am getting the error “OSError: Unable to communicate with found ChipWhisperer. Check that another process isn’t connected to it and that you have permission to communicate with it.”

I can see the USB connection in VM that it is recognised.

Any help is much appreciated. Thank you.

Hi,

What’s the output of lsusb -v in the VM?

I didnt need to login to the VM i am accessing the jupyter from my local machine google chrome by using address localhost:8888. I still logged in the VM and results are shown below. I am not able to move up tho.

Let me know if it is of any help.

In that case, try running the following in a jupyter notebook:

%%bash
lsusb -v

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
idProduct 0x0003 3.0 root hub
bcdDevice 4.09
iManufacturer 3
iProduct 2
iSerial 1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 31
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
bMaxBurst 0

Bus 001 Device 010: ID 2b3e:ace0
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x2b3e
idProduct 0xace0
bcdDevice 1.00
iManufacturer 1 NewAE Technology Inc.
iProduct 2 ChipWhisperer Nano
iSerial 3 533331003257394c3030333035323037
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 400mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 33
bNumDeviceCaps 1
** UNRECOGNIZED: 1c 10 05 00 df 60 dd d8 89 45 c7 4c 9c d2 65 9d 9e 64 8a 9f 00 00 03 06 9e 00 01 00
Device Status: 0x0001
Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 4.09
iManufacturer 3
iProduct 2
iSerial 1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Couldn’t open device, some information will be missing
Couldn’t open device, some information will be missing

Hm, you should be able to access the device. Have you been able to connect to it at all, or you do always get that error?

I dont know what happened but now i am seeing the below error. I connected the CW and entered the commands.

import chipwhisperer as cw
scope = cw.scope()

That is all i did.

Everything looks like it’s working fine now. That’s just a warning telling you that a new firmware version is available. I recommend updating, but you can probably continue without doing that. We have instructions for pre 5.6 ChipWhisperer firmware upgrade here: https://chipwhisperer.readthedocs.io/en/latest/api.html#api-scope-update

Alex

If you dont mind can you point me to a project which is CWnano i can try ? CPA attack on AES using CWnano. I am trying to use this https://github.com/newaetech/chipwhisperer-jupyter/blob/master/1%20-%20Connecting%20to%20Hardware.ipynb which is actually failing at Building and Uploading Firmware stage. It would be of great help if you can show me a project like that for CWnano. Thank you.

Have you set the PLATFORM variable there?

Do you mean cw ?

When i executed the below command

%%bash
cd …/hardware/victims/firmware/simpleserial-base/
make PLATFORM= CRYPTO_TARGET=NONE

below is the error
CalledProcessError: Command ‘b’cd …/hardware/victims/firmware/simpleserial-base/\nmake PLATFORM= CRYPTO_TARGET=NONE\n’’ returned non-zero exit status 2.

But in jupyter i can see there is a path till simpleserial-base and there are two file “makefile” and “simpleserial-base.c”.

What happens if you run

%%bash
pwd

EDIT:

also try running

%%bash
ls ../
ls ../hardware/victims/firmware

If i run pwd

image

Should i disconnect the board and run the building and uploading firmware ? i see it says in a note to disconnect the board could that be the reason ?

No this is unrelated. You seem to be one directory up for some reason (should be /home/vagrant/works/projects/chipwhisperer/jupyter). Try modifying

%%bash
cd ../hardware/victims/firmware/simpleserial-base/
make PLATFORM= CRYPTO_TARGET=NONE

to

%%bash
cd hardware/victims/firmware/simpleserial-base/
make PLATFORM= CRYPTO_TARGET=NONE

I think its working . I will reach out if there are any issues. Thank you so much.

1 Like