arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.22k stars 379 forks source link

Ports of Arduino boards not discovered when IDE used on ChromeOS machine #2335

Open narooko opened 8 months ago

narooko commented 8 months ago

Describe the problem

On ChromeOS i have tried using the Appimage package of Arduino IDE within the Linux dev environment but the IDE has not shown/had access to the ports of the devices plugged in.

To reproduce

  1. Download the Appimage package of Arduino IDE
  2. Install nautilus file manager
  3. Give execute perms
  4. Run Appimage
  5. Connect device to program via USB, in my case: Arduino Nano ESP32, Nano RP2040, ESP32 WROOM, Heltec ESP32 Wi-Fi V3

Expected behavior

Ports of connected boards are listed in the Board Selector and Tools > Port menus.

Arduino IDE version

2.2.1

Operating system

ChromeOS

Operating system version

chrome 121.0.6167.49 (Official Build) beta (64-bit)

Additional context

It works as expected when I use Arduino IDE 1.x downloaded via the cli within the Linux development environment. The ports are recognized and it allows for programming.


Sometimes the Arduino IDE 2.x application does not launch.


Additional system detail: Platform ---- 15699.29.0 (Official Build) beta-channel dedede Firmware Version -- ---- Google_Madoo.13606.494.0 Active Variations --------- 3a8271ac-b5a883c0

Issue checklist

per1234 commented 8 months ago

Hi @narooko. I'm going to ask you to check whether the low level serial-discovery tool used by the Arduino development software to find ports is behaving and able to see the port of your board.

I'll provide the instructions here. Note that these instructions are written for use on a standard Linux system. I don't have any experience with ChromeOS or access to a ChromeOS machine so I can't verify that they will apply exactly to your machine. You'll just have to extrapolate if any minor adjustments are needed.


❗ This procedure is not intended to solve the problem. The purpose is to gather more information.


During all this, keep an eye out for anything that doesn't match the expected behavior as described at each step.

  1. Open a command line terminal.
  2. Run the following command:
    ~/.arduino15/packages/builtin/tools/serial-discovery/1.4.0/serial-discovery

    serial-discovery will now start. There won't be any obvious sign of this other than that there is no longer a command prompt at the cursor in the terminal.

  3. Type the following command:
    HELLO 1 "arduino-cli 0.34.0"
  4. Press the Enter key. You should now see a response printed exactly like this:
    {
     "eventType": "hello",
     "protocolVersion": 1,
     "message": "OK"
    }
  5. Unplug your Arduino board from your computer if you have it plugged in.
  6. Type the following command:
    START_SYNC
  7. Press the Enter key. You should now see a response printed exactly like this:
    {
     "eventType": "start_sync",
     "message": "OK"
    }

    You might also see some additional objects in the output depending on which serial ports are available on your computer.

  8. Plug your Arduino board into your computer. You should now see a response printed that looks something like this:
    {
     "eventType": "add",
     "port": {
       "address": "/dev/ttyACM0",
       "label": "/dev/ttyACM0",
       "protocol": "serial",
       "protocolLabel": "Serial Port (USB)",
       "properties": {
         "pid": "0x804e",
         "vid": "0x2341",
         "serialNumber": "EBEABFD6514D32364E202020FF10181E"
       }
     }
    }

    This is only an example of what you might see. The output will be different depending on the board you connected.

  9. Unplug your Arduino board from your computer. You should now see a response printed that looks something like this:
    {
     "eventType": "remove",
     "port": {
       "address": "/dev/ttyACM0",
       "protocol": "serial"
     }
    }

    This is only an example of what you might see. The address field value should be the same as the "add" event you saw when you plugged the board in.

You should continue to see the same results if you repeat steps (10) and (11).

Once you are done with your experiments with the "serial-discovery" tool, follow these instructions to exit:

  1. Type the following command:
    STOP
  2. Press the Enter key. You should now see a response printed exactly like this:
    {
     "eventType": "stop",
     "message": "OK"
    }
  3. Type the following command:
    QUIT
  4. Press the Enter key. You should now see a response printed exactly like this:
    {
     "eventType": "quit",
     "message": "OK"
    }

    You should now be back at the terminal command line.

Please reply to tell us whether you were able to run serial-discovery and whether it recognized the port of your Arduino boards.

narooko commented 7 months ago

A few key things I was able to determine: