>>> Join Us in the Fight Against Air Pollution

AirGradient Forum

Issue flashing firmware on AirGradient One v9

Apologies if this topic is a duplicate:; I’ve unfortunately not found the answer in previous posts.

I’ve recently received my pre-soldered One v9 kit… everything went well with the assembly and first setup, ollowing instructions at The AirGradient ONE Air Quality Sensor (Presoldered-Version, PCB Version 9).

Flashing the firmware using the web-browser as described at The AirGradient ONE Air Quality Sensor (Presoldered-Version, PCB Version 9) is problematic for me, however.

Clicking the orange “Flash Firmware” button, I’m presented with a choice of ports:
image

If I’m correct, the port to choose here is the “USB JTAG…”.
Selecting it, then “connect”, unfortunately, leads me to the following error:

Failed to execute 'open' on 'SerialPort': Failed to open serial port.

I experience the same thing whether I just plug the USB power with or without pressing the “SW BOOT” button while powering up (as described in AirGradient One - not working after flashing with Arduino - #4 by Achim_AirGradient

The USB cable I’m using is the one provided with the kit. I’ve tried with another cable I have laying around but I see the same problem.
I’m attempting this from an openSUSE Tumbleweed system, and the Vivaldi browser. I’ve tried the Chromium browser and got the same thing as well.

I would appreciate if someone would share some pointers to explain this issue… Thanks a lot in advance!

Please check/try the following:

  • is the serial port already used by another program eg the Arduino IDE?
  • is your browser on the latest version?
  • do you have access to a windows or Mac that you can try?

I am pretty sure it has to do with your Linux environment but I don’t have much experience with Linux. Maybe others can help?

Hi @Achim_AirGradient , and thanks for such a quick reply!

The port is not currently used, at least not to my knowledge.
The browser is indeed on the latest version.
Trying on a Windows machine will take me some time but I’ll see.

In the meantime, I’m looking into trying the Arduino IDE route, maybe… I could follow the instructions there: Install the Arduino Software for the ESP32-C3
From the Section " Flashing Of The AirGradient Firmware", would you have a link for the “BLINK example” mentioned at step 4? I’m not familiar with flashing using the Arduino IDE so I’d rather see proper instructions before I start pushing buttons I shouldn’t.

The blink example is accessible from the Arduino IDE examples. But actually the blink example won’t work for the new v9 board as it doesnt use the D1 mini anymore.
In general you cannot completely brick the board (at least it never happened so far). So you can give it a try. Also feel free to reach out through our support form and we could have a quick zoom call. Just keep in mind that I am not familiar with Linux.

1 Like

Thanks, @Achim_AirGradient,

I can confirm that the firmware flashing from the webpage worked just fine from a Windows machine. That’s not a long term solution for me so I’ll explore the manual flashing via the Arduino IDE as well. The error I had really sounded like a permission issue so hopefully I’ll be able to figure it out.

@FroggyFlox You might verify that your user has permissions to interact with that device /dev/ttyACM0. On different flavors of linux it’s owned by different groups.

ls -lah /dev/ttyACM0 should give you the user group you need to be a part of to read/write to the serial port.

Once you have that, replace $newgroupname below with it, and $yourusername with your current username

usermod -a -G $newgroupname $yourusername

Then log out and back in to refresh your user session. I know in Arch it’s uucp and on debian/ubuntu it’s dialout, not sure what it is on tumbleweed.

Hi there.
This advice works for Ubuntu, but I would add a couple of points.
I’m using the latest Ubuntu, full patched and up to date.
Ensure the airgradient is attached to you computer by the white usb cable that comes with it.
Open a terminal and, as kazcho says, run: ls -lah /dev/ttyACM0
Then, as kazcho says, replace $newgroupname below with it, and $yourusername with your current username
Then run as root:
sudo usermod -a -G dialout $yourusername
Note: sudo - you will need to enter your password.
Then log out and log in.
The documentation says use Chrome for the next step (or I guess Chromium on Ubuntu). But that did not work. So I tried a Chromium variant, Brave. And it worked. So,
open brave and navigate to: the AirGradient ONE (I-9PSL) and Open Air (O-1PST) Firmware Versions page
And follow the instructions there.
I successfully updated from 3.1.1 to 3.1.9

But now I have a different problem…