# COM Port - Access Denied

**URL:** <https://discourse.nodered.org/t/com-port-access-denied/59642>\
**Category:** General\
**Created:** [10 March 2022 09:36 UTC](https://discourse.nodered.org/t/com-port-access-denied/59642 "2022-03-10T09:36:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayank97](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@rayank97](https://discourse.nodered.org/u/rayank97)\
**Post date:** [10 March 2022 09:36 UTC](https://discourse.nodered.org/t/com-port-access-denied/59642/1 "2022-03-10T09:36:03Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/1/511a2ae162e3a710197021b2716a265904002837.png)

```auto
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_");
}
}
}

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 March 2022 10:07 UTC](https://discourse.nodered.org/t/com-port-access-denied/59642/2 "2022-03-10T10:07:44Z")

</div>

Check device manager - do you have a COM6?

If yes, then something must be grabbing it.

[Portmon for Windows - Windows Sysinternals | Microsoft Docs](https://docs.microsoft.com/en-us/sysinternals/downloads/portmon) might be able to help you discover this.

---

<div class="post-metadata">

**Author:** ![rayank97](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@rayank97](https://discourse.nodered.org/u/rayank97)\
**Post date:** [10 March 2022 10:52 UTC](https://discourse.nodered.org/t/com-port-access-denied/59642/4 "2022-03-10T10:52:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 March 2022 10:55 UTC](https://discourse.nodered.org/t/com-port-access-denied/59642/5 "2022-03-10T10:55:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 March 2022 11:28 UTC](https://discourse.nodered.org/t/com-port-access-denied/59642/6 "2022-03-10T11:28:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rayank97](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@rayank97](https://discourse.nodered.org/u/rayank97)\
**Post date:** [16 March 2022 16:19 UTC](https://discourse.nodered.org/t/com-port-access-denied/59642/7 "2022-03-16T16:19:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rayank97](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@rayank97](https://discourse.nodered.org/u/rayank97)\
**Post date:** [17 March 2022 16:21 UTC](https://discourse.nodered.org/t/com-port-access-denied/59642/9 "2022-03-17T16:21:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [16 May 2022 16:21 UTC](https://discourse.nodered.org/t/com-port-access-denied/59642/10 "2022-05-16T16:21:26Z")

</div>

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