Posts | Comments

Planet Arduino

Archive for the ‘IDE’ Category

This article was written by Luigi Gubello, Arduino Security Team.

Be kind to the end user. At Arduino, we like to develop powerful ideas into simple tools. This is the spirit behind our team’s efforts in launching our IoT Cloud platform: making the Internet of Things accessible and easy for everyone. We can now offer a complete low-code IoT application development platform that seamlessly integrates with our hardware products: Arduino IoT Cloud.

Behind such simplicity, you’ll always find a thorough design study carried out by our team in order to offer a user-friendly IoT cloud solution, which is suitable for everything from your first IoT project to state-of-the-art professional use — what the user needs to do is connect their compatible Arduino board to a computer and follow the steps displayed in the browser window. The process will configure the device to securely connect to the Arduino IoT Cloud, thus creating an  Internet-connected device in minutes.

So how does Arduino IoT Cloud provisioning work?

TLS Client Authentication

In a previous blog post titled “Arduino Security Primer,” we began to introduce how the device provisioning works, showing how security is a fundamental requirement for us. The Arduino IoT Cloud security model is based on three key elements: an open-source library named ArduinoBearSSL, a Hardware Secure Element, and a device certificate provisioning for TLS Client Authentication. 

The TLS Client Authentication (or TLS Mutual Authentication) is an authentication method in which the server verifies the client’s identity through a certificate to grant or deny access to the device. In the standard TLS handshake, only a client authenticating a server is required, while in TLS Client Authentication, the server also needs to authenticate the client by verifying its identity. If the server cannot trust the client’s identity, it does not authorize a connection.

In the TLS Client Authentication system, the device’s credentials are replaced by a signed certificate that guarantees the device identity, thereby eliminating some security risks such as credentials stealing, weak passwords, or brute-force attacks. During the device provisioning process, a certificate — signed by our certificate authority — is stored inside the hardware secure element of supported Arduino boards to be used when identity verification is required.

ArduinoECCX08 Library

In order to communicate with the Microchip secure element (ATECC508A or ATECC608A) mounted on some Arduino boards, our engineering team developed an open-source library (ArduinoECCX8) which is used for device provisioning by the Arduino IoT Cloud. This library is responsible for writing and reading data from the secure element. In particular — during the provisioning stage — it manages the generation of private keys, certificate signing requests, and certificate storage. This library can also be used to generate self-signed certificates and to sign JWT, using the public key generated by the crypto chip.

Arduino Provisioning Sketch

IoT device provisioning for the Arduino IoT Cloud is performed by an open-source Arduino sketch, Provisioning.ino, contained in our ArduinoIoTCloud library. 

The entire device provisioning process is hidden behind a browser based user-friendly interface, so that users can quickly and easily connect their Arduino boards to the Arduino IoT Cloud by following a step-by-step procedure from the Getting Started page. During this process, the provisioning sketch is uploaded to the Arduino board and the open-source Arduino Create agent interacts with the browser content to help complete the device registration procedure. Taking a look at the provisioning source code to better understand what happens “behind the scenes,” it is possible to see how we use the hardware secure element.

The secure element’s slot 0 is used for storing the device private key, only the secure element can access its content. Slots 10, 11, and 12 are used for storing the compressed certificate, signed by Arduino’s certificate authority.

const int keySlot                                   = 0;
const int compressedCertSlot                        = 10;
const int serialNumberAndAuthorityKeyIdentifierSlot = 11;
const int deviceIdSlot                              = 12;

At first, the sketch configures and locks the hardware secure element. This process is required to begin using the device.

#include "ECCX08TLSConfig.h"

[...]

    if (!ECCX08.writeConfiguration(DEFAULT_ECCX08_TLS_CONFIG)) {
      Serial.println("Writing ECCX08 configuration failed!");
      while (1);
    }

After the hardware secure element has been configured, a private key and a certificate signing request (CSR) are generated.

 if (!ECCX08Cert.beginCSR(keySlot, true)) {
    Serial.println("Error starting CSR generation!");
    while (1);
  }

  String deviceId = promptAndReadLine("Please enter the device id: ");
  ECCX08Cert.setSubjectCommonName(deviceId);

  String csr = ECCX08Cert.endCSR();

The Create Agent takes the generated CSR and sends it to the server via the Arduino IoT Cloud API in order to receive a signed certificate. At this point the signed certificate is sent to the Arduino board and stored in the secure element.

  if (!ECCX08Cert.beginStorage(compressedCertSlot, serialNumberAndAuthorityKeyIdentifierSlot)) {
    Serial.println("Error starting ECCX08 storage!");
    while (1);
  }

[...]

  if (!ECCX08Cert.endStorage()) {
    Serial.println("Error storing ECCX08 compressed cert!");
    while (1);
  }

Once the signed certificate is successfully stored, the device provisioning is complete and the Arduino board is ready to connect to the Arduino IoT Cloud.

Self-Provisioning

The Arduino IoT Cloud facilitates the first approach to the Internet of Things, providing a simple user experience, but beneath its simplicity lies a powerful tool to develop professional projects. Our platform offers access to the Arduino IoT Cloud API, which is ideal for automation workflows.

In this use case, we will demonstrate how a user in need of provisioning a device fleet can automate and improve the process through the use of the Arduino IoT Cloud’s API and our open-source Arduino_JSON library. The following code is a self-provisioning sketch optimized for the Arduino Nano 33 IoT, which automatically takes care of registering the board to the Arduino IoT Cloud once uploaded to the board and executed.

