Hi There,
didnt found the place where i can change the hostname of the Module.
Any document or file / function to watch for?
Thanks Tecomon
Hi Tecomon,
Can you please attach the console log? Sorry but I am not able to find it in your previous reply.
Thanks, PM_Dialog
Hi there,
I am running into the same issue. I keep seeing DA16200-XXXX where XXXX stands for the last four digits of the mac address as the hostname whether or not i use zeroconfig.
Device is running in STA mode. Goal is to not use zeroconfig and change the hostname that the device advertises into the local network.
Logfile is attached but nothing to see regarding this issue and a screenshot from a networkscanner where you can see the default hostname.
Hi brunner,
Thanks for your comment. I am currently checking this internally and I'll get back to you.
Thnaks, PM_Dialog
Hi Tecomon and brunner,
Please check dhcp_option_hostname() function in dhcp.c file.
Lines 2087-2091 :
#if defined DHCP_HOSTNAME_ONLY char tmp_hostname[20]; memset(tmp_hostname, 0, 20); snprintf(tmp_hostname, 20, "%s_%02X%02X", CHIPSET_NAME, netif->hwaddr[4], netif->hwaddr[5]); #else
The name is CHIPSET_NAME_MACADDR[5:4] by default. The "CHIPSET_NAME" is defined in sdk_type.h file:
There is a macro namely CHIPSET_NAME.
Default value :
#define CHIPSET_NAME “DA16200”
You can modify the hostname as follow.
snprintf(tmp_hostname, 20, "Customer_Test_STA");
Any answer to this question? I'm also interested in how to make our device have a custom name that is shown in the router, as opposed to `DA16200_D29C`.
mDNS host is not it.
Hi ST-Kon,Please refer on the last answer on this ticket.Please check dhcp_option_hostname() function in dhcp.c file.
The name is CHIPSET_NAME_MACADDR[5:4] by default.
It is placed in "\core\libraries\3rdparty\lwip\src\core\ipv4\dhcp.h"
snprintf(tmp_hostname, 20, "%s_%02X%02X", CHIPSET_NAME, netif->hwaddr[4], netif->hwaddr[5]);
"CHIPSET_NAME" is defined in "\core\system\include\common\sdk_type.h" as follow.