Skip to content

stdout from arduino-fwuploader is not logged #1497

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

Open
3 tasks done
per1234 opened this issue Sep 26, 2022 · 0 comments
Open
3 tasks done

stdout from arduino-fwuploader is not logged #1497

per1234 opened this issue Sep 26, 2022 · 0 comments
Labels
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 Sep 26, 2022

Describe the problem

The non-GUI aspects of the Arduino IDE's "WiFi101 / WiFiNINA Firmware Updater" and "Upload SSL Root Certificates" features are provided by a command line tool named "Arduino Firmware Uploader" (executable name arduino-fwuploader).

Only the most basic feedback is provided in the IDE's GUI about the progress of updating firmware or uploading a certificate. In the event the process fails, the logs can be checked for the output of the tool, which should provide more information about the problem.

🐛 Only the stderr stream from arduino-fwuploader is printed in the logs. The stdout stream may contain information essential for troubleshooting the failure.

To reproduce

Equipment

Steps

  1. Connect the Arduino board to your computer using a USB cable.
  2. Run the following command from the root of the Arduino IDE installation folder:
    ./resources/app/node_modules/arduino-ide-extension/build/arduino-cli monitor --port <serial port>
    
    (where <serial port> is replaced by the port address of the board)
    This will not be possible if using the Linux AppImage package of the IDE. You can open the port in a standalone installation of Arduino CLI, Arduino IDE 1.x Serial Monitor, or any other application.
  3. Start Arduino IDE 2.x from the command line.
  4. Select Tools > WiFi101 / WiFiNINA Firmware Updater from the Arduino IDE menus.
  5. Select the board from the "Select Board" menu.
  6. Click the Check Updates button.
  7. Click the INSTALL button.
  8. Wait for the firmware installation process to fail.
  9. Open the window of the command line terminal you started the IDE from.
    🐛 The arduino-fwuploader output shown in the logs is not very helpful:
    fwuploader ERROR Error: Error executing "C:\ide 2\tip\130-8783952\resources\app\node_modules\arduino-ide-extension\build\arduino-fwuploader.exe" firmware flash --fqbn    arduino:mbed_nano:nanorp2040connect --address COM8 --module [email protected]: error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
        at ChildProcess.<anonymous> (C:\ide 2\tip\130-8783952\resources\app\node_modules\arduino-ide-extension\lib\node\exec-util.js:53:31)
        at ChildProcess.emit (node:events:394:28)
        at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
    
  10. Run the arduino-fwuploader command shown in the logs from a command line terminal.
    🙂 The output contains valuable information about the cause of the failure:
    $ "C:/ide 2/tip/130-8783952/resources/app/node_modules/arduino-ide-extension/build/arduino-fwuploader.exe" firmware flash --fqbn arduino:mbed_nano:nanorp2040connect --address COM8 --module [email protected]
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    

Expected behavior

The logs contain the combined stdout and stderr streams from arduino-fwuploader.

Arduino IDE version

2.0.0-snapshot-8783952

Operating system

Windows

Operating system version

10

Additional context

I used "Tools > WiFi101 / WiFiNINA Firmware Updater" for the demo, but the same problem also occurs with the "Upload SSL Root Certificates" feature.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

1 participant