[Self-provisioning for MKR WiFi 1010 and Nano 33 IoT in prod: https://github.com/arduino-libraries/ArduinoIoTCloud/tree/master/examples/utility/SelfProvisioning]

To further enhance this process, we use our open-source Arduino CLI to quickly upload the code to the board. All that’s needed is a simple command:

arduino-cli compile -b arduino:samd:nano_33_iot -u -p /dev/ttyACM0 SelfProvisioning

These are only a few of the features that show how the Arduino hardware products and cloud service can automate processes and create an interconnected system to improve users’ projects and businesses. There will be an increasing number of connected and communicating devices added in the near future, and we are working to make this IoT revolution user-friendly, accessible, and open-source.

This article was written by Silvano Cerza and Ubi de Feo from the Arduino Tooling team.

Over the past two months our newly established Tooling Team has taken over operations concerning the Arduino CLI and Pro IDE.

We’ve been silent at work in our little rooms, striving to come up with solutions to reported issues and features requests.

As time went on, the development of the CLI and Pro IDE has been moving forward in a parallel fashion, so here we bring you new versions of both applications for you to play with and build your workflows around.

arduino-cli 0.12.0

The new Arduino CLI is alive and kicking!

Highlights for this release include:

  • We introduced high-level update, outdated, upgrade commands to make arduino-cli more package manager like
  • Package index is now downloaded automatically at first run
  • Custom post-installation scripts can now be executed safely (3rd party cores will issue non blocking warnings)
  • Slight but useful UX improvements
  • Bugfixes
  • Security bugfixes

Remember, we have CLI nightly builds if you want to stay updated on the latest features!

Release link

Arduino Pro IDE

The Arduino Pro IDE is now better than ever! The team squeezed out a very juicy release, enough to skip ahead in the version numbers and jump from 0.0.6 to 0.1.0.

Highlights for this release include:

  • Updated the bundled CLI version to ‘0.12.0’
  • Reworked the menu organization
  • Added support for upload using external programmers
  • UI bugfixes aplenty

We are pleased to announce that from now on we have nightly builds available if you want to try out the latest features (and bugfixes). They can be found at the links below depending on your preferred operating System:

Release link

Today, we are excited to announce the arrival of the Arduino IDE 1.8.13.

Significant improvements include fixing the crash on Mac OS X with multiple monitor setups and resolving the recent package_index.json issue without other user intervention.

You will also notice that the boards listed in the “Tools” menu are now grouped by platform, making it easier to navigate when you have multiple boards loaded.

To see the full list of features, be sure to check out the changelog here. And as always, a big thank you to our community for their incredible support and contributions!

We’ve released the first prototype of one of the most requested Arduino Pro IDE features: the Arduino Debugger

Key features

  • executes your Arduino sketch step-by-step while it’s running on your Arduino board!
  • pause your sketch execution placing breakpoints
  • inspect variables values during execution

Initially supporting SAMD21 boards the Arduino Pro IDE debugger is available for Windows, Mac OSX and Linux64.

You can try the Arduino Debugger as a feature of the latest Alpha preview version for the Arduino Pro IDE; more details like tutorials etc will follow on soon!

Today, we are excited to announced the arrival of the Arduino IDE 1.8.12.

Wow! Another release just after two weeks, you ask?

Well, we fixed some serious bugs related to the compiler, and more importantly, we had to take a step back with respect to the transition to the new Java Virtual Machine from OpenJDK. Since we had received so many reports from our users, we decided to do a release with the old JVM in order to have a bit more time to properly handle those issues and at the same time guarantee a better experience to our users.

As usual, if you are curious, you can find the full changelog and contributors in the release notes here.

Our dev team has some more exciting news to share: Arduino Pro IDE v0.0.4-alpha has been released.

Highlights include:

  • Automatic Arduino language server (LS) recovery. From now on, if the LS process terminates, it restarts automatically.
  • Updated the bundled Clang version to 9.0.0. Bundled Clangd into the application for all supported platforms.
  • Better keybinding support for the upload, verify, and the serial monitor.

You can download the latest version here.

We’re excited to announce that Arduino IDE 1.8.11 is here!

In addition to the usual load of bugfixes and small improvements under the hood, the latest version includes:

  • Improved support for Mac OS X (the app is now notarized and strictly follows the latest OS X recommended security guidelines)
  • A “send text” command within the serial plotter (so you can interact with the board while plotting data!)
  • Better sketch build time
  • Updated AVR core and WiFi firmware

As always, we must thank our amazing community for their incredible support and contributions. The complete list of changes and contributors can be found in the full changelog.

Last weekend we announced that we’re working on the new Arduino Pro IDE and we got a huge response! Let’s take a deeper look at what is in store.

Here are the choices you have to develop code from Arduino today — some you might know, others you might not — and how they paved the way for a brand new IDE. 

Arduino Create

The quickest way to get started developing for Arduino today. 

A simple, modern web app version of the Arduino IDE — with boards and libraries available without needing an install. Just open your web browser, head to create.arduino.cc/editor to get started.

In the creation of the new Arduino Pro IDE, we chose to build on the Theia framework. As Theia is based on Electron, using web technologies, it allows us to unify the front-end development work and user experience between the web-based Arduino Create and the Arduino Pro IDE desktop application. Magic!

Arduino CLI

Designed for power users; everything you need from the command line.

Arduino CLI is a single binary command line solution that provides builder, boards/library manager, uploader, discovery and many other tools needed to use any Arduino compatible board and platforms. You can include this in Makefiles or use it to add Arduino support to whatever development flow you prefer. Whether you use Atom, Eclipse, Emacs, Vim, VSCode, or are even building your own tools, Arduino CLI makes this possible. You can try it today at arduino-cli.

The Arduino CLI

Arduino CLI is already hard at work in the backend of Arduino Create enabling day-to-day development for over one million users. The daemon mode support and gRPC interface means the User Interface doesn’t even need to be running on the same machine as the Arduino CLI — this opens the potential for remote build and deploy to Linux machines such as Raspberry Pi. Third party boards are also supported today through a configuration file. The backend of Arduino Pro IDE is also based on Arduino CLI, naturally.

Arduino IDE

A simple classic.

The simplicity of the classic Arduino IDE has made it one of the most popular in the world — with over 15 millions downloads per year. If you want to develop code for Arduino and prefer not to use the online tool Arduino Create you can get started today by downloading the classic Arduino IDE application. 

The classic Arduino IDE

We felt it was very important to maintain continuity with this look and feel in the Arduino Pro IDE. For this reason it has a mode identical to the classic Arduino IDE that millions of you are familiar with — the difference being if you want advanced mode, you have that too!

Arduino Pro IDE

More features for advanced users (still in development).

Which brings us the upcoming Arduino Pro IDE! This is a product still in development, but we’ve opened up the alpha binary so early users can try it out and give feedback – the source code will be released at a later date. Because it is not yet ready for production release you must expect bugs and unimplemented features. (If you just want to get your Arduino project running, we’d recommend Arduino Create or the classic Arduino IDE for now.)

The Pro Arduino IDE

However, if you want to be the first to try it and give us feedback to help shape the product as we develop it, please give it a try! The preview is already available for Windows, Linux and Mac OSX.

Initial feature list

  • Dual Mode; Classic Arduino look and Pro (File System view)
    • The tool only reveals advanced features when you need them
  • Modern fully featured development environment 
    • Modern look, multi-panel IDE with integrated file system view
    • Designed for developing larger, multi-file, repository-based projects
  • Debugger coming soon!
    • Set breakpoints, view trace, step through execution and much more
    • Debug your application without affecting timing with a Serial.print()
  • Open to third party plug-ins and boards coming soon!
    • Add third party boards, libraries and IDE function plug-ins
  • Support for additional languages other than C++ coming soon!
    • Exactly what it says, and it’s going to be exciting!
  • New Board Manager, Library Manager and Serial Monitor
    • All the features you expect in a cleaner more modern environment
  • Basic Auto Completion (Arm targets only)
  • Git Integration
  • Dark Mode
    • Easier on the eyes

That’s all for now

We’ve been working to improve our tools and give the community choices that fit their way of working – be that web-based, desktop application or command-line. The Arduino Pro IDE builds on these to bring something new — we’re excited to share the alpha preview with you and look forward to your feedback!

Live from Maker Faire Rome on Saturday, October 19th at 16.00 CET, Massimo Banzi and Luca Cipriani will push the button to release the new Arduino Pro IDE (alpha) — watch this space.

The hugely popular Arduino IDE software is easy-to-use for beginners, yet flexible enough for advanced users. Millions of you have used it as your everyday tool to program projects and applications. We’ve listened to your feedback though, and it’s time for a new enhanced version with features to appeal to the more advanced developers amongst you.

We are very excited to be releasing an “alpha” version of a completely new Development Environment for Arduino, the Arduino Pro IDE. 

The main features in this initial alpha release of the new Pro IDE are:

  • Modern, fully featured development environment 
  • Dual mode, classic mode (identical to the classic Arduino IDE) and pro mode (file system view)
  • New Board Manager 
  • New Library Manager
  • Board List
  • Basic auto completion (Arm targets only)
  • Git integration
  • Serial Monitor
  • Black theme

But the new architecture opens the door to features that the Arduino community have been requesting like these that will be following on soon:

  • Sketch synchronisation with Arduino Create Editor
  • Debugger
  • Fully open to third party plug-ins 
  • Support for additional languages than C++

The new Arduino Pro IDE is based on the latest technologies as follows: 

Available in Windows, Mac OSX and Linux64 versions; we need your help in improving the product. Before releasing the source code to move out of the alpha, we would greatly appreciate your feedback. Like all things in the Arduino community, we grow and develop together through your valued contributions. Please test the Arduino Pro IDE to it’s breaking point, we want to hear all the good and bad things you find. We’re open to recommendations for additional features, as well as hearing about any bugs you may find – there’s bound to be a few as it is an alpha version afterall!

Versions (released from 16.00 CET on Saturday, October 19th)

Arduino Pro IDE Windows v0.0.1-alpha.preview

Arduino Pro IDE OSX v0.0.1-alpha.preview

Arduino Pro IDE Linux v0.0.1-alpha.preview

So give it a go and let us know of any feature requests or bugs at: https://github.com/arduino/arduino-pro-ide/issues

For those of you who love and cherish the classic Arduino IDE, don’t worry it will continue to be available forever.

Hey Arduiners,

Today we are releasing IDE 1.8.10 and you should try it because it’s awesome! With the support of our incredible community, we’ve been improving a lot of (small and not so small) things.

Besides taking a look at the complete changelog, we’d like to point out one outstanding contribution that we received during this dev cycle.

Our friend Joe Wegner from APH reached out to us with a very clear plan on how to improve the IDE’s accessibility with some very convenient patches. With the help of co-founder Tom Igoe and ITP alumnus and research resident Jim Schmitz, we’ve started targeting some of the most problematic components that used to interact badly with screen readers (popups, links, lists not entirely navigable by keyboard) while also adding a plethora of accessibility descriptions to components that were basically hidden for blind and visually impaired users.

To keep things clean, Wegner added a checkbox under Preference panel to enable some particular optimizations for screen readers (like transforming links into buttons so they can be reached using the TAB key).

We hope it is the start of a lasting collaboration to make Arduino truly available for everyone willing to learn and hack with us.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook