PDA

View Full Version : SNAPY Wake-up, Reset and Status report


korda
08-10-2008, 01:25 PM
We would like to know better how to utilize Snappy reset and reporting some back some advanced info, like this:
1) After snapy got Awake command, we would like to reset(reboot) it completely. The documentation is not clear which method to use:
a) resetVm()
b) initVm()
c) vmStat(VM_INIT, argument -???)
2) after unsuccessful reboot/reset - we would like to report back to Portal/gateway following:
a) snapy firmware version - loadNvParam (?????)
b) snapy script CRC - loadNvParam(SNAPPY_CRC_ID) - is this correct, or this is combined CRC (frimware+script)?

msellers
08-11-2008, 03:54 PM
Vlad,

You should utilize the built-in reboot() command but I'd be curious as to why you need to reboot? If it is to re-run a particular piece of code, like your startup function, then you can just call the startup function in your code just like anything other function. Those particular vm commands you mentioned are used by portal to upload new firmware.

We do not include built in functionality to detect a failed reboot.
However, you can program this functionality yourself. You would need to set a global variable before calling reboot and check to see if it had changed.

For firmware version, use getInfo() with constants 5, 6, and 7. They contain the x.y.z version numbers. All of the available parameter options for this command will be documented by the final release.

Calling loadNvParam(40) just returns the CRC of the SNAPpy script.