|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
System configuration parameters – persisted in NFC EEPROM at address 0. The structure contains all modifiable variables/settings of system, can be read/writa via NFC tool or LoRa special read/write process The structure is 92 bytes (SZ_SYSTEMPARAMS) with a CRC8 byte at the end. Fields marked RO are written by the firmware; fields marked RW can be updated by a phone app via the NFC EEPROM or via LoRa special process. More...
#include <mysensors_base.h>
Data Fields | |
| char | Sign [5] |
| uint8_t | AppVersion [2] |
| uint32_t | SensTimeoutMeasure |
| uint16_t | SensAltitude |
| uint8_t | SensSendInOnePacket |
| uint8_t | SensPollSensors |
| uint8_t | SensExistSensors |
| uint8_t | MemsStoreSensorData |
| uint16_t | MemsMaxSensorData |
| uint16_t | MemsCurrentCountSensorData |
| uint8_t | LoRaPort |
| uint8_t | LoRaRepeatTryConnect |
| uint8_t | LoRaAdaptiveDataRate |
| uint8_t | LoRaDataRate |
| uint8_t | LoRaTxPower |
| uint8_t | LoRaClass |
| uint8_t | LoRaRegion |
| uint8_t | HWBatteryLevelStatus |
| uint16_t | HWBatteryMV |
| uint8_t | HWDevEUI [8] |
| uint8_t | HWAppEUI [8] |
| uint8_t | HWAppKEY [16] |
| uint32_t | HWDevADDR |
| uint8_t | DevRestart |
| uint8_t | DevReset |
| uint8_t | DevOnOff |
| uint8_t | MqttConfirm |
| uint64_t | MqttTime |
| uint32_t | IntBatTimeSendUNIX |
| uint8_t | Dummy [8] |
| uint8_t | Crc |
System configuration parameters – persisted in NFC EEPROM at address 0. The structure contains all modifiable variables/settings of system, can be read/writa via NFC tool or LoRa special read/write process The structure is 92 bytes (SZ_SYSTEMPARAMS) with a CRC8 byte at the end. Fields marked RO are written by the firmware; fields marked RW can be updated by a phone app via the NFC EEPROM or via LoRa special process.
The following code is used for checking the structure validity:
Definition at line 273 of file mysensors_base.h.
| uint8_t systemParams_t::AppVersion[2] |
RO Firmware version bytes [major, minor] (see SYSTEMPARAMS_APPVER00/01)
Definition at line 277 of file mysensors_base.h.
| uint8_t systemParams_t::Crc |
CRC8 of bytes 0..(SZ_SYSTEMPARAMS-2); must be the last field
Definition at line 333 of file mysensors_base.h.
Referenced by systemParams_CheckCRC().
| uint8_t systemParams_t::DevOnOff |
RW 0 – device wakes periodically by RTC timer; 1 – stay on (default 0)
Definition at line 317 of file mysensors_base.h.
| uint8_t systemParams_t::DevReset |
RW Write 1 from phone app to reset to factory defaults on next poll
Definition at line 316 of file mysensors_base.h.
| uint8_t systemParams_t::DevRestart |
RW Write 1 from phone app to trigger a software restart on next poll
Definition at line 315 of file mysensors_base.h.
| uint8_t systemParams_t::Dummy[8] |
RW Reserved for future use; initialised to 0
Definition at line 331 of file mysensors_base.h.
| uint8_t systemParams_t::HWAppEUI[8] |
RW LoRaWAN JoinEUI / AppEUI (default: all zeros)
Definition at line 309 of file mysensors_base.h.
| uint8_t systemParams_t::HWAppKEY[16] |
RW LoRaWAN AppKey used for OTAA join (change before deployment)
Definition at line 310 of file mysensors_base.h.
| uint8_t systemParams_t::HWBatteryLevelStatus |
RO Battery charge level on a 1–254 scale (1 = very low, 254 = full)
Definition at line 306 of file mysensors_base.h.
| uint16_t systemParams_t::HWBatteryMV |
RO Battery voltage in millivolts
Definition at line 307 of file mysensors_base.h.
| uint32_t systemParams_t::HWDevADDR |
RO LoRaWAN DevAddr assigned after a successful OTAA join
Definition at line 311 of file mysensors_base.h.
| uint8_t systemParams_t::HWDevEUI[8] |
RO DevEUI derived from chip UID (format: [45 87 F2][4-byte UID][crc8])
Definition at line 308 of file mysensors_base.h.
| uint32_t systemParams_t::IntBatTimeSendUNIX |
internal setting - the time when was the battery status send via CayenneLpp - UNIX UTC time repeatedly every SYSTEMPARAMS_BATTIMESEND
Definition at line 326 of file mysensors_base.h.
| uint8_t systemParams_t::LoRaAdaptiveDataRate |
RW 1 – enable ADR (DataRate field is then ignored); 0 – fixed DR (default 1)
Definition at line 298 of file mysensors_base.h.
| uint8_t systemParams_t::LoRaClass |
RW LoRaWAN device class: 0=Class A (default), 1=Class B, 2=Class C
Definition at line 301 of file mysensors_base.h.
| uint8_t systemParams_t::LoRaDataRate |
RW Fixed data rate when ADR is disabled (0=DR_0 slowest … 5=DR_5 fastest)
Definition at line 299 of file mysensors_base.h.
| uint8_t systemParams_t::LoRaPort |
RW LoRaWAN data uplink port (min 1, default 2, max 99; settings/config ports 100-110, ports ≥224 are reserved) MT 9.4.2026 - fixed ports
Definition at line 296 of file mysensors_base.h.
| uint8_t systemParams_t::LoRaRegion |
RW LoRaWAN region index (default 5 = EU868; range 0–9)
Definition at line 302 of file mysensors_base.h.
| uint8_t systemParams_t::LoRaRepeatTryConnect |
RW Number of join retries after duty-cycle back-off (default 2, max 32)
Definition at line 297 of file mysensors_base.h.
| uint8_t systemParams_t::LoRaTxPower |
RW TX power index (0=max power … 7=min power, default 0)
Definition at line 300 of file mysensors_base.h.
| uint16_t systemParams_t::MemsCurrentCountSensorData |
RO Number of sensor records currently stored in the queue/flash
Definition at line 292 of file mysensors_base.h.
| uint16_t systemParams_t::MemsMaxSensorData |
RO Maximum number of sensor records the flash circular queue can hold
Definition at line 291 of file mysensors_base.h.
| uint8_t systemParams_t::MemsStoreSensorData |
RW 1 – store readings in external flash; 0 – transmit only (default 1)
Definition at line 290 of file mysensors_base.h.
| uint8_t systemParams_t::MqttConfirm |
RW MQTT confirmation of data written to server database, default 0
Definition at line 321 of file mysensors_base.h.
| uint64_t systemParams_t::MqttTime |
Linux time of uint64 - UTC set from NFC and time when MCU goes to OFF state
Definition at line 322 of file mysensors_base.h.
| uint16_t systemParams_t::SensAltitude |
RW Elevation above sea level in metres used for sea-level pressure correction
Definition at line 282 of file mysensors_base.h.
| uint8_t systemParams_t::SensExistSensors |
RO Bitmask of sensors compiled available - existing sensors (see systemParams_Sensors_t)
Definition at line 285 of file mysensors_base.h.
| uint8_t systemParams_t::SensPollSensors |
RW Bitmask of sensors to poll (see systemParams_Sensors_t); default 0x1F (all)
Definition at line 284 of file mysensors_base.h.
| uint8_t systemParams_t::SensSendInOnePacket |
RW 1 – pack all sensor values into one uplink; 0 – send separately (default 0)
Definition at line 283 of file mysensors_base.h.
| uint32_t systemParams_t::SensTimeoutMeasure |
RW Sensor measurement interval in ms (min 30 s, default 10 min, max 18 h)
Definition at line 281 of file mysensors_base.h.
| char systemParams_t::Sign[5] |
RO Magic signature "MTTV" – used to detect uninitialized memory
Definition at line 276 of file mysensors_base.h.