Portenta H7 Linux - not working (Solved)

Hello,

I use Linux Manjaro. And Ardiuno Pro IDE. Its not working as it states:

Error: arduino-beta:mbed:envie_m7 is not a valid FQBN.

it seems to be the Port /dev/ttyACM0

lsusb gives me the following:

Bus 003 Device 002: ID 8087:8000 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 031: ID 2341:025b Arduino SA Envie M7
Bus 002 Device 015: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 002 Device 014: ID 0bda:5411 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 002 Device 020: ID 046a:0023 Cherry GmbH Keyboard
Bus 002 Device 019: ID e0ff:0002
Bus 002 Device 018: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 002 Device 005: ID 062a:5918 MosArt Semiconductor Corp. 2.4G Keyboard Mouse
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The 'Bus 002 Device 031: ID 2341:025b Arduino SA Envie M7' seems to be wrong. But its the only one changing on plugin / plug out.

Its connected via USB C. What could the Problem be here?

Hi @MindCode. It seems the alpha stage Arduino Pro IDE does not currently support FQBN that contain hyphens. Because the Portenta uses the same architecture name, "mbed" as the Nano 33 BLE, Arduino is currently using a temporary vendor name "arduino-beta" for the Portenta, so that the initial releases of the Portenta's board platform are optional for Nano 33 BLE users who have that board's dedicated platform installed already (Nano 33 BLE is also supported by the board platform used by the Portenta, so both boards will eventually use the same board platform).

For now, I would recommend you to use either the Arduino IDE or Arduino CLI, both of which support the Portenta.

There is a bug report about adding support to the Pro IDE for hyphenated FQBNs here:

You can follow that to get updates on developments.

If you do need to use the Pro IDE, I can provide instructions for a workaround to de-hyphenate the Portenta's FQBN.

Hello pert, thank you for your helpful response. I would like to try the workaround if possible. I would then decide whether to use this, or just switch to the normal Arduino IDE. It depends on whether there are negative impacts with the workaround or not.

OK, here are the instructions for the workaround:

Run this command from the terminal:

mv ~/.arduino15/packages/arduino-beta ~/.arduino15/packages/arduinobeta

(In the Arduino Pro IDE) File > Settings > Open CLI Configuration

To the "additional_urls" field of the arduino-cli.yaml file that is opened, add the URL:
https://gist.githubusercontent.com/per1234/e49b8ff532b1617d880a9f08298cada9/raw/af4158932e1537bc90bbc5c741340765eeb2c2c4/package_portentaworkaround_index.json
as shown below:

