Possibility to restart an EasyV3 via PAWN script

Hello Community,

just out of curiosity, is there a possibility to restart an EasyV3 via PAWN-script?

Greetings

Hello @stegmaf,

restarting the Firmware of a rapidM2M device via the Device Logic (i.e. PAWN-script) is not possible. But using the following Code you can restart the Device Logic:

/* declare dummy native function which does not exist */
native Script_Reset();
 
…
if (we_should_reset)
{
 /* Generate a user specific log entry (to indicate that the Device Logic restart was intended) */ 
 rM2M_WriteLog( 000, 000);
  
  /* call not existing native function */
  Script_Reset();
}
…

The restart of the Device Logic is achieved by forcing the Device Logic Error 19 “File or function not found”. As reaction to this the firmware generates several Log entries (see picture below). To indicate that the Device Logic restart was intended you should use the “rM2M_WriteLog” function to generate a user specific log entry.The first parameter of this function specifies the “log code” and the second specifies the “extra log parameter”(see picture below)

For more information regarding the “rM2M_WriteLog” function see the User Help integrated in the rapidM2M Studio.

Kind regards
Microtronics Engineering