Set up UDP server
Last updated
Was this helpful?
When building IoT applications over NTN (satellite) networks, you need a server to send and receive data to and from your devices. Since NTN uses NB-IoT which only supports UDP, your server must be able to handle UDP packets.
Follow this guide to set up your own UDP server in minutes.
Spin up a cloud server with a public IP address. For example using Digital Ocean.
When using Digital Ocean:
Create a new Droplet (starting at $4-6/month)
Choose Ubuntu as the operating system
Select the smallest size for testing
Note down the IP address of your server
SSH into your server and install socat, a versatile networking tool:
apt update
apt install socat -yAllow UDP traffic on port 9000:
ufw allow 9000/udpStart a UDP listener on port 9000:
Explanation of the command:
UDP4-RECVFROM:9000 listens for UDP packets on port 9000
fork handles multiple connections
- outputs received data to the terminal
Before testing with your NTN device, verify the UDP server is working by sending data from your local machine:
Type a message such as hello world and press Enter.
Do you see the message appearing on your server terminal? Great work! The UDP server is working. ✅
Continue building your NTN application and start sending UDP data from your NTN-enabled devices. Have a look at our guides for the Murata Type 1SC or Nordic nRF9151 SiP.
Last updated
Was this helpful?
Was this helpful?
socat UDP4-RECVFROM:9000,fork -socat - UDP:YOUR_SERVER_IP:9000