Skip to main content
Visitor II
March 25, 2023
Question

Azure RTOS Can't enable both DHCP and UDP.

  • March 25, 2023
  • 6 replies
  • 1699 views

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

    This topic has been closed for replies.

    6 replies

    ST Employee
    March 26, 2023

    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.1Author
    Visitor II
    March 26, 2023

    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

    ST Employee
    March 28, 2023

    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.1Author
    Visitor II
    March 28, 2023

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

    ST Employee
    March 28, 2023

    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.1Author
    Visitor II
    March 28, 2023

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