Portenta H7 on linux error: dfu-util not working (sudo Hacked)

Portenta H7 on linux dfu-util not working to install the compiled program.

Fresh arduino install with fresh board manager arduino mbed board. I have the Portenta working on windows. I can't get it installing a simple program.

I tried my Nano 33 BLE sense and it installed fine. The error code I am getting for the Portenta is this:

Arduino: 1.8.13 (Linux), Board: "Arduino Portenta H7 (M7 core)"

Sketch uses 114200 bytes (14%) of program storage space. Maximum is 786432 bytes.
Global variables use 57056 bytes (10%) of dynamic memory, leaving 466568 bytes for local variables. Maximum is 523624 bytes.
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2020 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: Cannot open DFU device 2341:035b
dfu-util: No DFU capable USB device available
An error occurred while uploading the sketch

On windows I noticed something about "A valid DFU suffix will be required in a future dfu-util release" but it seemed to be a warning not a crash. Anyone have any ideas? I may have an old version of dfu-util. So I will check that out.

On checking my Ubuntu dfu-util is version 0.9 but on my windows machine it is version 0.8. Not sure if that is the issue.

jerteach,

I'm getting the same thing on one of my win10 machines:

dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2020 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util / Tickets

Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
No DFU capable USB device available
Upload error: Error: 2 UNKNOWN: uploading error: exit status 74

I'm not sure if it's a driver issue with the Portenta or maybe with the dfu-util - but it does work on another win10 machine just fine.

So, it would appear this issue just isn't linux related.

Regards,
John

Something worth mentioning -

I had a terminal program that had the com port locked and I kicked off another compile - the IDE spewed almost the same exact DFU error message - so, make sure the COM port isn't getting locked and/or left open or maybe getting opened by some other utility.

Regards,
John W.

Thanks John. I have had to do something similar with ubuntu before. Have not solved it yet but looks like someone else has had a similar issue worth posting

I did already do the recommended (Which probably solves the issue for most people)

sudo usermod -a -G dialout USERNAME

In that post at the bottom it mentions these steps

sudo usermod -a -G tty USERNAME
sudo usermod -a -G dialout  USERNAME
sudo usermod -a -G uucp  USERNAME
sudo groupadd plugdev
sudo usermod -a -G plugdev  USERNAME


---reboot system ---

Nothing seems to be working for me. I even did a full re-install of the Arduino IDE using the most up to date release. Also tried

sudo killall -g dif-util

no help, or

sudo chmod 777 /dev/ttyACM0

which used to help with a different issue, also no help

Probably just my messed up Ubuntu laptop.

Interesting John about getting it on a windows machine. Curious if more people are going to see this issue. I feel there is an easy solution Just not sure what it is yet.

It definitely looks like the port is closed, just not sure how to get it open.

(SOLVED)

How do you solve everything on a linux machine. "sudo"

open a terminal

instead of just typing

arduino

to run the arduino IDE

type

sudo arduino

You have to load the board manager and re-install the portenta board, but now everything works.

There probably a better way to do it but I am happy since I can now keep testing my new Portenta H7 board. The preson "John" who had the problem on a windows machine should try running windows arduino as Administrator and see if that solves the problem. I would prefer not to run my Arduino IDE as sudo but a better solution for me at least can wait.

2 Likes

jerteach,

I was having an issue getting the Portenta_M7 in bootloader mode on my 'favorite' dev machine - it has a mother board that's a little older and some of the USB Drivers for the MB chipsets are not even update-able anymore via Intel...

I did what I could to make sure all of the drivers I could update were current.
I uninstalled, rebooted, reinstalled (more than once).

Whatever I did - the M7, after double-pressing reset - the driver under USB always would have an error and Code 10.

I finally moved the USB cable to one of the USB 2.0 ports only - meaning no USB 3.0 support - and guess what - the error went away and the Portenta_M7 enumerated properly when reset was double-pressed.

Before I did this - I was getting about every DFU error you can imagine in the Pro-Beta-IDE plus 1.8.12 and 1.8.13 and even seeing 'Serial Port is Busy' in the Pro-Beta-IDE.

So, for this MB and driver combo - I have to be using a USB 2.0 only port to get the Portenta_M7 into bootloader mode so it can be programmed.

Wow, this was, I'm a little embarrassed to say, the LAST option I thought of and it was the one that worked.

FWIW,
John

jerteach,

Are you sure this is solved?

Maybe not?

Regards,
John

I had this problem too and running as sudo worked, as for usb I did get the script to work on only one of 3 ports.

I have the same if not similar issue happening. Running under sudo doesn't help. The part is being enumerated fine according to dmesg.

[ 1710.706415] usb 1-1: new high-speed USB device number 25 using xhci_hcd
[ 1710.855211] usb 1-1: New USB device found, idVendor=2341, idProduct=025b, bcdDevice= 1.00
[ 1710.855216] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1710.855220] usb 1-1: Product: Envie M7
[ 1710.855222] usb 1-1: Manufacturer: Arduino
[ 1710.855225] usb 1-1: SerialNumber: 004B003331395116
[ 1710.857753] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

This perhaps means there's a software issue device side so communication cannot be established. Right now I am tinkering with udev rules to see if that could be the problem.

Ok, I solved it.

Please put this into new file /etc/udev/rules.d/99-arduino-portenta.rules

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="035b", GROUP="plugdev", MODE="0666"

Issue the following command

sudo udevadm control -R

Now you can run the command as user, but need to first put it into boot mode:

picocom /dev/ttyACM1 -b 1200

press ctrl-a, then ctrl-x, then issue the following, and your output should be similar:

rpcme@proteus:~$ dfu-util -l
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Found DFU: [2341:035b] ver=0200, devnum=7, cfg=1, intf=0, path="1-1", alt=1, name="@External Flash   /0x90000000/4096*4Kg", serial="200364500000"
Found DFU: [2341:035b] ver=0200, devnum=7, cfg=1, intf=0, path="1-1", alt=0, name="@Internal Flash   /0x08000000/01*128Ka,15*128Kg", serial="200364500000"

Unfortunately, after flashing the device a few times it looks like it's bricked - the usb won't enumerate now, and not sure if it's recoverable. It's not my machine because I bought two boards and the second one works fine.

Not a great start, hate to say :frowning:

2 Likes