Hi all, I'm having an ongoing connection and reliability issue with the IDE and how it connects to the device. This is not a new issue, I first ran into it in 2022 with two other Nano 33 IoT's.
I've written 1500 lines of code that runs on those continuously every day. During development I had connection reliability with a beta 2.0 version of the IDE, and am having it even worse now.
I have a Nano 33 IoT, my 3rd one. Sometimes, rarely, I can upload the blink sketch to it, but cannot find a sequence of steps that ALWAYS works. Most of the tries the ide does not find the com port. I verify that I'm getting an upload by seeing the fading light, and by changing the on/off timing each time, for certainty.
Even the double press of the device button doesn't always work!
I have verified the com3 port with Device Manager. Sometimes even when connected, during the upload when it succeeds, it will change the port to com4.
This is the only device connected to my Win 10 machine (AMD 5950x), so there is no issue with selecting the com port.
As these issues span 3 different Nanos, and this is a brand new, first time install on this machine, and the com port is verified in Device Manager, and the IDE shows board and port selection are correct, and shows valid Board Info when device is read, and the IDE says it is connected to the correct (only) device on the correct port, every issue I can think of and have looked up on the forum are correct. No pins of the Nano are connected.
I am at a loss to understand what is going on here. Professional programmer, been programming C since 1984, electronics since 2003.
We really need more info out of the IDE beyond "status 1". What does this mean, in detail where we might figure out what the issue is?
My copy of the blink code simply changes the time delays so I can be sure I'm looking at a new upload running.
The degree of erratic instability make the IDE (I believe it's not the Arduino Nano) very difficult for users and will REALLY turn off new adopters. Is there another development platform that will be much more reliable?
Closing/reopening the IDE may work once, but it won't then repeat an upload. Similarly rebooting the machine hasn't worked.
For example, rebooting the machine, bringing up IDE, and Device Manager which shows device is on com3 (only one in existence), Board Info shows correct data, and selecting the board + com3 port (only one available), uploading does trigger the fading of the Nano, but it still fails.
Even though it was successfully connected to com3, see the message says it tried com4. Yet the IDE status line still shows it thinks device is on com3 (not connected). The drop down shows it thinks it is on com4. IDE sections have gotten confused.
After failure, reselecting board on NEWLY assigned port, upload then succeeds. And puts connection back to com3. Trying same cycle again, IDE fails to trigger upload fade of Nano, port remains at com3 in status and in drop down, and Board Info still works.
Trying upload again, fails again. Restarting IDE, verifying Device Manager on com3, checking status line is com3, drop down is com3, selecting board + port in drop down, upload again fails.
This is what I mean by erratic. Sometimes it works, most times it fails.
Finding trick of ALWAYS selecting board + port, as status line is often out of sync.
Double pressing Nano button, selecting board + port, uploading--that worked.
Next try without the double press--failed.
Next try WITH the double press--it failed too.
Arrghhhh!
But I notice that last failure has changed the com port to com4. Trying upload now SUCCEEDS! And resets back to com3.
Double pressing appears to reset to com4 every other time.
Only when: **
** 1) uploading to com4 (not selectable--Nano has to trigger this), will an upload SUCCEED.
For successful uploads, **
** 1) Double pressing appears to reset to com4 every time (?). Watch this.
** 2) SELECT board+port in drop down as com4, **
** 3) THEN uploading, **
-- that WORKS!
Have done a few cycles of this, and it appears this may work consistently.
Without BOTH those steps, if you skip EITHER one, uploading will Fail.
SEE WHAT I MEAN BY THIS BEING TOO HARD FOR NEWBIES AND GENERAL ADOPTION? THE COST OF FIGURING THIS OUT ON OUR OWN IS TOO HIGH! IT IS NOWHERE TO BE FOUND IN YOUR DOCS OR FORUM; only pieces, amid MUCH misdirection about "powered correctly", board selection and port selection (NOTHING about how the IDE changes this every time, and that you MUST reselect manually else IDE will remain confused (status line vs drop down) and refuse to upload even though Board Info reports correctly.
This has cost an experienced programmer 7 hours, even though I did it before 18 months ago (ahhh, memory, the light on the Nano isn't the only thing that fades.)
I'll bet if you get the other sections, which the status line reports, to be synced with the drop down on all changes, the error goes away.
THIS SHOULD WORK, OUT OF THE BOX, EVERY TIME! Watch your sales and adoption Increase!
Here is the error message:
"C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-size" -A "C:\Users\Dan\AppData\Local\Temp\arduino\sketches\8E1DB89F8C0390D640814AC482DFC11B/BlinkMine.ino.elf"
Sketch uses 14020 bytes (5%) of program storage space. Maximum is 262144 bytes.
Global variables use 3564 bytes (10%) of dynamic memory, leaving 29204 bytes for local variables. Maximum is 32768 bytes.
Performing 1200-bps touch reset on serial port COM3
Waiting for upload port...
Upload port found on COM4
No device found on COM4
"C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3/bossac.exe" -i -d --port=COM4 -U true -i -e -w -v "C:\Users\Dan\AppData\Local\Temp\arduino\sketches\8E1DB89F8C0390D640814AC482DFC11B/BlinkMine.ino.bin" -R
Failed uploading: uploading error: exit status 1
Other tries' error message:
Sketch uses 14020 bytes (5%) of program storage space. Maximum is 262144 bytes.
Global variables use 3564 bytes (10%) of dynamic memory, leaving 29204 bytes for local variables. Maximum is 32768 bytes.
Waiting for upload port...
No upload port found, using COM3 as fallback
No device found on COM3
"C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3/bossac.exe" -i -d --port=COM3 -U true -i -e -w -v "C:\Users\Dan\AppData\Local\Temp\arduino\sketches\8E1DB89F8C0390D640814AC482DFC11B/BlinkMine.ino.bin" -R
Failed uploading: uploading error: exit status 1