# Udp out error EACCESS

**URL:** <https://discourse.nodered.org/t/udp-out-error-eaccess/86127>\
**Category:** General\
**Tags:** function-node\
**Created:** [4 March 2024 15:39 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127 "2024-03-04T15:39:13Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![AE8U](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ae8u/32/88884_2.png) [@AE8U](https://discourse.nodered.org/u/AE8U)\
**Post date:** [4 March 2024 15:39 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/1 "2024-03-04T15:39:13Z")

</div>

I am running Ubuntu Budgie 22.04.3 on a Raspberry Pi 4B. I am running Node-RED and I am trying to use a flow that has a UDP out node. I am trying to use that node to broadcast a UDP message to port 12020 on my local network broadcast IP address (xxx.xxx.xxx.255). I am trying to broadcast from a Raspberry Pi which is controlling my Ham Radio rig. I need it to be received on a Windows 10 PC that needs the information being broadcast for a windows based program that will not run under Ubuntu. It is giving me an error EACCES. I understand that this related to permissions, but I have no idea on how to fix it. Can someone please give me a hand?

Thanks,  
Mike, AE8U

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 March 2024 19:26 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/2 "2024-03-04T19:26:16Z")

</div>

Please share the actual error so that people can take a look. Thanks.

---

<div class="post-metadata">

