Change IP Parameters Telnet sample application

Hi,

I’m trying to use the Telnet Server Menu Sample application.
While using the debugger with Digi ESP I can login and change IP paramters in the telnet interface but these changes do not actually take effect.

e.g. If I change the Ip address through the telnet interface it does not actually change the IP address of the device, it just shows the new address as if it has.

Does changing IP paramters not work in debug mode? or does the device need to be reset for the changes to take place, how would I do this?

Thanks

I believe what you are doing is changing parameters in NVRAM. If you changed the IP address in real time, then your telnet session would have disconnected. I believe you’ll need to reboot to be able to realize the change in IP address

The standard Digi code forces at least some of the NVRAM parameters (including IP address and time server addresses) to the defaults set in appconf.h during debug.

I understand what you’re saying about appconf.h. I have now got it to look at NVRAM instead of appconf.h for its IP parameters, but these settongs do not take effect until the device is terminated from debug mode and restarted.

Is there a NET+OS function used to reboot the device so as I can do it automatically through software?

Thanks

Look at the following:

netos\src\bsp\customize\customizeReset.c

 Look for function customizeReset().
 This function calls NAReset().

Thanks, I have tried to use this function and it seems to shutdown the device. But it does not come back up again.

Using customizeReset() have I got to modify it in any way for it to work? I’m using the supplied development board from digi

There are two calls as follows:

customizeReset() and customizeRestart(). Restart is more of a warm restart but it does not reset hardware. Yo should look in the API reference guide for more details on these APIs.

Now if your processor did not restart, there could be two reasons.

  1. If you are running under debugger control, it does not appear you are going to get what you want.

  2. Check the definition of BSP_HANDLE_UNEXPECTED_EXCEPTION. The definition of this ties into the actions of the above mentioned APIs. Again, you should consult the API reference guide (in the \documentation directory) for details.

Thanks, changing the build to Release and running customizeReset(); worked

FYI, calling customizeReset() from with in the debugger won’t work well, it will cause the processor to hang as it puts itself into a reset and the JTAG Link just holds it there. To test properly, you need to write the image to flash and run it.

Also, customizeReset and customizeRestart are the same (check out the code in customizeReset.c).