Skip to main content
Associate II
August 20, 2026
Question

STM32N655X0HxQ + NetX Duo DHCP client receives DHCP ACK but does not obtain IP address

  • August 20, 2026
  • 1 reply
  • 23 views

Hi STM Team,

I am working on an STM32 + ThreadX + NetX Duo application with the Ethernet interface. I am facing an issue with the NetX Duo DHCP client.

My setup is:

  • MCU: STM32N655X0HxQ 

  • RTOS: ThreadX

  • Network stack: NetX Duo

  • Ethernet driver: STM32 HAL Ethernet driver

  • DHCP client: NetX Duo DHCP

  • PC is running as the DHCP server

  • MCU and PC are connected on the same Ethernet network.

Observed behavior

The Ethernet interface works correctly when I configure a static IP address.

For example, with:

MCU IP      : 192.168.50.50
Subnet Mask : 255.255.255.0

Ethernet communication works correctly.

However, when I enable the NetX Duo DHCP client, the MCU remains stuck at:

Looking for DHCP server ..

The DHCP server is running correctly on my PC.

DHCP server configuration

My PC DHCP server is configured as:

[SETTINGS]
IPPOOL_1=192.168.50.10-254
IPBIND_1=192.168.50.1
AssociateBindsToPools=1
Trace=1
DeleteOnRelease=0
ExpiredLeaseTimeout=3600

[GENERAL]
LEASETIME=86400
NODETYPE=8
SUBNETMASK=255.255.255.0
NEXTSERVER=192.168.50.1
ROUTER_0=0.0.0.0

I have also configured a MAC-specific DHCP reservation:

[00-80-E1-00-10-00]
IPADDR=192.168.50.50

The MCU MAC address is:

00:80:E1:00:10:00

So the MAC address is correct.

Wireshark observation

I can see the complete DHCP exchange in Wireshark.

The MCU sends:

DHCP Discover

The PC responds with:

DHCP Offer

The MCU then sends:

DHCP Request

The PC responds with:

DHCP ACK

The DHCP ACK contains:

Your (client) IP address: 192.168.50.50
Subnet Mask: 255.255.255.0
DHCP Message Type: ACK
Next server IP: 192.168.50.1
Client MAC: 00:80:e1:00:10:00

So the PC is definitely assigning 192.168.50.50 to the MCU and sending the DHCP ACK.

However, the MCU does not proceed with the DHCP process.

Instead, I see the DHCP Request/ACK sequence repeating continuously:

DHCP Request

DHCP ACK

DHCP Request

DHCP ACK

...

Ethernet RX debugging

I verified that Ethernet RX is working.

HAL_ETH_ReadData() is being called.

The NetX driver also reaches:

_nx_driver_hardware_packet_received()

and:

_nx_driver_transfer_to_netx(...)

Therefore, the Ethernet driver is receiving packets.

I also tried:

FilterConfig.BroadcastFilter = DISABLE;

but the problem remains.

The DHCP ACK is being sent as:

Source:      192.168.50.1
Destination: 255.255.255.255

which I believe should be acceptable for DHCP.

IP address change callback

I registered the NetX IP address change callback:

ret = nx_ip_address_change_notify(
&NetXDuoEthIpInstance,
ip_address_change_notify_callback,
NULL);

The callback is:

static VOID ip_address_change_notify_callback(
NX_IP *ip_instance,
VOID *ptr)
{
if (nx_ip_address_get(
&NetXDuoEthIpInstance,
&IpAddress,
&NetMask) != NX_SUCCESS)
{
Error_Handler();
}

if (IpAddress != NULL_ADDRESS)
{
tx_semaphore_put(&DHCPSemaphore);
}
}

However, this callback is not getting triggered.

The application therefore remains blocked at:

tx_semaphore_get(&DHCPSemaphore, TX_WAIT_FOREVER);

after printing:

Looking for DHCP server ..

DHCP startup code

The DHCP client is started using:

ret = nx_dhcp_start(&DHCPClient);

if (ret != NX_SUCCESS)
{
LOG_ERROR("DHCP start failed ERROR");
Error_Handler();
}

LOG_INFO("Looking for DHCP server ..");

if (tx_semaphore_get(
&DHCPSemaphore,
TX_WAIT_FOREVER) != TX_SUCCESS)
{
LOG_ERROR("tx_semaphore_get ERROR");
Error_Handler();
}

Important comparison

Static IP:

Ethernet initialization     → Working
Ethernet RX → Working
NetX communication → Working
Ping → Working
HTTPS web server → Working
mDNS → Working

DHCP:

DHCP Discover               → Working
DHCP Offer → Received
DHCP Request → Sent
DHCP ACK → Received
HAL_ETH_ReadData() → Called
NetX RX driver → Called
IP address → Not assigned
IP address change callback → Not triggered
DHCP Request/ACK → Repeats

My question

Since the DHCP server is clearly sending a valid DHCP ACK containing:

192.168.50.50
255.255.255.0

and the Ethernet RX path is receiving the packet, what could cause NetX Duo DHCP to not accept/process the DHCP ACK and transition to the assigned IP state?

Could this be related to:

  1. NetX packet prepend/alignment?

  2. STM32 Ethernet driver configuration?

  3. DHCP ACK broadcast handling?

  4. Any specific STM32 HAL Ethernet configuration required for NetX Duo DHCP?

Any guidance on where to debug this would be greatly appreciated.

Thank you.

1 reply

ST Employee
August 24, 2026

Hello ​@shreyas15 ,

Thank you for the detailed report.

The observed symptom, ACK received, but IP address not applied, Request/ACK loop, and callback not triggered does not initially point to an Ethernet driver issue, since the static IP configuration works. It appears more likely to be something to verify in the DHCP option processing performed by NetX Duo.

The first item to check is the value of the DHCP Router option in the DHCP ACK.
The Next Server IP field shown in the frame is a different field and does not correspond to the Router option.
If the Router option is set to 0.0.0.0, NetX Duo may reject the ACK, fail to apply the IP address, and remain stuck in the Requesting/ACK loop.

Suggested correction to test: set ROUTER_0=192.168.50.1 with a valid gateway.

With Regards,

If your question is answered, please close this topic by clicking ""Accept as Solution"".