**Author:** ![AE8U](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ae8u/32/88884_2.png) [@AE8U](https://discourse.nodered.org/u/AE8U)\
**Post date:** [4 March 2024 21:45 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/3 "2024-03-04T21:45:01Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/7/a7ddebbc2fadf65bb4b232080a18bddccd240d70.png)

---

<div class="post-metadata">

**Author:** ![AE8U](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ae8u/32/88884_2.png) [@AE8U](https://discourse.nodered.org/u/AE8U)\
**Post date:** [4 March 2024 21:47 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/4 "2024-03-04T21:47:35Z")

</div>

This is the error in the debug window in the browser window of Node-Red. If you want the error from a different place, please let me know.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [5 March 2024 10:09 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/5 "2024-03-05T10:09:11Z")

</div>

if you do a google search using `"udp" : Error : send EACCES` you will find many threads you should check out. EACCES is a permissions issue so looking at the various threads may lead you to a solution,

Not being a Windows user, this is the best I can offer to you (maybe someone else will have more knowledge than me about this).

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 March 2024 12:33 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/6 "2024-03-05T12:33:55Z")

</div>

Windows systems come in 2 forms, server and desktop. Desktop in particular has very tight inbound local firewall rules. So if you are trying to connect over UDP to a windows desktop, you will need to open a firewall rule accordingly.

Try checking out the connection from a command line - from Linux, this might help: [How to connect to a udp port command line? - Server Fault](https://serverfault.com/questions/263032/how-to-connect-to-a-udp-port-command-line)

You may get a clearer indication. But almost certainly you need to change the firewall to allow the connection.

Also note that UDP is not a secure connection and this should NEVER be done (even if possible) over an untrusted network connection. Indeed, in an production environment, UDP connections would not be advisable except in tightly controlled physically local networks. In other words, there is a good reason you are getting that error and you should think about the approach and not just the error.

---

<div class="post-metadata">

**Author:** ![AE8U](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ae8u/32/88884_2.png) [@AE8U](https://discourse.nodered.org/u/AE8U)\
**Post date:** [5 March 2024 13:09 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/7 "2024-03-05T13:09:06Z")

</div>

I think some of you might be misreading my original post. Node-Red is running on Ubuntu Budgie, and that is where the udp error is occurring. I may have confused everyone by even mentioning Windows.

For the record, I am running two amazing apps written by W1TR, which control my Palstar HF-AUTO and my Ameritron ALS-1306. In order for the programs to function, they need to receive the frequency in a udp message. The programs run in Windows, however. They will not run on a Raspberry Pi. So i need to have the Pi broadcast the frequency when FLRig changes it.

I hope that clarifies everything.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 March 2024 13:19 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/8 "2024-03-05T13:19:03Z")

</div>

> [@AE8U](#):
>
> they need to receive the frequency in a udp message. The programs run in Windows, however. They will not run on a Raspberry Pi. So i need to have the Pi broadcast the frequency when FLRig changes it.

So I don't think I was misled? The apps run on Windows and Node-RED on a Pi. So the Pi needs to connect to Windows where the apps are running?

In that case, you absolutely need to open the Windows firewall to allow the inbound connection. The error appears on the Pi because it is the Pi that has been refused access but it is the Windows firewall that is doing the rejection.

---

<div class="post-metadata">

**Author:** ![AE8U](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ae8u/32/88884_2.png) [@AE8U](https://discourse.nodered.org/u/AE8U)\
**Post date:** [5 March 2024 14:12 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/9 "2024-03-05T14:12:05Z")

</div>

Hi Julian,

Thanks so much for taking your time to help me out.

The Pi does not connect directly to the Windows PC. It is not trying to broadcast the udp message to the Windows PC, but rather to the broadcast IP address, which is 192.168.201.255.

I have already checked the firewall, and have a rule to allow that port in and out. Also I have Samba instants on the Pi, and I can read the entire Pi file directory from Windows explorer, and can even open, edit and save Ubuntu config files from Windows.

Also, isn't the EACCES error a Node-Red error?

Thanks and 73,  
Mike, AE8U

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 March 2024 14:48 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/10 "2024-03-05T14:48:08Z")

</div>

> [@AE8U](#):
>
> but rather to the broadcast IP address, which is 192.168.201.255

So I've never done this and it is a bit of educated guesswork. But it seems like UDP to a broadcast address may need you to declare the the address as accepting broadcasts. My guess is that the UDP node does not have this.

When using Node.JS UDP library to serve data, you need to add `udpserver.setBroadcast(true)`.

---

<div class="post-metadata">

**Author:** ![AE8U](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ae8u/32/88884_2.png) [@AE8U](https://discourse.nodered.org/u/AE8U)\
**Post date:** [5 March 2024 17:37 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/11 "2024-03-05T17:37:17Z")

</div>

Julian,

I am currently running my rig connected to the Windows PC. It is being controlled by DX Commander for frequency changes. I am also currently running WSJTX on the PC. I have both of them broadcasting to that IP address (192.168.201.255). DX Commander is broadcasting udp on port 12065. WSJTX uses port 12060. Both programs are working fine with that setup. And I can receive those udp messages with Node-Red on my Raspberry Pi with udp in nodes.

But if I try to receive udp in on 12065, and then send it right back out with a udp out node on 12020, I get the EACCES error.

So if I try your suggestion, where do I add your suggested command? Do I send it using a telnet window, like putty? Or is there a Node-Red config file somewhere that I add it to

Thanks and 73,  
Mike, AE8U

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 March 2024 19:18 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/12 "2024-03-05T19:18:38Z")

</div>

> [@AE8U](#):
>
> Do I send it using a telnet window, like putty?

No, telnet clients cannot send UDP. You need netcat or some similar tool.

> [@AE8U](#):
>
> Or is there a Node-Red config file somewhere that I add it to

No, it would have to be part of the code in the node.

> [@AE8U](#):
>
> where do I add your suggested command?

I think that realistically, you will need to do it from a command line. If you can get it working manually from the command line, you can run that from an exec node.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [5 March 2024 20:47 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/13 "2024-03-05T20:47:41Z")

</div>

Julian - in the the node we do

```auto
 if (node.multicast != "false") {
                    sock.bind(node.outport, function() { // have to bind before you can enable broadcast...
                        sock.setBroadcast(true); // turn on broadcast
                        sock.setMulticastLoopback(false); // turn off loopback

```

so we do attempt to set the flags correctly for broadcast.  
And port 12020 is not low numbered so should be accessible.  
But we do try to bind to either the local or remote port - so @AE8U - how are both the udp nodes actually configured ?

EG on my MAC Wireshark looks like this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/654d6b2ac00c9a5b4dd7bfada7ad0dec3633e762.png)  
with the Broadcast

---

<div class="post-metadata">

**Author:** ![AE8U](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ae8u/32/88884_2.png) [@AE8U](https://discourse.nodered.org/u/AE8U)\
**Post date:** [5 March 2024 22:04 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/14 "2024-03-05T22:04:26Z")

</div>

Dceejay,

Thanks for your help. I am not sure I know how to get the information that you are asking for. As far as I know the udp nodes are not configured in any way, at least intentionally by me. I simply went into DXLabs control program DXCommander, selected config, then the General tab, then midway down I selected Net Serv. On that window I enabled UDP Network Service, and then on the first line I entered 192.168.201.255 for the IP Address and 12065 for the port. It immediately started sending and if I look at udp in on my Raspberry Pi Node-Red I get the following:

\<?xml version="1.0" encoding="utf-8"?\> DXLab 1 2107401 2107401 USB false

And from what I am learning, there are several programs (N1MM, FLDigi, DXCommander, and Logger 32 - maybe others) that send this exact same formatted report via udp. But If I try to do basically the same thing in Node-Red with the udp out port, I get the EACCES error. I am not a node.js programmer, and I am just beginning to learn Node-Red. I know that I am able to issue node.js command inside of a node, but I would need someone to give me the exact line by line format of what I should enter.

---

<div class="post-metadata">

**Author:** ![AE8U](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ae8u/32/88884_2.png) [@AE8U](https://discourse.nodered.org/u/AE8U)\
**Post date:** [5 March 2024 22:06 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/15 "2024-03-05T22:06:55Z")

</div>

Sorry the udp message format got changed.

```auto
<?xml version="1.0" encoding="utf-8"?>
<RadioInfo>
<app>DXLab</app>
<RadioNr>1</RadioNr>
<Freq>2107401</Freq>
<TXFreq>2107401</TXFreq>
<Mode>USB</Mode>
<IsSplit>false</IsSplit>
</RadioInfo>

```

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [5 March 2024 22:18 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/16 "2024-03-05T22:18:11Z")

</div>

Ok - what I want to know is how you have configured the Node-RED nodes... the udp in one that is receiving OK... and the udp out one you are trying to set to broadcast...  
eg if I set my out node like this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/6/3646dd8ccbf0ed72334de539cc1dc543c4f6a6c4.png)  
and in node like this  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/9/f9f87098ea13fbb33ae209c5c7520580e7176370.png)  
Then if I send something to the out node - I will receive it back on the in node.  
(I know that is not exactly what you are trying to do but ...)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/461dd6ed4bab0f3bf200bfe040d7eb526fc43a6e.png)

---

<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:** [3 June 2024 22:19 UTC](https://discourse.nodered.org/t/udp-out-error-eaccess/86127/17 "2024-06-03T22:19:12Z")

</div>

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