esp8266 UDP debugging

Page content

After a lots of lots of wasted hours  debugging an I2C driver it came out that the noise from the connected cheep USB2TTL converter is way too much. Would have lost months without the help of the new DS1054z scope i’ve got.

So i came up with this – a simple UDP debugging.

Simple socket to send udp messages.


Call dbg_udp_start(0) and you are ready to go. If you prefer not to flood your LAN with debug messages broadcasts then instead of 0 provide your workstation IP address.

Them usage is as simple as:

dbg_udp(“My debug message\n”);

You can go and wrap your os_printf or whatever calls to send via UDP too.

Viewing the log is done by any netcat alike.

nc -l -u -p 20202

It’s going to be handy when the UART is talking to other devices. You can even debug your devices over the internet this way.