fbpixel
Tags: ,

,

With one or more devices connected to a Wifi network, it’s often useful to have tools to test the UDP communication protocol. It’s possible to communicate between different devices such as computers, Arduino, ESP32, ESP8266, using the UDP protocol. There are tools that allow you to send data from your computer to test the connection and reception of certain packets.

Hardware

  • Computer
  • Microcontroller configured as UDP server (Raspberry Pi, ESP32, ESP8266)

NetCat

If you’re using a Windows computer, you can install the NetCat tool (Download source or pre-compiled NetCat ) (pre-installed on Linux and MacOS).

(N.B.: On Windows we recommend PacketSender, which is easier to install from a trusted source for beginners).

Netcat is a command-line tool for data transfer using the TCP network protocols.

Copy the folder to the desired location on your computer (e.g. C:

Go to the folder where nc.exe is located

Enter the following command to send a character string, modifying the IP address and port to match the local port open on your device.

echo "hello" | nc -u -w1 192.168.1.80 8888

(the -w option corresponds to the time-out time in seconds after which the connection closes)

Results

windows-netcat-send-hello Tools for testing UDP communication
esp8266-udp-netcat-communcation-result Tools for testing UDP communication

PacketSender

Download and install PacketSender software, a tool for exchanging data packets using the UDP, TCP, SSL and HTTP GET protocols.

First, enter the message in the ASCII insert

Then you can enter the server’s IP address and port

In the drop-down menu next to the “Send” button, select UDP.

windows-packetsender-send-hello Tools for testing UDP communication

All that’s left is to press “Send”.

Results

esp8266-udp-communcation-result Tools for testing UDP communication

Sources

If you know of any other tools for testing UDP , TCP or wireless communication, please feel free to leave a comment.