Part Number: MSP432E401Y
Other Parts Discussed in Thread: SYSCONFIG
Hi,
I'm using the NDK from simplelink_msp432e4_sdk_4_20_00_12 and sysconfig. I would like to change the hostname at runtime. Can you please provide an example?
Thanks,
-Mike
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: MSP432E401Y
Other Parts Discussed in Thread: SYSCONFIG
Hi,
I'm using the NDK from simplelink_msp432e4_sdk_4_20_00_12 and sysconfig. I would like to change the hostname at runtime. Can you please provide an example?
Thanks,
-Mike
Hi Mike
The most bare bones example we will have for setting up the ethernet controller would be the lwIP example that you can find in resource explorer:
https://dev.ti.com/tirex/explore/node?node=AAHyKiGer9-hMcoEDUONLg__J4.hfJy__LATEST
Hope this resource is helpful on your question.
Thanks!
Hi,
I resolved it with this.
void *_hCfg;
_hCfg = CfgGetDefault();
result = CfgGetEntry(_hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_HOSTNAME, 1, &hCfgEntry);
if(result == 1)
{
result = CfgRemoveEntry(_hCfg, hCfgEntry);
if(result != 0)
{
printf("netIPAddrSet(), CfgRemoveEntry() Error\r\n");
return -3;
}
}
CfgAddEntry(_hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_HOSTNAME, 0, strlen(ip_set->hostname), (unsigned char *)ip_set->hostname, NULL);