Setting "Configured IP"

Discussion to talk about software related topics only.
Post Reply
SeeCwriter
Posts: 608
Joined: Mon May 12, 2008 10:55 am

Setting "Configured IP"

Post 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
}
User avatar
TomNB
Posts: 541
Joined: Tue May 10, 2016 8:22 am

Re: Setting "Configured IP"

Post 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.
User avatar
pbreed
Posts: 1081
Joined: Thu Apr 24, 2008 3:58 pm

Re: Setting "Configured IP"

Post by pbreed »

Boot into the alt montior ie hit 'A" to abort
and type setup....

What do you see there?
User avatar
pbreed
Posts: 1081
Joined: Thu Apr 24, 2008 3:58 pm

Re: Setting "Configured IP"

Post by pbreed »

Also run IPSETUP whet do you see there?
Post Reply