Skip to content

Firmware update fails if Serial Monitor is open #684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
per1234 opened this issue Dec 14, 2021 · 1 comment · Fixed by #688
Closed

Firmware update fails if Serial Monitor is open #684

per1234 opened this issue Dec 14, 2021 · 1 comment · Fixed by #688
Assignees
Labels
conclusion: resolved Issue was resolved criticality: low Of low impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Dec 14, 2021

Describe the bug

The Arduino IDE includes a "WiFi101 / WiFiNINA Firmware Updater"" tool that can be used to update the firmware on the WiFi radio module of Arduino boards such as the MKR WiFi 1010 and Nano 33 IoT.

If the Serial Monitor is open when a firmware update is attempted, it fails.

To Reproduce

  1. Connect an Arduino board that has a u-blox NINA-W102 module to your computer via the USB cable.
  2. Select the board and port in the IDE.
  3. Open the Arduino IDE Serial Monitor (Tools > Serial Monitor).
  4. Select Tools > WiFi101 / WiFiNINA Firmware Updater from the Arduino IDE menus.
  5. Select the board in the Firmware Updater dialog.
  6. Click the Check Updates button.
  7. Click the Install button
    (it doesn’t matter which firmware version you flash).
  8. Wait for the update process to finish.

The process fails without any indication of the cause

⚠️ Installation failed. Please try again.

Expected behavior

Ideally, the IDE's Firmware Updater tool would automatically close the serial port as needed, reopening it in Serial Monitor once done, similar to how it is handled during the Upload process.

If that is not feasible, it should check for open Serial Monitor at the start of the firmware update process and clearly communicate to the user that they must close it. This is the approach taken by the classic IDE's firmware updater tool:

Clipboard01

Desktop

  • OS: Windows 10
  • Version: 2.0.0-rc2
    Date: 2021-12-13T10:09:39.122Z
    CLI Version: 0.20.2 [13783819]

Additional context

I think it could be a common occurrence because most often people are motivated to update their firmware after seeing the outdated firmware message that is printed to Serial Monitor by the "CheckFirmwareVersion" example of the WiFiNINA library or by the ArduinoIoTCloud library.

@per1234 per1234 added criticality: low Of low impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Dec 14, 2021
@ubidefeo
Copy link

When this kind of prioritised workflows are intiated (we might have something else in the future) we should force close the Serial Monitor and Serial Plotter views/apps and close the connection.
Firmware update is a blocking operation anyway, and messing with serial ports in the process will sure lead to failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: low Of low impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants