Skip to content

UDP Debug Terminal

About 245 wordsLess than 1 minute

SoftwareEmbeddedGoDebugging

2025-06-22

I was working with an embedded RTOS at work that had limited debug abilities, one of the debug options was to blast UDP messages out. The standard way of viewing these messages was to monitor the traffic on Wireshark. This worked fine but was a bit cumbersome and required configuration of the data column of wireshark and limited the data that was easily viewable. What I was really after was a Serial Terminal style interface where I could see the messages print live to newlines. This made diagnosing the particular issue I was struggling with much easier.

The code is relatively simple but had a few pitfalls, namely a network interface needs to be selected. To get this I prompt the user to select one of the available network interfaces detected by the OS package in go. This should make the program relatively portable assuming it can be compiled on the host OS and hardware.

This was one of the first times I turned to Go when trying to quickly solve an issue, since this I have solved several work related issues that are not easily open source-able but Go has really made these type of small utilities painless.