cancel
Showing results for 
Search instead for 
Did you mean: 

Azure RTOS Can't enable both DHCP and UDP.

MHoop.1
Senior

I am trying to enable both DHCP and UDP in my Azure RTOS NetXDuo application, but when I enable DHCP the UDP selection is hidden, and vice versa. Why is this happening?

0693W00000aJhULQA0.png0693W00000aJhQyQAK.png 

Thx,

MikeH

6 REPLIES 6
Haithem Rahmani
ST Employee

Hi @Community member​ ,

DHCP protocol is using UDP to send requests, so when the former is enabled the latter is too.

please check the generated code when the DHCP is enabled you'll notice something like.

0693W00000aJiNLQA0.pngregards

MHoop.1
Senior

Thanks Haithem. However, I need to create both a UDP client (streaming audio) and a TCP/IP server application on the same board. How do I define the client UDP port?

Thx,

MikeH

Haithem Rahmani
ST Employee

Hi @Community member​,

you'll need to create an UDP socket first then bind it to listen to specified port as below:

0693W00000aJqgNQAS.pngplease refer to the Nx_UDP_Echo_Client for more details.

regards

Haithem.

MHoop.1
Senior

Thanks Haithem. So I assume there is no way to set the UDP port within the CubeIDE GUI?

Haithem Rahmani
ST Employee

Hi @Community member​ 

Indeed, the parameters exposed in the STM32CubeMX UI are only to initialize and configure network protocols, and don't deal with any applicative scenario.

you can always use one of the provided example as reference to build your own application.

regards

Haithem.

MHoop.1
Senior

Is there an example application of how to implement a fixed IP address?