Setting "Configured IP"
Posted: Mon Feb 05, 2018 11:01 am
On a NANO54415 I notice that on boot-up that "Configured IP" is set to a previous static IP used some time ago. Normally it comes up as 0.0.0.0. It's not obvious to me where in my code I might be setting it. It's definitely not intentional.
Does setting the IP Address and Netmask in an InterfaceBlock cause those values to be saved in flash?
I'm using v2.8.5.
Does setting the IP Address and Netmask in an InterfaceBlock cause those values to be saved in flash?
I'm using v2.8.5.
Code: Select all
void ChangeRuntimeIPSettings( InterfaceBlock *ib_, IPADDR &IpAddr, IPADDR &IpMask, IPADDR &IpGate, IPADDR &IpDNS )
{
#ifdef _DEBUG_NETWORK
iprintf("Old Settings:\r\n");
iprintf(" IP: "); ShowIP(ib->netIP); iprintf("\r\n");
iprintf(" Mask: "); ShowIP(ib->netIpMask); iprintf("\r\n");
iprintf(" Gway: "); ShowIP(ib->netIpGate); iprintf("\r\n");
iprintf(" DNS: "); ShowIP(ib->netDNS); iprintf("\r\n");
iprintf("-------------------------------\r\n");
#endif
ib_->netIP = IpAddr;
ib_->netIpMask = IpMask;
ib_->netIpGate = IpGate;
ib_->netDNS = IpDNS;
#ifdef _DEBUG_NETWORK
iprintf("New Settings:\r\n");
iprintf(" IP: "); ShowIP(ib->netIP); iprintf("\r\n");
iprintf(" Mask: "); ShowIP(ib->netIpMask); iprintf("\r\n");
iprintf(" Gway: "); ShowIP(ib->netIpGate); iprintf("\r\n");
iprintf(" DNS: "); ShowIP(ib->netDNS); iprintf("\r\n");
iprintf("-------------------------------\r\n");
#endif
}