Hi Frédéric,
Many thanks for your help.
Your suggestion works. The host-name I supply in the call to
nx_dhcp_create works.
I can see in our DHCP server logs that the device gets its IP address and in the log file I can see the host name that I gave it.
BTW - we use Microsoft Windows servers for all our networking - and I'm using Windows 10 as my workstation
But the problem remains that I can't still ping the device using the host-name, nslookup also returns no results - even if the FQDN is used (I run ipconfig /flushdns of course before these tests).
FYI - It seems that our DHCP server extends the host name supplied by a client to the internal LAN FQDN. E.g. If the client supplied hostname is "Tester0" and the local LAN domain name is "Acme.local" the FQDN becomes "Tester0.Acme.local". This is what I see in the DHCP server logs.
I've also tried ping and nslookup on a Ubuntu linux VM that I have - with the same negative results, and I tried on a different PC - same results.
It seems that the default setting for Windows DHCP/DNS services is to have the DHCP client explicitly request a DNS update.
It would of course be interesting to try to change the DHCP server setting - but the reason I'm doing these experiments is to evaluate the Eclipse ThreadX (Azure RTOS) "fit for purpose" - for future products of the company I'm working for - and changing the DHCP service settings would defeat that.
The example project that I built and tested is
Nx_TCP_Echo_Server running on a STM32 Nucleo-H723ZG board.
Sorry about the long rambling post - but it helps my thinking process to write this all down...
So the question is:
Is there a way to have the DHCP client (nx_dhcp_create) request the DNS update?
I've had a look at
RFC2131 (the DHCP protocol) but could not find anything specific regarding this "DNS update request" problem. It may be something Microsoft specific but I don't know.
Best regards,
Snorri