Arduino Pro IDE Serial Port Recognition problem

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.

Suggestions?

Do you see COM5 listed under the Arduino Pro IDE's Tools > Port menu?

No sir, it's not there. I checked the box to see all ports and it is still not showing up.

BTW: The standard Arduino IDE does see the port okay.

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

Then post the full output from that command here.

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

C:\arduino-pro-0.1.3\arduino-pro-ide_0.1.3_Windows_64bit>

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

C:\arduino-pro-ide_0.1.4>

OK, this is definitely good information.

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.

C:\arduino-pro-ide_0.1.4>resources\app\node_modules\arduino-ide-extension\build\arduino-cli board list --timeout 90s --verbose
INFO[0000] Config file not found, using default values
INFO[0000] arduino-cli version 0.15.2
INFO[0090] Checking signature index="C:\Users\Mike\AppData\Local\Arduino15\package_index.json" signatureFile="C:\Users\Mike\AppData\Local\Arduino15\package_index.json.sig" trusted=true
INFO[0090] Checking if CLI is Bundled into the IDE
INFO[0090] Loading hardware from: C:\Users\Mike\AppData\Local\Arduino15\packages
INFO[0090] Loading package arduino from: C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\hardware
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." index="C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\installed.json" signatureFile="C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\installed.json.sig"
INFO[0090] Loaded platform platform="arduino:avr@1.8.3"
INFO[0090] Checking existence of 'tools' path: C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools
INFO[0090] Loading tools from dir: C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools
INFO[0090] Loaded tool tool="arduino:arduinoOTA@1.3.0"
INFO[0090] Loaded tool tool="arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7"
INFO[0090] Loaded tool tool="arduino:avrdude@6.3.0-arduino17"
INFO[0090] Loading package builtin from: C:\Users\Mike\AppData\Local\Arduino15\packages\builtin
INFO[0090] Checking existence of 'tools' path: C:\Users\Mike\AppData\Local\Arduino15\packages\builtin\tools
INFO[0090] Loading tools from dir: C:\Users\Mike\AppData\Local\Arduino15\packages\builtin\tools
INFO[0090] Loaded tool tool="builtin:ctags@5.8-arduino11"
INFO[0090] Loaded tool tool="builtin:serial-discovery@1.1.0"
INFO[0090] Adding libraries dir dir="C:\Users\Mike\Documents\Arduino\libraries" location=user
INFO[0090] Adding libraries dir dir="C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\libraries" location=platform
Error detecting boards: error getting port list from serial-discovery: decoding LIST command: timeout
ERRO[0101] Error detecting boards: error getting port list from serial-discovery: decoding LIST command: timeout

C:\arduino-pro-ide_0.1.4>

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.

???

Interesting. I never noticed that it did that when you're not signed in to a GitHub account because I am always signed in to my GitHub account.

I don't suppose you have a GitHub account you can sign in to before clicking the download link, do you?

I did try to attach it here on the forum, but it's larger than the allowed attachment size, so that's a no go.

I signed into github and downloaded it. extracted it, opened a command window, switched to the extracted directory and ran it: It just crashes.

C:\Users\Mike\Downloads\Windows_64bit(1)\arduino-cli_test-9f8317bf58de318bf42dac86545302616b0321c6-git-snapshot_Windows_64bit>arduino-cli board list
Exception 0xc0000005 0x0 0x7ff896690fff 0x27dd0000
PC=0x27dd0000

runtime: unknown pc 0x27dd0000
stack: frame={sp:0x23ce820, fp:0x0} stack=[0x0,0x23cff00)
00000000023ce720: 00000000023ce768 00000000023ce790
00000000023ce730: 00000000023ce758 00000000023ce750
00000000023ce740: 00000000023ce754 00000000024e0000
00000000023ce750: 0000000000000000 0000000000000000
00000000023ce760: 0000000000000000 0000000000000005
00000000023ce770: 00000000023ce8b8 00007ff893eab3df
00000000023ce780: 00000000000a2f60 00007ff8964b49ae
00000000023ce790: 00007ff8964900e8 00000000000d05d0
00000000023ce7a0: 00007ff893eab3d9 00000000023ce7f0
00000000023ce7b0: 004f0044004e0049 0053005c00530057
00000000023ce7c0: 00000000000a2f60 0000000000000000
00000000023ce7d0: 00000000000d18e0 006c006400050005
00000000023ce7e0: 00007ff893eab3d9 0000000000000000
00000000023ce7f0: 00007ff800000000 00007ff8964900e8
00000000023ce800: 0000000000000000 0000000000000000
00000000023ce810: 0000000000000001 00007ff8964b3a63
00000000023ce820: <0000000000000001 0000000000000000
00000000023ce830: 0000000000000000 00000000023ce928
00000000023ce840: 0000000000000000 0000000000000000
00000000023ce850: 0000000000000000 0000000000000000
00000000023ce860: 00000000000d05d0 00007ff8965e11c0
00000000023ce870: 00000000000a2f60 00007ff8965e37e0
00000000023ce880: 000000000000097d 00007ff89303ccd8
00000000023ce890: 00007ff89303a148 00007ff8965e11e8
00000000023ce8a0: 00007ff8965f400f 00007ff893030000
00000000023ce8b0: 00007ff8965e5dd4 00007ff896511370
00000000023ce8c0: 0000000000000000 0000000000000000
00000000023ce8d0: 0000000000000000 0000000000000000
00000000023ce8e0: 00000000000cc920 0000000000000040
00000000023ce8f0: 0000000000000003 00007ff8965fb3f0
00000000023ce900: 0000000000000001 00000000023ceb00
00000000023ce910: 00000000000d18e0 00007ff8964f15b8
runtime: unknown pc 0x27dd0000
stack: frame={sp:0x23ce820, fp:0x0} stack=[0x0,0x23cff00)
00000000023ce720: 00000000023ce768 00000000023ce790
00000000023ce730: 00000000023ce758 00000000023ce750
00000000023ce740: 00000000023ce754 00000000024e0000
00000000023ce750: 0000000000000000 0000000000000000
00000000023ce760: 0000000000000000 0000000000000005
00000000023ce770: 00000000023ce8b8 00007ff893eab3df
00000000023ce780: 00000000000a2f60 00007ff8964b49ae
00000000023ce790: 00007ff8964900e8 00000000000d05d0
00000000023ce7a0: 00007ff893eab3d9 00000000023ce7f0
00000000023ce7b0: 004f0044004e0049 0053005c00530057
00000000023ce7c0: 00000000000a2f60 0000000000000000
00000000023ce7d0: 00000000000d18e0 006c006400050005
00000000023ce7e0: 00007ff893eab3d9 0000000000000000
00000000023ce7f0: 00007ff800000000 00007ff8964900e8
00000000023ce800: 0000000000000000 0000000000000000
00000000023ce810: 0000000000000001 00007ff8964b3a63
00000000023ce820: <0000000000000001 0000000000000000
00000000023ce830: 0000000000000000 00000000023ce928
00000000023ce840: 0000000000000000 0000000000000000
00000000023ce850: 0000000000000000 0000000000000000
00000000023ce860: 00000000000d05d0 00007ff8965e11c0
00000000023ce870: 00000000000a2f60 00007ff8965e37e0
00000000023ce880: 000000000000097d 00007ff89303ccd8
00000000023ce890: 00007ff89303a148 00007ff8965e11e8
00000000023ce8a0: 00007ff8965f400f 00007ff893030000
00000000023ce8b0: 00007ff8965e5dd4 00007ff896511370
00000000023ce8c0: 0000000000000000 0000000000000000
00000000023ce8d0: 0000000000000000 0000000000000000
00000000023ce8e0: 00000000000cc920 0000000000000040
00000000023ce8f0: 0000000000000003 00007ff8965fb3f0
00000000023ce900: 0000000000000001 00000000023ceb00
00000000023ce910: 00000000000d18e0 00007ff8964f15b8
rax 0x7ff89303d87c
rbx 0x7ff89303d87a
rcx 0x41
rdi 0xffffffffffbadd11
rsi 0x0
rbp 0x7ff8931da100
rsp 0x23ce820
r8 0x0
r9 0x0
r10 0x0
r11 0x97c
r12 0xc000007a
r13 0x0
r14 0x7ff89303d87c
r15 0x7ff896490000
rip 0x27dd0000
rflags 0x10202
cs 0x33
fs 0x53
gs 0x2b

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

Either way it is started, it crashes ,explorer or cmd as soon as I type list Tried it on 3 machines.

Just FYI the file serial-discovery is 292MB dated 12/27/2020

Microsoft Windows [Version 10.0.19042.804]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\Users\Mike>serial-discovery.exe
start
{
"eventType": "start",
"message": "OK"
}
list
Exception 0xc0000005 0x0 0x7ff9749f0fff 0x1abc1ed0000
PC=0x1abc1ed0000

syscall.Syscall(0x7ff97430adc0, 0x3, 0xc00000c400, 0x0, 0x800, 0x0, 0x0, 0x0)
/usr/local/go/src/runtime/syscall_windows.go:188 +0xe9
golang.org/x/sys/windows._LoadLibraryEx(0xc00000c400, 0x0, 0x800, 0xd, 0xd, 0x0)
/Users/megabug/Code/go/pkg/mod/golang.org/x/sys@v0.0.0-20200909081042-eff7692f9009/windows/zsyscall_windows.go:654 +0x98
golang.org/x/sys/windows.LoadLibraryEx(0x6974cf, 0xc, 0x0, 0x800, 0x1ab9b3b93b0, 0xc00010fb60, 0x766b00)
/Users/megabug/Code/go/pkg/mod/golang.org/x/sys@v0.0.0-20200909081042-eff7692f9009/windows/zsyscall_windows.go:650 +0x9f
golang.org/x/sys/windows.loadLibraryEx(0x6974cf, 0xc, 0xc00000a201, 0xc00010fb18, 0x60d991, 0x6738e0)
/Users/megabug/Code/go/pkg/mod/golang.org/x/sys@v0.0.0-20200909081042-eff7692f9009/windows/dll_windows.go:406 +0x86
golang.org/x/sys/windows.(*LazyDLL).Load(0xc00007e210, 0x0, 0x0)
/Users/megabug/Code/go/pkg/mod/golang.org/x/sys@v0.0.0-20200909081042-eff7692f9009/windows/dll_windows.go:240 +0xca
golang.org/x/sys/windows.(*LazyProc).Find(0xc00007e240, 0x0, 0x0)
/Users/megabug/Code/go/pkg/mod/golang.org/x/sys@v0.0.0-20200909081042-eff7692f9009/windows/dll_windows.go:303 +0xc5
golang.org/x/sys/windows.(*LazyProc).mustFind(...)
/Users/megabug/Code/go/pkg/mod/golang.org/x/sys@v0.0.0-20200909081042-eff7692f9009/windows/dll_windows.go:321
golang.org/x/sys/windows.(*LazyProc).Addr(...)
/Users/megabug/Code/go/pkg/mod/golang.org/x/sys@v0.0.0-20200909081042-eff7692f9009/windows/dll_windows.go:331
go.bug.st/serial/enumerator._setupDiClassGuidsFromNameInternal(0xc00000a240, 0x0, 0xc000000000, 0xc00010fc94, 0x6, 0x0)
/Users/megabug/Code/go/pkg/mod/go.bug.st/serial@v1.1.1/enumerator/syscall_windows.go:36 +0x3e
go.bug.st/serial/enumerator.setupDiClassGuidsFromNameInternal(0x695d52, 0x5, 0x0, 0x0, 0xc00010fc94, 0xc00000e30a, 0x5)
/Users/megabug/Code/go/pkg/mod/go.bug.st/serial@v1.1.1/enumerator/syscall_windows.go:32 +0x9e
go.bug.st/serial/enumerator.classGuidsFromName(0x695d52, 0x5, 0x0, 0x1000, 0x766b00, 0x1ab9b3b0108, 0x0)
/Users/megabug/Code/go/pkg/mod/go.bug.st/serial@v1.1.1/enumerator/usb_windows.go:170 +0x65
go.bug.st/serial/enumerator.nativeGetDetailedPortsList(0x0, 0x0, 0x0, 0x0, 0x0)
/Users/megabug/Code/go/pkg/mod/go.bug.st/serial@v1.1.1/enumerator/usb_windows.go:233 +0x6e
go.bug.st/serial/enumerator.GetDetailedPortsList(...)
/Users/megabug/Code/go/pkg/mod/go.bug.st/serial@v1.1.1/enumerator/enumerator.go:31
main.outputList()
/Users/megabug/Code/serial-discovery/main.go:88 +0x3c
main.main()
/Users/megabug/Code/serial-discovery/main.go:54 +0x32a
rax 0x7ff9739aaccc
rbx 0x7ff9739aacca
rcx 0x41
rdi 0xffffffffffbadd11
rsi 0x0
rbp 0x0
rsp 0x9a371ff4e0
r8 0x0
r9 0x0
r10 0x0
r11 0x97c
r12 0xc000007a
r13 0x0
r14 0x7ff9739aaccc
r15 0x7ff9747f0000
rip 0x1abc1ed0000
rflags 0x10206
cs 0x33
fs 0x53
gs 0x2b

C:\Users\Mike>

PickyBiker:
Either way it is started, it crashes ,explorer or cmd as soon as I type list Tried it on 3 machines.

Thanks so much for giving it a try! I'm passing this information along to the Arduino developers.

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.

Please try this and let us know the results:

  • Download the artifact from here as you did with the Arduino CLI artifact: Added github actions workflows · arduino/serial-discovery@9562467 · GitHub

  • Unzip the downloaded file (Windows_64bit.zip).

  • 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.

C:\Users\Mike>arduino-cli board details
Downloading missing tool builtin:ctags@5.8-arduino11...
builtin:ctags@5.8-arduino11 downloaded
Installing builtin:ctags@5.8-arduino11...
builtin:ctags@5.8-arduino11 installed
Downloading missing tool builtin:serial-discovery@1.1.0...
builtin:serial-discovery@1.1.0 downloaded
Installing builtin:serial-discovery@1.1.0...
builtin:serial-discovery@1.1.0 installed
Error getting board details: parsing fqbn: invalid fqbn:

C:\Users\Mike>arduino-cli board list
Error detecting boards: error getting port list from serial-discovery: decoding LIST command: timeout

C:\Users\Mike>

PickyBiker:
Error getting board details: parsing fqbn: invalid fqbn:

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.