DA16200mod FreeRTOS 3.2.0.0 Hostname

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

Parents
  • Hi Tecomon and brunner,

    Please check dhcp_option_hostname() function in dhcp.c file.

    • Path : {SDK_root}\core\libraries\3rdparty\lwip\src\core\ipv4

     

    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:  

    • Path : {SDK_root}\core\system\include\common\sdk_type.h

     

    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");

     

    Thanks, PM_Dialog

Reply
  • Hi Tecomon and brunner,

    Please check dhcp_option_hostname() function in dhcp.c file.

    • Path : {SDK_root}\core\libraries\3rdparty\lwip\src\core\ipv4

     

    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:  

    • Path : {SDK_root}\core\system\include\common\sdk_type.h

     

    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");

     

    Thanks, PM_Dialog

Children
No Data