board_manager:
  additional_urls: [https://gist.githubusercontent.com/per1234/e49b8ff532b1617d880a9f08298cada9/raw/af4158932e1537bc90bbc5c741340765eeb2c2c4/package_portentaworkaround_index.json]

Wait for the "Index has been updated." message to be shown at the bottom right corner of the Pro IDE window.

Close all Arduino Pro IDE windows.

Start the Pro IDE again.

Doing this changes the Portenta's FQBN from arduino-beta:mbed:envie_m7 to arduinobeta:mbed:envie_m7, which will allow you to use the Portenta with the Arduino Pro IDE without getting the invalid FQBN error.


MindCode:
It depends on whether there are negative impacts with the workaround or not.

The problem with the workaround is that you are now using the temporary package index I published for the sake of this workaround. Previously, you were using the official package index from Arduino, which will be updated whenever there is a new release of the Portenta's platform, allowing you to easily keep the platform updated to the latest version. My package index won't be updated (due to the way I published it, I actually can't update it without changing the URL), which could cause you to continue using the current 1.2.0 version even after Arduino has released a new and improved version.

You would just need to check whether there is a new version available of the official platform from time to time.

The only other possible issue is that changing the vendor name from arduino-beta to arduinobeta will prevent other platforms (most likely a 3rd party platform) from being able to reference resources from the Portenta's platform. However, this is a brand new platform, which has a temporary vendor name, so it's very unlikely that any platform author will attempt to reference it. I'm sure there are not currently any platforms referencing it.

Once the next release of the Pro IDE is made with support for hyphenated FQBN, you can reverse the changes you made by following the instructions above to go back to using Arduino's official platform for the Portenta (name the folder back to arduino-beta and remove the temporary package index URL from the CLI configuration).

Thank you very much for this solution. It worked for me!

You're welcome. Please let me know if you have any more of this sort of problem (I already saw your other thread about uploading, and will see if I can figure anything out on that).

pert:
You're welcome. Please let me know if you have any more of this sort of problem (I already saw your other thread about uploading, and will see if I can figure anything out on that).

Hey Pert.

When is the Portenta H7 getting it's own thread. I have 2 in the mail.

Hi jerteach. There is now a forum board dedicated to the Portenta:
https://forum.arduino.cc/index.php?board=148.0
(I moved this topic there to make this information easy for Portenta users to find).

pert:
You're welcome. Please let me know if you have any more of this sort of problem (I already saw your other thread about uploading, and will see if I can figure anything out on that).

Hey Pert. Any idea if this fix still works for the Portenta and the FQBN issue I am trying version arduino-pro-ide-0.0.6-alpha.preview-linux64 and it xoes not seem to work. It did not like me renaming the core and auto tried to reload the core.

mv ~/.arduino15/packages/arduino-beta ~/.arduino15/packages/arduinobeta

I will keep working on it. The regular IDE is working fine. I have a ubuntu 20.04 computer.

Hi @jerteach. My workaround no longer works for new installs because Arduino made a new 1.2.1 release of Arduino mbed-Enabled Boards, but my package index file only had an entry for 1.2.0. So this caused the installation at ~/.arduino15/packages/arduinobeta/mbed/1.2.1 to not be recognized.

I have now updated my package index file to add the new release. Because I used a GitHub Gist, this changed the URL from the one in my previous instructions. I have now updated the URL, so they will work again.

@pert All good now. What threw me off is that the first time I reloaded the Pro IDE it said the latest release of the Portenta board was not loaded, since it was looking for the old location. When I stopped re-installing it and just tried it, it worked for both the Portenta and the nano 33 BLE sense. So all is good.

My next issue is that I want to try loading it without "sudo" but when I do that the board manager now looks in a different location for .arduino15 than when I loaded the Pro IDE with sudo.

Getting there, at least I now understand. Thanks Pert for making the new GIST.

jerteach:
it worked for both the Portenta and the nano 33 BLE sense. So all is good.

I'm glad to hear it's working now!

jerteach:
My next issue is that I want to try loading it without "sudo" but when I do that the board manager now looks in a different location for .arduino15 than when I loaded the Pro IDE with sudo.

This is known as the "data directory". You can configure the location of the data directory by opening the Arduino CLI configuration file via the Pro IDE's File > Settings > Open CLI Configuration menu, then setting the custom data directory location you want in the directories.data key. However, the user running the Pro IDE must have access to that directory, so you're not going to be able to set it to /root/.arduino15 when you're not running the Pro IDE as root. If there are things you need in /root/.arduino15, you can move the directory to a path accessible to the other user, then transfer ownership of it.

jerteach:
Thanks Pert for making the new GIST.

You're welcome. Thanks for making me aware that the workaround instructions were broken. I'll be sure to watch out for any new releases of Arduino mbed-Enable Boards and update it right away.

I can't seem to get both the Arduino IDE and the Pro IDE working on the same Ubuntu laptop.

I can get them both working individually using "sudo" to load them but if I install the arduino-beta for the regular IDE then the Pro IDE finds that directory and uses it instead of the new arduinobeta directory.

The other option is to go down the Ubuntu USB permissions rabbit hole and get either of the IDE's running properly without "sudo" . I tried here, but that is how I got to the "sudo" solution.

I know it is some silly little mistake I have done or one little extra command I don't know about, but that is where I am at at the moment.

My best solution is to use to Pro IDE for now to learn about it and then switch back later if needed. However when things don't work it would be nice to be able to test if the thing does not work in the other IDE.

pert:
Hi @jerteach. My workaround no longer works for new installs because Arduino made a new 1.2.1 release of Arduino mbed-Enabled Boards, but my package index file only had an entry for 1.2.0. So this caused the installation at ~/.arduino15/packages/arduinobeta/mbed/1.2.1 to not be recognized.

I have now updated my package index file to add the new release. Because I used a GitHub Gist, this changed the URL from the one in my previous instructions. So you can follow those same instructions, but use this package index URL in the "CLI configuration" step:
https://gist.githubusercontent.com/per1234/e49b8ff532b1617d880a9f08298cada9/raw/164f5bcd64215db078032267ce8f9326c5b33b60/package_portentaworkaround_index.json

Hey Pert is this going to get annoying for you. I just installed board manager 1.2.2 does that mean we need another gist?

.

jerteach:
I just installed board manager 1.2.2 does that mean we need another gist?

Yes, due to the way the Pro IDE's automatic board detection system works, I must add an entry in the workaround package index to mirror each release of the Arduino mbed-Enabled Boards platform. Due to the way the "raw" URL of a GitHub gist includes the hash, the new entry requires changing the Additional Boards Manager URL for the workaround. I made a poor choice by using a Gist to publish the workaround package index.

I updated the gist for the 1.2.2 release and updated the URL in the original instructions. However, I missed that I had also mentioned the 1.2.1 gist URL in that reply you quoted, and did not update that URL. So get the URL from reply #3 in this thread:
https://forum.arduino.cc/index.php?topic=691052.msg4646844#msg4646844

jerteach:
Hey Pert is this going to get annoying for you.

Not at all. It's just a quick copy/paste to update the gist

pert,

I answered your question over at #295:

C:\tmp>arduino-cli board list
Port Type Board Name FQBN Core
COM11 Serial Port (USB) Unknown
COM12 Serial Port (USB) Unknown
COM16 Serial Port (USB) Unknown
COM17 Serial Port (USB) Unknown
COM22 Serial Port (USB) Unknown
COM23 Serial Port (USB) Arduino NANO 33 IoT arduino:samd:nano_33_iot arduino:samd
COM4 Serial Port (USB) Arduino Portenta H7 (M7 core) arduino-beta:mbed:envie_m7 arduino-beta:mbed
COM5 Serial Port (USB) Unknown
COM6 Serial Port (USB) Unknown
COM7 Serial Port (USB) Unknown

@per1234 - is the (suspected) error a bug in the CLI bug list?

Regards,
John W.

jwestmoreland:
I answered your question over at #295:

I saw it, but unfortunately I don't have much knowledge about this. I was hoping that one of the other members of the Arduino Tooling Team might have a better idea and respond.

As I said, my suspicion was that this error was caused by something with your network settings interfering with the API query that is done to automatically identify official Arduino boards. If you look at the source code I linked, you can see that there is a "TODO" about making that query respect proxy settings, so I'd guess it will have problems if there is a proxy. With the Arduino IDE and Arduino CLI, this auto-detect is merely a convenience feature, so you wouldn't really notice if it wasn't working, but the Arduino Pro IDE makes more use of it.

But this is purely a guess, mostly just based on the "server" in the error message. But "server" could just be referring to the gRPC server provided by Arduino CLI to interface with the Pro IDE.

You might try Help > Toggle Developer Tools to see if that provides any clues. My interest would be in the "console" and "network" tabs.

Console:

2
construct.js:19 Uncaught (in promise) n: Request getBoardDetails failed with message: 13 INTERNAL: Failed to parse server response
    at Proxy.<anonymous> (file:///C:/Users/john/ArduinoProIDEBeta/resources/app/lib/bundle.js:7:1006348)
    at e.<anonymous> (file:///C:/Users/john/ArduinoProIDEBeta/resources/app/lib/bundle.js:1:1515035)
    at file:///C:/Users/john/ArduinoProIDEBeta/resources/app/lib/bundle.js:1:1511456
    at Object.next (file:///C:/Users/john/ArduinoProIDEBeta/resources/app/lib/bundle.js:1:1511561)
    at file:///C:/Users/john/ArduinoProIDEBeta/resources/app/lib/bundle.js:1:1510473
    at new Promise (<anonymous>)
    at o (file:///C:/Users/john/ArduinoProIDEBeta/resources/app/lib/bundle.js:1:1510247)
    at e.getBoardDetailsSafe (file:///C:/Users/john/ArduinoProIDEBeta/resources/app/lib/bundle.js:1:1514943)
    at e.<anonymous> (file:///C:/Users/john/ArduinoProIDEBeta/resources/app/lib/bundle.js:1:1513662)
    at file:///C:/Users/john/ArduinoProIDEBeta/resources/app/lib/bundle.js:1:1511456

When I hit F5 to look at network recording - the Pro IDE reloaded and disconnected from my board - so not sure how helpful that is - I will take a screenshot if you want to see that.

Do you have the Arduino CLI installation folder in your path? If so, you might try removing it from the path and restarting the Pro IDE. The Pro IDE currently has a behavior where if comes with a bundled copy of Arduino CLI, but if Arduino CLI is detected in PATH, then it uses that instead. The problem is that Arduino CLI is under active development, so a newer version of Arduino CLI may not be compatible with the Pro IDE. For this reason, there is discussion about changing this behavior so the bundled Arduino CLI is always used and users who do want to experiment with different Arduino CLI versions need to directly replace the bundled copy.

Hello Pert,

Yes - it's definitely in my path. OK - let me try that and I'll get back here shortly.

Thanks,
John