2025-10-05 1:41 AM - edited 2025-10-05 2:05 AM
Hello everyone,
I’m currently working on setting up UDP communication using NetX Duo with a static IP address, configured through STM32CubeMX (IOC) in nucleo n657x0-q.
Please note that the UDP communication needs to be initialized and executed in the Application (APPLI) — not in the FSBL.
I’ve gone through several related threads in the community, but I still haven’t managed to get the communication working properly.
Could someone please provide a clear, step-by-step explanation or example of how to configure and initialize UDP communication (client or server) with a static IP in NetX Duo under APPLI?
I would greatly appreciate details on:
The correct IOC configuration (Ethernet, NetX Duo, IP, UDP, MPU etc.)
The proper initialization sequence in APPLI (how and when to start the network and socket)
Relevant NetX Duo API functions (e.g., nx_udp_socket_create, nx_udp_socket_bind, nx_udp_socket_send, nx_udp_socket_receive)
Common issues or pitfalls when moving UDP handling from FSBL to APPLI
Thank you in advance for your support and guidance!
Best regards,
Alon Sade
2025-10-10 2:22 AM
Hi Alon,
You can take a look at this project. It runs a web server in APPLI using Netxduo stack and Mongoose Networking Library, a networking library ideal for embedded devices and it is also capable of running on top of Netxduo. Though project itself is a HTTP web server featuring a device dashboard, it should provide you useful insights into configuring the hardware (clocks, ethernet, etc.) in the IOC and on how to configure and initialize Netxduo and ThreadX. Moreover, the project can be easily modified to act as a UDP client or server easily, using the Mongoose API documented here.
Heads up: I am part of the Mongoose development team (we recently made our library compatible with STM32N657 and were putting together some examples, including this one). I hope this points you in the right direction!