# Raspberry Pi and UDP?

**URL:** https://discourse.nodered.org/t/raspberry-pi-and-udp/7129
**Category:** General
**Created:** [22 January 2019 08:17 UTC](https://discourse.nodered.org/t/raspberry-pi-and-udp/7129 "2019-01-22T08:17:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![HenrikHub](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@HenrikHub](https://discourse.nodered.org/u/HenrikHub)
#### Post date: [22 January 2019 08:17 UTC](https://discourse.nodered.org/t/raspberry-pi-and-udp/7129/1 "2019-01-22T08:17:17Z")

</div>

Hey! I made a program in Node-Red that sends messages through UDP and recives a respons through a local port. I´ve testet the software on Windows and had no problem, although switching to Raspberry Pi some interference occure.

I guess it has to do with the UDP socket, but i would think Node-Red should take care of that. I´ve also tried changing ports.. Any suggestions?

Windows:  
Node-RED version: v0.19.5  
Node.js version: v10.13.0  
Windows\_NT 6.1.7601 x64 LE

Raspberry Pi 3  
Node-RED version: v0.19.5  
Node.js version v10.14.2  
Linux 4.14.79-v7+ arm LE

Log from the Node-Red  
Raspberry Pi ----\>

21 Jan 14:52:09 - [info]

# Welcome to Node-RED

21 Jan 14:52:09 - [info] Node-RED version: v0.19.5  
21 Jan 14:52:09 - [info] Node.js version: v10.14.2  
21 Jan 14:52:09 - [info] Linux 4.14.79-v7+ arm LE  
21 Jan 14:52:10 - [info] Loading palette nodes  
21 Jan 14:52:15 - [info] Settings file : /home/pi/.node-red/settings.js  
21 Jan 14:52:15 - [info] Context store : 'default' [module=memory]  
21 Jan 14:52:15 - [info] User directory : /home/pi/.node-red  
21 Jan 14:52:15 - [warn] Projects disabled : editorTheme.projects.enabled=false  
21 Jan 14:52:15 - [info] Flows file : /home/pi/.node-red/flows\_raspberrypi.json  
21 Jan 14:52:15 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
21 Jan 14:52:15 - [warn]

* * *

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials  
file will not be recoverable, you will have to delete it and re-enter  
your credentials.

## You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

21 Jan 14:52:15 - [info] Starting flows  
21 Jan 14:52:15 - [info] [udp out:658dd9f9.7bf278] udp re-use socket: 45 -\> 192.168.83.178:1  
21 Jan 14:52:15 - [info] [udp in:98a7fa80.ffee78] udp: port 45 already in use  
21 Jan 14:52:15 - [info] Started flows  
21 Jan 14:52:15 - [error] [udp in:de89c496.1f41f8] UDP access error, you may need root access for ports below 1024  
21 Jan 14:52:15 - [error] [udp in:98a7fa80.ffee78] UDP access error, you may need root access for ports below 1024  
21 Jan 14:52:15 - [red] Uncaught Exception:  
21 Jan 14:52:15 - Error [ERR\_SOCKET\_DGRAM\_NOT\_RUNNING]: Not running  
at healthCheck (dgram.js:605:11)  
at Socket.close (dgram.js:487:3)  
at Socket. (/usr/lib/node\_modules/node-red/nodes/core/io/32-udp.js:78:20)  
at Socket.emit (events.js:187:15)  
at state.handle.lookup (dgram.js:243:14)  
at process.\_tickCallback (internal/process/next\_tick.js:63:19)

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [22 January 2019 08:24 UTC](https://discourse.nodered.org/t/raspberry-pi-and-udp/7129/2 "2019-01-22T08:24:46Z")

</div>

The error is exactly what it says:

> [@HenrikHub](#):
>
> UDP access error, you may need root access for ports below 1024

If you want to use a port number \< 1024, you need to run as root.

We generally recommend _not_ to run as root, so if you can, pick a port higher than 1024.

---

<div class="post-metadata">

### Author: ![HenrikHub](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@HenrikHub](https://discourse.nodered.org/u/HenrikHub)
#### Post date: [22 January 2019 08:29 UTC](https://discourse.nodered.org/t/raspberry-pi-and-udp/7129/3 "2019-01-22T08:29:24Z")

</div>

> [@knolleary](#):
>
> says:

I´ve runned numerous ports from all ranges, maybe i didnt clarify that

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [22 January 2019 08:31 UTC](https://discourse.nodered.org/t/raspberry-pi-and-udp/7129/4 "2019-01-22T08:31:52Z")

</div>

so what is the error message when the port number is more than 1024?

---

<div class="post-metadata">

### Author: ![HenrikHub](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@HenrikHub](https://discourse.nodered.org/u/HenrikHub)
#### Post date: [22 January 2019 08:50 UTC](https://discourse.nodered.org/t/raspberry-pi-and-udp/7129/5 "2019-01-22T08:50:20Z")

</div>

Ah reinstalling made the cut!
