Open aliphys opened 1 year ago
Related Github issues:
Related Arduino Forum Posts:
Great bug report, @aliphys 🙏
This issue is related to https://github.com/arduino/arduino-ide/issues/1319.
Arduino board continuously dis/reconnects
Does it happen in your local env? If yes, please help investigate it if you have the capacity.
The nightly build contains an important bug fix (arduino/arduino-ide#2101). If you download and start the nightly with the --log-level debug
flags as described here (with the macOS way), it will produce a correct log file. If you can reproduce the bug in IDE2, please quit the app, and share the most recent log file. The log files are at ~/.config/Arduino IDE/
on Linux.
We can use the Arduino CLI bundled inside the IDE2 to verify what is discovered. The Arduino CLI is at /path/to/Arduino IDE/resources/app/node_modules/arduino-ide-extension/build/arduino-cli
on Linux. It's inside the app, so you might need the ZIP build artifact. Please verify the version first with the ./arduino-cli version
command. It must be 0.33.1
. Then if you run the ./arduino-cli board list --watch --format json
command and attach the Arduino board, the CLI will produce JSON output to the console. The command is in watch mode, so if you attach/detach boards, it will update the terminal output. Please share the JSON output with us.
Please do not hesitate to ask if you need details on the instructions.
Thank you!
Update:
This issue is related to #1319.
I see it's already noted in https://github.com/arduino/arduino-ide/issues/2137#issuecomment-1632304097.
Hello @kittaakos :wave:
I have followed your two points and documented the outcome:
The nightly build contains an important bug fix (https://github.com/arduino/arduino-ide/pull/2101). If you download and start the nightly with the --log-level debug flags as described https://github.com/arduino/arduino-ide/issues/2100#issuecomment-1594818955 (with the macOS way), it will produce a correct log file. If you can reproduce the bug in IDE2, please quit the app, and share the most recent log file. The log files are at ~/.config/Arduino IDE/ on Linux.
I unzipped the arduino-ide_nightly-20230713_Linux_64bit
nightly build and ran the command ./arduino-IDE --log-level debug
. This is the initial output when the IDE starts up.
Then, this is what happens when I connect the board. The same connect/disconnect behaviour present in 2.1.1 is also evident in the nightly build.
We can use the Arduino CLI bundled inside the IDE2 to verify what is discovered. The Arduino CLI is at /path/to/Arduino IDE/resources/app/node_modules/arduino-ide-extension/build/arduino-cli on Linux. It's inside the app, so you might need the ZIP build artifact. Please verify the version first with the ./arduino-cli version command. It must be 0.33.1. Then if you run the ./arduino-cli board list --watch --format json command and attach the Arduino board, the CLI will produce JSON output to the console. The command is in watch mode, so if you attach/detach boards, it will update the terminal output. Please share the JSON output with us.
Arduino-cli version is 0.33.1 as you stated.
user@user-laptop:~/Downloads/arduino-ide_nightly-20230713_Linux_64bit/resources/app/node_modules/arduino-ide-extension/build$ ./arduino-cli version
arduino-cli Version: 0.33.1 Commit: 347bfeb0 Date: 2023-06-30T16:14:14Z
Following the ./arduino-cli board list --watch --format json
command, the device is repeatedly detected on /dev/ttyACM0
and then removed in a continuous cycle.
Nano BLE 33 Sense Detected
{
"type": "add",
"address": "/dev/ttyACM0",
"label": "/dev/ttyACM0",
"protocol": "serial",
"protocol_label": "Serial Port (USB)",
"hardwareId": "00000000000000007877035BF3A113E9",
"properties": {
"pid": "0x005a",
"serialNumber": "00000000000000007877035BF3A113E9",
"vid": "0x2341"
},
"boards": [
{
"name": "Arduino Nano 33 BLE",
"fqbn": "arduino:mbed_nano:nano33ble"
}
]
}
Nano BLE 33 Sense Removed
{
"type": "remove",
"address": "/dev/ttyACM0",
"protocol": "serial",
"properties": {}
}
Note: I do not see any log file (such as arduino-ide-debug.txt
refered to in https://github.com/arduino/arduino-ide/issues/2100#issuecomment-1597250665 ) in the mentioned folder. So I copied from the Terminal.
I had a similar issue, which was caused by brltty package on ubuntu. sudo dmesg -w
output when connecting the USB-C cable to Arduino (other than USB-C cables do work ...):
[144808.883753] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input450
[144808.885641] usb 3-2: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[144808.886135] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[144808.886178] ch341 3-2:1.0: device disconnected
The solution is also mentioned at https://www.reddit.com/r/archlinux/comments/q8uv43/help_arduino_not_recognizing_ttyusb/
Did you check if the ch340 drive is available or loaded in the system?
Describe the problem
Arduino board continuously dis/reconnects in the IDE. I cannot upload any sketch.
To reproduce
./arduino-ide_2.1.1_Linux_64bit.AppImage
command in the directoryExpected behavior
I can select the board from the drop down list and upload to it.
Arduino IDE version
2.1.1
Operating system
Linux
Operating system version
Ubuntu 22.04
Additional context
sudo adduser user dialout
commandbrltty
tool is uninstalledsudo apt remove brltty
Output of
sudo dmesg | tail -f
Issue checklist