Skip to main content

Common Functionality

The catalog applications share common functionality. For example the button behaviour or the way settings are handled.

Network Mode Configuration

Some catalog firmwares allows configuration to use NB-IoT/LTE or LoRaWAN network. This firmware after power-up is not sending data, the LED is blinking yellow and you need to configure correct radio mode.

This app mode configuration is needed currently for these catalog applications:

The default functionality is that a device does not use any radio (mode none) and you need to set configuration parameter mode.

  • app config mode lte for NB-IoT/LTE network
  • app config mode lrw for LoRaWAN network

Then apply changes by typing config save. The device will reboot and use the correct network.

Button Behaviour

Applications define actions for the mainboard button. The actions are chosen based on the number of consecutive presses of the button. Before an action is executed, CHESTER will blink the orange LED once for each button press, indicating the amount of consecutive presses. The actions are:

Number of pressesAction
1Send data immediately
2Sample data immediately
3Sample, aggregate and send data immediately
4Reboot the device
5Turn on the load LED for 2 minutes

LED Behaviour

When CHESTER is powered on, the LED will be lit red until the application is initialized. Then CHESTER will blink the green LED every five seconds to indicate the app is running.

If the LED is blinking yellow, you need to configure which radio to use.

Default Configuration

This is the default configuration (printed using the app config show command):

app config interval-sample 60
app config interval-aggreg 300
app config interval-report 1800

You can change configuration using the app config command, followed by config save. Example:

app config interval-sample 120
app config interval-aggreg 600
config save

This will apply the changes and restart the application. After the restart, you can verify the settings changed using the app config show command.

If you want to reset the configuration back to the default state, you can do so using config reset. In rare cases, when the CHESTER console isn't available, you can use the manual reset procedure. To initiate this, holding down the button while CHESTER boots. After holding the button for around 5 seconds, CHESTER will start rapidly blinking. At this point, you can release the button to proceed with the reset. If you continue holding the button until CHESTER stops blinking, the reset will be aborted.

caution

Reseting the configuration will also reset the connection parameters for LTE and LoRaWAN, which can result in CHESTER unable to communicate.

You might also change configuration remotely over HARDWARIO Cloud using Config downlink command. In cloud you don't send the config save command.

Report Interval Jitter

The periodic sending of data with interval-report has intentional jitter. This is used in case lot of CHESTERs are placed near each other, so they don't transmit at the same time if they have set the same interval. This jitter is random in the range of ±20 % of interval-report.

For example, if interval-report is set to 100 seconds, you can receive periodic data where two messages have a time difference from 80 (-20%) to 120 (+20%) seconds.

In applications where there are multiple aggregated values, this jitter has a side-effect that sometimes you can see fewer or more aggregated values than expected. The missing values are not lost, they will be sent correctly in the next message.

This jitter is not applied to events like button presses or input changes. They report immediately.

Shell Commands

Apart from the commands mentioned above, the shell offers many more commands. They can be listed using the help command.

Example help output from the CHESTER Clime application:

help
You can try to call commands with <-h> or <--help> parameter for more information.

Available commands:
accel :Accelerometer commands.
aggreg :Aggregate data immediately
app :Application commands.
batt :Battery commands.
ble :BLE commands.
button :Button commands.
config :Configuration commands.
flash :Flash shell commands
help :Prints the help message.
hygro :Hygrometer commands.
i2c :I2C commands
info :Device information commands.
kernel :Kernel commands
led :LED commands.
log :Commands for controlling logger
lrw :LoRaWAN commands.
lte :LTE commands.
mcuboot :MCUboot commands
rtc :RTC commands for date/time operations.
sample :Sample immediately.
send :Send data immediately.
therm :Thermometer commands.

Report Interval Jitter

The periodic sending of data with interval-report has intentional jitter. This is used in case lot of CHESTERs are placed near each other, so they don't transmit at the same time if they have set the same interval. This jitter is random in the range of ±20 % of interval-report.

For example, if interval-report is set to 100 seconds, you can receive periodic data where two messages have a time difference from 80 (-20%) to 120 (+20%) seconds.

In applications where there are multiple aggregated values, this jitter has a side-effect that sometimes you can see fewer or more aggregated values than expected. The missing values are not lost, they will be sent correctly in the next message.

This jitter is not applied to events like button presses or input changes. They report immediately.

Configuration backup v1.x.x → v2.x.x

When upgrading an older v1.x.x firmware to v2.x.x - it is necessary to backup application configuration. The most important is this step in CHESTER Current application, where in configuration there are the current transformers calibration coefficients.

In case you forget to back up the data - they are not lost unless you executed config save command in newer firmware. However, you need to temporarily downgrade to older firmware that can read the old configuration and apply the same configuration after the firmware is updated.

In the old firmware type app config show to the console. Then you need to copy all configuration items. If you use HARDWARIO Manager phone app or HARDWARIO CLI on your computer, you can highlight and copy current configuration text to your clipboard or text editor.

After updating to a newer firmware, paste the same lines to the console. If you use HARDWARIO Manager phone app or HARDWARIO CLI on your computer, you can paste all the lines together to the input line and press enter. All commands will be applied one by one. Check that configuration was applied correctly by typing app config show. Do not forget to apply changes by typing config save.