Page 1 of 1

Setting "Configured IP"

Posted: Mon Feb 05, 2018 11:01 am
by SeeCwriter
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.

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
}

Re: Setting "Configured IP"

Posted: Mon Feb 05, 2018 4:18 pm
by TomNB
No, as you can see in the function name that only changes the runtime settings. To save it in flash you would need to modify a configuration record structure, then specifically write that structure to flash.

Re: Setting "Configured IP"

Posted: Mon Feb 05, 2018 4:55 pm
by pbreed
Boot into the alt montior ie hit 'A" to abort
and type setup....

What do you see there?

Re: Setting "Configured IP"

Posted: Mon Feb 05, 2018 4:55 pm
by pbreed
Also run IPSETUP whet do you see there?