Configuration Updates

Hello rapidM2M Community!

I am trying to change the configuration values of my script based on the server settings. I configured a machine profile on the server and implemented a function in my script to react to different server settings.

Like in this example: Extended “System Values” Example

Now I was wondering, how does the script know when a configuration block has changed on the device?
When does the server update these configuration blocks?


Hello @Stefan

There are 10 different configuration memory blocks (“config0” - “config9”) where you can put your Parameters.
If you change the value of one of the parameters of a block via the Interface of the rapidM2M portal, the timestamp of the entire block is updated.
The next time the device connects to the rapidM2M portal, this is detected and the block is transmitted to the device.
If the Firmware of the device gets a changed configuration block it calls the function you specified via the “rM2M_CfgOnChg()” Function. In case of the linked example this is the “ReadConfig(iCfg)” function. This is all done automatically by the system

You only have to program the “ReadConfig(iCfg)” function where you first check which configuration block has been changed (specified by the System through the Parameter “iCfg” of the callback function) and read out the corresponding configuration block using the “rM2M_CfgRead” function. In the read out data you can find the value you have entered via Interface of the rapidM2M portal.

Note:If the device is in online mode, the changed configuration is applied immediately. In this mode, the device constantly exchanges information with the rapidM2M portal. If the device is in interval or wakeup mode, you must first trigger a connection to the rapidM2M portal before the changed configuration is available on the device.

Kind regards