COM Port - Access Denied

Hello all,

I'm having what seems to be a known issue, but all the recommended troubleshooting steps have failed. I'm running a very simple flow (which worked fine 2 weeks ago), which basically sends an input via Serial node to my Arduino. However, I get the following error:

10 Mar 10:23:40 - [error] [serialconfig:3981ce82553fb55b] serial port COM6 error: Error: Opening COM6: Access denied

I've done the following:

  1. Restarted PC and launched Node-Red.
  2. Made sure neither the Arduino IDE nor the Arduino Serial Monitor is open before launching Node-Red.

My understanding is that if the COM port was being used by something other than the Arduino while compiling and uploading a sketch, that upload should not have been possible, as Arduino would have returned the same message of the access being denied. I read some posts about permissions, but I'm running this as an admin on Windows 10.

I'm at a loss. Here's my Arduino sketch and Node-Red flow if it helps.

void setup()
{
pinMode(13, OUTPUT);
Serial.begin(9600);
while (!Serial);
}

void loop() {
while (Serial.available())
{
int state = Serial.parseInt();
if (state>50)
{
digitalWrite(13, HIGH);
Serial.print("_HIGH");
delay(2000);
}
else (state<50);
{
digitalWrite(13, LOW);
Serial.print("_LOW_");
}
}
}

Check device manager - do you have a COM6?

If yes, then something must be grabbing it.

Portmon for Windows - Windows Sysinternals | Microsoft Docs might be able to help you discover this.

I only have a COM6 in the device manager when the Arduino is connected. Else, the Ports tab is not shown in the Device Manager.

Deleting your post and adding another - but without adding more info is not cool - someone will answer when they can / if they can.

As it stands, you have not said if Portmon helped you determine if the port is in use or not.

Also, check this: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YGw9CAG&l=en-US

Apologies. I did not mean to do that. I noticed that the earlier comment was not a reply to you, and I wasn't sure if you'd get the notification.

I used Portmon, and confirmed that nothing is using the port when the Arduino is not connected.

I had a another question, kind of unrelated. Does the Arduino Node only support the StandardFirmata sketch on the Arduino? Does it not support the AnalogFirmata sketch?

I still have no idea what the issue is honestly. I found a workaround though. I forced the Arduino to change to COM 2, and connected Node Red to COM 2. My functions work, but COM 6 I assume is still blocked up. No idea why though. I would like to keep this thread open for a possible fix.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.