I have been using the Arduino Pro IDE for compiling the marlin 2.0.x code for 3d printers. It work well enough on two of my systems, but having a port recognition problem on one system.
Here is the environment:
Windows 10
Arduino Pro IDE Alpha 0.1.4
The 3D Printer has an Arduino MEGA 2560 with a RAMPS 1.4
Windows recognized the Mega 2560 as: TAURINO - ATMega250 compatible2 (COM5)
The problem is the Pro IDE doesn't recognize the port.
Tried the usual reboot, reinstall the IDE, unplug the USB and re-plug, all were no help.
UPDATE:
I just tried it with a genuine Arduino MEGA2560 and that didn't help either.
This is strange. It would be helpful to me if you could run a command from the command line. Please open up a cmd window in your Arduino Pro IDE installation folder and run this:
resources\app\node_modules\arduino-ide-extension\build\arduino-cli board list
C:\arduino-pro-0.1.3\arduino-pro-ide_0.1.3_Windows_64bit>
C:\arduino-pro-0.1.3\arduino-pro-ide_0.1.3_Windows_64bit>resources\app\node_modules\arduino-ide-extension\build\arduino-cli board list
Error detecting boards: error getting port list from serial-discovery: decoding LIST command: timeout
Ignore my Previous Post, that was actually test output from a different machine. This is the result from the machine in question.
C:\arduino-pro-ide_0.1.4>resources\app\node_modules\arduino-ide-extension\build\arduino-cli board list
Error detecting boards: error getting port list from serial-discovery: decoding LIST command: timeout
Please try running this command and then post the output:
resources\app\node_modules\arduino-ide-extension\build\arduino-cli board list --timeout 90s --verbose
That increases the timeout duration to give it some extra time to detect your boards. That still doesn't answer the question of why it's taking longer than 10 seconds to detect the board, but at least we can get some more information.
I added the --verbose flag, which will produce a lot of output, and so might make it exceed the forum's 9000 character limit. If so, please save the output to a text file and then attach that in a reply here. If you click thee "Reply" button, you'll see an "Attachments and other options" link that will allow you to make the attachment.
For what it is worth, on this specific error:
INFO[0090] Checking signature error="opening signature file: open C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\installed.json.sig: The system cannot find the file specified."
There is a file at that location with the name installed.json, it just doesn't have the .sig extension.
Don't worry about that line. That is normal and expected and has nothing to do with the real problem. The real problem is that the Arduino CLI serial discovery is timing out while detecting the boards. I have no idea why that would happen. I closely monitor the Arduino CLI bug reports both here and on its bug tracker and I have not seen this before.
I could see certain circumstances (e.g., lots of serial ports on the computer) causing a timeout at the default 10 seconds, but with the 90 seconds custom timeout you used, this should definitely not happen. I'm actually somewhat questioning whether this timeout works because I was trying to set very low values to simulate your error and didn't ever get it to time out on my system. But I haven't had time to look at it.
Hi. I'm back. I had a chance to look at the Arduino CLI code and my suspicion about the timeout was right. It turns out the value you pass via the --timeout flag is just a delay before the command starts (I have no idea why), and the actual timeout is hardcoded at 10 seconds:
case <-time.After(10 * time.Second):
finalError = fmt.Errorf("decoding LIST command: timeout")
}
If you want to try a modified version of Arduino CLI with the timeout increased to 100 s, you can download the "Windows_64bit" or "Windows_32bit" workflow artifact from the CI build here: https://github.com/per1234/arduino-cli/actions/runs/595224389
Just unzip the downloaded file and run the command from the unzipped folder (no installation is needed):
arduino-cli board list
If you do that, please let me know what the results are.
I'm interested in understanding what might cause this timeout on your system. The 10 seconds seems to be sufficient for the other thousands of users. Is there anything you can think of exceptional on your computers, like many serial ports? What does the "Ports (COM & LPT)" section of Windows Device Manager show?
pert:
If you want to try a modified version of Arduino CLI with the timeout increased to 100 s, you can download the "Windows_64bit" or "Windows_32bit" workflow artifact from the CI build here: https://github.com/per1234/arduino-cli/actions/runs/595224389
Just unzip the downloaded file and run the command from the unzipped folder (no installation is needed):
arduino-cli board list
If you do that, please let me know what the results are.
I went to that location and found links to all the artifacts, but each one when clicked leads to a 404 not fount error.
Hi @PickyBiker. I'm sorry to hear your computer wasn't so happy with that version of Arduino CLI. I got some expert assistance from one of the Arduino developers about finding a possible fix for this issue and I now have another tester version of Arduino CLI you can try out. You can download it from this link, just like before: https://github.com/per1234/arduino-cli/actions/runs/597483456
I got another excellent suggestion for investigating your port issue. We can bypass Arduino CLI altogether and directly run the serial discovery tool it uses to detect your Mega.
Please do this:
Start the program C:\Users\Mike\AppData\Local\Arduino15\packages\builtin\tools\serial-discovery\1.1.0\serial-discovery.exe - You can open that folder in Windows Explorer and double click it, or just run it directly from the command line. Whichever is more convenient for you. You will now have a terminal window with a cursor.
Type START
Press the "Enter" key.
Type LIST
Press the "Enter" key.
Copy the output you see and paste it in a reply here. We'll take a look to see if it reveals any helpful clues.
Type QUIT
Press the "Enter" key. The serial discovery tool exits and you will either be back to the command prompt or the window will close depending on how you started serial-discovery.exe
Hi @PickyBiker. Arduino's intrepid tooling developer, Cristian Maglie, has investigated the error you reported from when you ran serial-discovery.exe and produced a test build with a possible fix.
Unzip the serial-discovery_v1.1.0-6-g08d8048_Windows_64bit.zip file that's inside the unzipped folder.
Run the serial-discovery.exe that was extracted from the .zip (either by double clicking or running from the command line, your choice). You will now have a terminal window with a cursor.
Type START
Press the "Enter" key.
Type LIST
Press the "Enter" key.
Copy the output you see and paste it in a reply here. We'll take a look to see if it reveals any helpful clues.
Type QUIT
Press the "Enter" key. The serial discovery tool exits and you will either be back to the command prompt or the window will close depending on how you started serial-discovery.exe
Maybe a little progress. The arduini-cli.exe was copied to my home directory so I could run it easily from a cmd window. At first it crashed immediately. but looking at the help menu I found and ran details. Now I can run it from the cmd window without it crashing.
If i run it from fiie explorer, the cmd window closes immediately at list
This is the result starting it from a cmd window. It takes a couple minutes to timeout.
(Will try it on a couple more machines and if there is anything different, I'll post it.
This is normal and expected when you run "arduino board details" without the fqbn (e.g., "arduino board details -b arduino:avr:mega").
Please, please, just follow the instructions in my previous reply. You have the world's foremost expert in the subject of Arduino serial discovery (Cristian) investigating your report. But neither Cristian not I can reproduce your problem so if you won't cooperate then we're prevented from making any further progress.