miro
Cargo

Configuration

1. Overview

miro Cargo is configured with LoRaWAN® downlinks which are transmitted to port 220. The payload of a configuration downlink corresponds to a so-called AT command. After one or more configuration downlinks are received, a reset command needs to be transmitted to the miro Cargo such that the configuration is stored in non-volatile memory and an a reset is triggered. After this reset, the miro Cargo uses the new configuration.

2.1. Overview

The following configuration downlinks are available:

Command Description Default value Min value Max value Unit

ATZ

Reset the MCU

-

-

-

-

AT+GPSHOLD=<value>

Moving interval
(GPS hold time)

120'000
(2 min)

60'000
(1 min)

4'294'967'295
(49.7 days)

ms

AT+GPSCYC=<value>

Steady interval
(GPS cycle time )

21'600'000
(6 hours)

60'000
(1 min)

4'294'967'295
(49.7 days)

ms

AT+STACYC=<value>

Status message interval

21'600'000
(6 hours)

600'000
(10 min)

4'294'967'295
(49.7 days)

ms

2.2. ATZ

Resets the MCU. If the configuration has been changed, the new configuration is stored in non-volatile memory and applied after the reset.

2.3. AT+GPSHOLD

Sets the GPS hold time, also known as moving interval. The GPS hold time inhibits further GPS fix acquisition for a certain time period. This setting is used when GPS fixes are triggered by the accelerometer. A first accelerometer event will trigger GPS fix acquisition immediately. Further accelerometer events will be ignored until after the hold time interval. However, a flag will be set in this case, so that the next GPS fix acquisition will immediately start right after the hold time interval.

Example 1. Setting the moving interval to 5 minutes (300 seconds)

AT+GPSHOLD=300000

2.4. AT+GPSCYC

Sets the regular GPS fix cycle time, also known as steady interval. The GPS cycle time is used when GPS fixes are triggered by the timer. The GPS cycle time is the time between two consecutive GPS fix acquisitions. The GPS cycle time is running independently from accelerometer events.

Example 2. Setting the steady interval to 1 hour (3600 seconds)

AT+GPSCYC=3600000

2.5. AT+STACYC

Sets the regular status interval. Status messages are enabled by default, all sensors are read out when the regular status interval expires. Please refer to the payload documentation for more information about the generated status message. To save battery life, keep it at a large value.

Example 3. Setting the status interval to 12 hours (43200 seconds)

AT+STACYC=43200000

For every downlink packet, an uplink packet is scheduled containing the corresponding AT response code. The following response codes are available:

Response code Hexadecimal Description

AT_OK

41545F4F4B

Command executed successfully

AT_PARAM_ERROR

41545F504152414D5F4552524F52

Command was outside of the valid range

AT_ERROR

41545F4552524F52

Command execution failed

The payload of an AT command downlink corresponds to an ASCII encoded AT command with zero-termination. Zero-termination means that 00 needs to be added at the very end of the hexadecimal representation of the AT command. The last line of the following examples corresponds to the payload of the respective downlink.

Example - Changing the moving interval to 3 minutes (180 seconds):

AT command as ASCII string: AT+GPSHOLD=180000
AT command as hex: 41542B475053484F4C443D313830303030
AT command as hex with zero termination: 41542B475053484F4C443D31383030303000

Example - Resetting the device:

AT command as ASCII string: ATZ
AT command as hex: 41545A
AT command as hex with zero termination: 41545A00

After changing a configuration parameter via downlink, the miro Cargo needs to be reset such that the configuration is loaded. This is done by sending the downlink command ATZ on port 220.

For every downlink packet, an uplink packet is scheduled containing the corresponding AT response code (usually AT_OK or 41545F4F4B in hexadecimal representation). If both the configuration change and the reset are queued simultaneously on the LoRaWAN® network server, the configuration is applied the fastest way possible. The reason for this being that the configuration change triggers an uplink message (usually AT_OK) which opens another downlink slot for the reset command to be received immediately.