Chipwhisperer works on Windows, Not Ubuntu

Hiya,
I’ve had the chipwhisperer for some time and used on various Ubuntu distros, but it seems a recent patch or update to Ubuntu makes the chipwhisperer appear on /dev/ACM0 - i tried blacklisting the cdc_acm module, but still the chipwhisperer appears on ACM0 rather than the USB port. Out of frustration I loaded up the software on Windows and sure enough everything worked fine, so this showed it was a driver issue rather than the board/firmware corruption.

I have done the udev rules and put my user in the dialout group, but still no USB device, just ACM.

Tried on Ubuntu 22.04 and 23.04, several different machines.

Thanks in advance,

Alze

Hi Alze,

There was a firmware change a while back that makes the ChipWhisperer appear as a composite device; both as a custom USB device as before, as well as on a serial port as you’re seeing. If you haven’t yet, can you try using the new udev rules from https://github.com/newaetech/chipwhisperer/blob/develop/hardware/50-newae.rules to see if that fixes your problem?

Alex

Hi,

Cheers for the quick response. I had tried that, but for fullness tried it on another Ubuntu machine folliwng the install instructions to make sure I could replicate the issue. Sure enough, same problem, finds the chipwhisperer under ACM unless I blacklist the module driver, then I dont get ACM or USB.

Oct 18 13:16:20 alan-GK35 kernel: [  533.516863] usb 1-3: USB disconnect, device number 7
Oct 18 13:16:26 alan-GK35 kernel: [  539.271955] usb 1-3: new high-speed USB device number 8 using xhci_hcd
Oct 18 13:16:26 alan-GK35 kernel: [  539.421315] usb 1-3: New USB device found, idVendor=2b3e, idProduct=ace2, bcdDevice= 9.00
Oct 18 13:16:26 alan-GK35 kernel: [  539.421328] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 18 13:16:26 alan-GK35 kernel: [  539.421331] usb 1-3: Product: ChipWhisperer Lite
Oct 18 13:16:26 alan-GK35 kernel: [  539.421333] usb 1-3: Manufacturer: NewAE Technology Inc.
Oct 18 13:16:26 alan-GK35 kernel: [  539.421335] usb 1-3: SerialNumber: <removed>
Oct 18 13:16:26 alan-GK35 mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:15.0/usb1/1-3"
Oct 18 13:16:26 alan-GK35 mtp-probe: bus: 1, device: 8 was not an MTP device
Oct 18 13:16:26 alan-GK35 mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:15.0/usb1/1-3"
Oct 18 13:16:26 alan-GK35 mtp-probe: bus: 1, device: 8 was not an MTP device

The MTP-Probe looks like a candidate for the problem, or it could be a red herring, but I’m not seeing the device in /dev/USB

uname -a

Linux alan-GK35 6.2.0-34-generic #34~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep  7 13:12:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy

Any other ideas ? I’m suprised that this isnt more common, but maybe I’m missing something very obvious ! :slight_smile:

Kind Regards,

Al.ze

Out of curoristy I checked on a RPi4 with the lasted desktop version, follow the install instructions and same again.

Oct 21 11:56:00 raspberrypi kernel: usb 1-1.4.4: USB disconnect, device number 6
Oct 21 11:56:03 raspberrypi kernel: usb 1-1.4.4: new high-speed USB device number 8 using xhci_hcd
Oct 21 11:56:03 raspberrypi kernel: usb 1-1.4.4: New USB device found, idVendor=2b3e, idProduct=ace2, bcdDevice= 9.00
Oct 21 11:56:03 raspberrypi kernel: usb 1-1.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 21 11:56:03 raspberrypi kernel: usb 1-1.4.4: Product: ChipWhisperer Lite
Oct 21 11:56:03 raspberrypi kernel: usb 1-1.4.4: Manufacturer: NewAE Technology Inc.
<remove>
Oct 21 11:56:03 raspberrypi kernel: cdc_acm 1-1.4.4:1.1: ttyACM0: USB ACM device
Oct 21 11:56:03 raspberrypi mtp-probe[2849]: checking bus 1, device 8: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.4"
Oct 21 11:56:03 raspberrypi mtp-probe[2849]: bus: 1, device: 8 was not an MTP device
Oct 21 11:56:03 raspberrypi mtp-probe[2860]: checking bus 1, device 8: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.4"
Oct 21 11:56:03 raspberrypi mtp-probe[2860]: bus: 1, device: 8 was not an MTP device

If it wasnt for the fact it worked under Windows I would suspect the chipwhisperer itself was damaged/non-functional, but the fact the tutorials and tracecaptures do work on Windows shows something is not right - how bizzare.

Evening all, thought I would share an update as have seemingly resolved the issue, for TL/DR the following line seemed to do it.

mknod -m 666 /dev/ttyUSB0 c 188 0

I then recloned my scripts from my local Git repo on to the Pi, started up the cw pyenv and run the scripts, sure enough it worked ! Its been a little while since I wrote the script, but glad to see the debug output on the values that changed once communication to the target board worked.

python capture_traces.py 
scope.gain.mode                          changed from low                       to high                     
scope.gain.gain                          changed from 0                         to 30                       
scope.gain.db                            changed from 5.5                       to 24.8359375               
scope.adc.basic_mode                     changed from low                       to rising_edge              
scope.adc.samples                        changed from 24400                     to 5000                     
scope.adc.trig_count                     changed from 3838787685                to 3850483467               
scope.clock.adc_src                      changed from clkgen_x1                 to clkgen_x4                
scope.clock.adc_freq                     changed from 29538459                  to 96000000                 
scope.clock.adc_rate                     changed from 29538459.0                to 96000000.0               
scope.clock.clkgen_div                   changed from 1                         to 26                       
scope.clock.clkgen_freq                  changed from 192000000.0               to 7384615.384615385        
scope.io.tio1                            changed from serial_tx                 to serial_rx                
scope.io.tio2                            changed from serial_rx                 to serial_tx                
scope.io.hs2                             changed from None                      to clkgen                   
scope.io.tio_states                      changed from (1, 0, 0, 0)              to (0, 1, 0, 0)             
XMEGA Programming flash...
XMEGA Reading flash...
Verified flash OK, 4275 bytes
Capturing traces:  73%|█████████████████████████████████████████████████████████████████████████████████████████▌                                | 36689/50000 [18:22<06:08, 36.14it/

Very glad to have it working again ! :slight_smile: