My Arduino Nano 33 BLE jumps between COM3 and COM4

When connecting the Nano 33 BLE to my computer, it's first recognised in COM 4 as shown below.

However, as seen above, the Arduino IDE states that there is no device on COM4.
Upon pressing the reset button on the board, the board is now connected to COM3, as shown below.

This issue reappears after I upload a sketch. The board jumps back to COM4, and COM3 is greyed out on the device manager. Uploading, or opening the serial port will return an error saying that no device is found on COM4.

This issue therefore prevents me from executing the Nano33_updateBLandSoftDevice sketch.

What is the error and how do I rectify this?

I'm not familiar with your board; I find it a little strange that Windows device manager sees it as a USB Serial Device and not as a specific board.

Your board uses the native USB capabilities of the processor so the changing in COM port are, for me, to be expected. If the board is running your sketch, it will identify itself as one entity (COMx), when the bootloader is active it will identify itself as another entity (COMy).

Part of the code that you upload to the board is responsible for board identification by the PC and for the reaction on the software reset issued by the IDE (open and close serial port with a baud rate of 1200 baud) when you start an upload.

Bugs in your (previously uploaded) sketch can result in variables used by the above functionalities to be overwritten and therefore malfunctioning.

I would start by uploading an innocent sketch (e.g. blink). You seem to be able to upload (with difficulty), if not try to double-tap the reset button just after the IDE reports the memory usage.

After that, check if you can consistently upload blink without difficulty.

Just to remind you: I have no experience with your board.

I am starting to see this on other boards as well. Some were because of a bad solder on a USB connector, others no clue. They were working fine last year when I was working with them. I am on Linux which has updated many times. This is the only problem I see. Is it possible your OS has updated and is causing the problem?

I have a Nano 33 BLE board, and that indeed is the normal situation.

Upon pressing the reset button on the board, the board is now connected to COM3,

The board should go into program loading mode(with a new usb port) upon a double press of the reset button. You should also see an oscillating orange led next to the usb port.

The board will go into this mode with the 1200bps trigger signal.

If you run the basic blink sketch and enable verbose output during upload you can attach the complete message if there are problems.

I retested the setup again today using the Blink sketch. This time, I only plugged in the Arduino board after my computer had fully booted up and I had opened the Arduino IDE. I was able to upload the Blink sketch without any issues.

While uploading, I heard the "external device connected" sound, and I heard it again once the sketch was successfully uploaded.

However, when I edited the Blink sketch and attempted to upload it again, I encountered the following error message:

This led me to suspect that I would need to disconnect and reconnect the board every time I wanted to upload a new sketch. I had also read elsewhere on the forum that the Arduino Nano 33 BLE and IoT use native USB, which might be related to this behaviour.

That hypothesis would also align with the observation that resetting the board tends to allow the board to have new sketches uploaded again.

After unplugging and replugging the board back, the sketch uploaded without problem, and I once again heard the external device connected sound, and once again when the sketch was uploaded.

So I've seemed to found a "workaround" for this issue? :joy: :sweat_smile:

Strangely, unplugging and replugging works for "Blink", but not for "updateBLandSoftDevice.

I tried running "AnalogReadSerial" and it doesn't work as well.
I then tried slightly editing the code, resetting the board and uploading. The upload goes through, but I'm, now greeted by this error message for the serial monitor:

Will I have to use the BLE capability to read the monitor or use ports 0 and 1 using an FTP device?

This led me to suspect that I would need to disconnect and reconnect the board every time I wanted to upload a new sketch.

This is not normal behavior. What is your Windows environment, and what IDE version are you using?

A better work around might be for you to place the board in programming mode with a double press of the reset, and then when the orange led is oscillating, go into Tools of the ide and set the port to the programming port.

Strangely, unplugging and replugging works for "Blink", but not for "updateBLandSoftDevice.

Again unexplained behaviour.

resetting the board and uploading. The upload goes through, but I'm, now greeted by this error message for the serial monitor:

Again, see if the forced entry into bootloader mode is more successful as a workaround.

Will I have to use the BLE capability to read the monitor or use ports 0 and 1 using an FTP device?

Yes. D0 and D1 should be Serial1.

The upload goes through, but I'm, now greeted by this error message for the serial monitor:

If there are issues with the Serial monitor, I would also suggest that you see what is going on when you use ide 1.8.19 with your board. Indeed, see if the port management situation is different with 1.8.19 as well. It shouldn't be, but it sounds like something is not right with your environment.

Just an update, the problem has somewhat rectified itself after an Arduino IDE update.

It can at least can get the serial monitor to display my gyro and accelerometer info consistently now.

Seems that it was an underlying software issue.