Hello, is there any information on how to change the Real-time Configurations at runtime?
thanks in advance
Hello, is there any information on how to change the Real-time Configurations at runtime?
thanks in advance
Hello,
According to the Asset Tracker v2 documentation, this should be possible from the cloud side:
The device retrieves its real-time configurations from the cloud service in either of the following ways:
Upon every established connection to the cloud service, the application will always request its cloud-side device state that contains the latest real-time configurations.
When the device exits Power Saving Mode (PSM) to publish data, and if the cloud-side device configuration has been updated while the device was in PSM, the application will request for the newly changed configuration.
Kind regards,
Øyvind
Thank you very much for your answer. Unfortunately I have problems how to set the real time configurations inaws-IoT. Can I just edit the shadow and the configurations will be applied? Or how does that work exactly?
thanks in advance
Can I just edit the shadow and the configurations will be applied? Or how does that work exactly?
Yes, that is what the web application does as well, it modifies the desired.cfg properties in the device's shadow.
Unfortunately I have problems how to set the real time configurations inaws-IoT.
Can you specify what problems you are facing?
I am currently in active mode and trying to switch to passive mode via the real time configuration. For this I change the shadow in aws IoT (Manage -> Things->myThingy->Shadows ->Classic Shadow->Edit) like this:
"cfg": {
"act": false,
"gpst": 60,
"actwt": 120,
"mvres": 120,
"mvt": 3600,
"acct": 10
},
Even after waiting for a longer time and switching off/on, it does not switch to passive mode.
If I recompile Asset Tracker V2 and flash it to the Thingy91, then the shadow changes back to
"cfg": {
"act": true,
"gpst": 60,
"actwt": 120,
"mvres": 120,
"mvt": 3600,
"acct": 10
},
and does not take over the previously set values.
Ok, that's not expected.
Which version of the firmware are you running?
Ok, that's not expected.
Which version of the firmware are you running?
I use the mfw_nrf9160_1.2.3 firmware
And which version of the asset_tracker_v2?
That should be version 1.5.0 as well.
There have been quite a few changes since then, and we are about to release version 1.6 of nRF Connect SDK. You could have a look at that: https://github.com/nrfconnect/sdk-nrf/milestone/14
What would be interesting is too see the device logs from a device which is running in active mode, and where you then switch to passive mode on the cloud.
2021-06-17T13:15:19.031Z DEBUG modem << [00:00:00.244,689] [0m<inf> event_manager: APP_EVT_START[0m
2021-06-17T13:15:19.072Z DEBUG modem << [00:00:00.270,751] [0m<inf> event_manager: DATA_EVT_CONFIG_INITle timer: 120 seconds interval[0m
2021-06-17T13:15:20.597Z DEBUG modem << [00:00:00.352,905] [0m<inf> event_manager: MODEM_EVT_LTE_CONNEC[00:00:01.803,344] [0m<inf> event_manager: MODEM_EVT_LTE_DISCONT_LTE_CELL_UPDATE[0m
2021-06-17T13:15:22.430Z DEBUG modem << [00:00:03.613,220] [0m<inf> event_manager: MODEM_EVT_LTE_CONNECTED[0m
2021-06-17T13:15:22.435Z DEBUG modem << [00:00:03.619,720] [0m<inf> event_manager: MODEM_EVT_L Cloud connection establishment in progress[0m
2021-06-17T13:15:29.363Z DEBUG modem << [00:00:03.634,3nds if not successful[0m
2021-06-17T13:15:29.546Z DEBUG modem << [00:00:03.643,676] [0m<inf> event_ma[00:00:10.577,056] [0m<inf> event_manager: CLOUD_EVT_CONNECTED[00:00:10.748,535] [0m<inf> event_manager: DATA_EVT_DATE_TIME_OBTAINED[0m
2021-06-17T13:15:29.552Z DEBUG modem << [00:00:10.755,493] [0m<inf> event_manager: APP_EVTTAT)[0m
2021-06-17T13:15:29.553Z DEBUG modem << TAT)[0m
2021-06-17T13:15:29.566Z DEBUG modem << [00:00:10.773,895] [0m<inf> event_manager: GPS_EVT_ACTIVE[0m
2021-06-17T13:15:29.577Z DEBUG modem << [00:00:10.789,794] [0m<inf> event_manager: SENSOR_EVT_ENVIRONMENTAL_DATA_READY[0m
2021-06-17T13:15:29.699Z DEBUG modem << [00:00:10.828,186] [0m<inf> event_manager: MODEM_EVT_MODEM_STAT[00:00:10.870,208] [0m<inf> event_manager: MODEM_EVT_MODEM_DYNA[00:00:10.912,231] [0m<inf> event_manager: MODEM_EVT_BATTERY_DATA_READY[0m
2021-06-17T13:16:33.775Z DEBUG modem << [00:01:14.979,949] [0m<inf> event_manager: GPS_EVT_TIMEOUT[0m
2021-06-17T13:16:33.781Z DEBUG modem << m
2021-06-17T13:16:33.832Z DEBUG modem << [00:01:14.991,607] [0m<inf> event_manager: DATA_EVT_DATA_REA[00:01:15.007,019] [0m<inf> event_manager: DATA_EVT_DATA_SEND[[00:01:15.048,919] [0m<inf> event_manager: CLOUD_EVT_DATA_ACK[
here I have changed the shadow
2021-06-17T13:17:19.083Z DEBUG modem << [00:02:00.290,740] [0m<inf> event_manager: APP_EVT_DATA_GET_ALL[0m
2021-06-17T13:17:19.144Z DEBUG modem << [00:02:00.297,119] [0m<inf> event_manager: APP_EVT_DATA_G[00:02:00.363,159] [0m<inf> event_manager: GPS_EVT_ACTIVE[0m
2021-06-17T13:17:19.199Z DEBUG modem << [00:02:00.373,260] [0m<inf> event_manager: SENSOR_EVT_ENVIRONME[00:02:00.392,944] [0m<inf> event_manager: MODEM_EVT_MODEM_DYNA[00:02:00.415,863] [0m<inf> event_manager: MODEM_EVT_BATTERY_DATA_READY[0m
2021-06-17T13:18:23.170Z DEBUG modem << [00:03:04.378,784] [0m<inf> event_manager: GPS_EVT_TIMEOUT[0m
2021-06-17T13:18:23.189Z DEBUG modem << m
2021-06-17T13:18:23.191Z DEBUG modem << [00:03:04.390,472] [0m<inf> event_manager: DATA_EVT_DATA_REAm
2021-06-17T13:18:23.223Z DEBUG modem << [00:03:04.390,472] [0m<inf> event_manager: DATA_EVT_DATA_REA[00:03:04.402,221] [0m<inf> event_manager: DATA_EVT_DATA_SEND[[00:03:04.444,061] [0m<inf> event_manager: CLOUD_EVT_DATA_ACK[0m
2021-06-17T13:19:19.078Z DEBUG modem << [00:04:00.290,740] [0m<inf> event_manager: APP_EVT_DATA_GET_ALLET - Requested data types (MOD_DYN, BAT, ENV, GNSS)[0m
2021-06-17T13:19:19.140Z DEBUG modem << [00:04:00.363,281] [0m<inf> event_manager: GPS_EVT_ACTIVE[0m