UDP Communication in NTN
UDP (User Datagram Protocol) is a lightweight and efficient protocol for sending short messages over IP networks with minimal delay.
This page covers how to use UDP in NTN scenarios, including:
Client Mode – sending messages to the device.
Server Mode – listening for incoming messages on the device.
UDP is well-suited for real-time data exchange, making it ideal for NTN-based applications.
🛰️ Test the Connection by Sending a UDP Payload
Use the following steps to verify UDP connectivity when the modem has an active satellite data session:
Allocate a UDP Socket (Client Mode)
Create a UDP socket targeting the remote IP 18.199.15.247
on port 1055
:
Expected Response:
Set Socket Options and Activate
Enable automatic closure after 10 minutes (36000 seconds) and activate the socket:
Expected Response:
Send UDP Payload
Send the message "Hello, world!"
encoded in hex (48656C6C6F2C20776F726C6421
):
Expected Response:
Check Socket Info (Optional)
To confirm the connection details:
Expected Response:
Close the Socket
To release resources when done:
Expected Response:
🛰️ Set Up the EVK to Listen for Incoming UDP Packets
Follow the steps below to configure the EVK in "server mode" (listening on a specific port):
Allocate UDP Socket in Listen Mode (e.g., port 6000)
Expected Response:
Activate the Listener
Expected Response:
Verify Listener Info (Optional)
Expected Response:
Send a UDP Message Now use the UDP Sender application on your PC to send a UDP message to the EVK’s IP address and listening port.
Wait for UDP Event Notification
The modem will notify when a packet is received:
Read Incoming UDP Data
Example Response:
(The hex string "48656C6C6F0D0A"
decodes to Hello
)
Close the Listener Socket
Expected Response:
🛠️ Prerequisites for Sending UDP Payloads to the EVK
Public IP Mapping (NAT) or VPN Configuration Ensure the EVK is reachable via a public IP address, either through NAT port forwarding or a VPN tunnel. This is essential for delivering UDP packets to the device.
Static IP Assignment Assign a static IP address to the device within your APN to ensure consistent and reliable routing.
Last updated
Was this helpful?