Guide for reading and writing settings over LoRaWAN downlink after the device is deployed. First-time setup (ports, calibration, join credentials) is done with Harvestree Toolbox over USB — see Configuration.
Encoding conventions
| Item | Rule |
|---|---|
| Parameter ID in GET/SET | uint16, big-endian (e.g. 0x0002 → bytes 00 02) |
| Parameter value | Little-endian for uint16, uint32, and float32 (least significant byte first) |
| SET_PARAM block | [PARAM_ID:2][LEN:1][VALUE:LEN] repeated; LEN must match the size in the tables below |
| Batch size | Up to 6 parameters per GET_PARAM or SET_PARAM command |
Value examples (parameter ID is always big-endian; value bytes are little-endian):
| Type | Logical value | Hex value | Bytes in SET_PARAM (LEN + value) |
|---|---|---|---|
uint32 |
Measurement period 1000 s (0x0002) |
0x000003E8 |
04 E8 03 00 00 |
uint16 |
Voltage limit 3600 mV (0x0004) |
0x0E10 |
02 10 0E |
float32 |
Low threshold 25.0 (0x0221, °C) |
IEEE-754 0x41C80000 |
04 00 00 C8 41 |
Full SET_PARAM fragment for period 1000 s only: 00 02 04 E8 03 00 00 (ID 0x0002, length 4, value LE).
Transport and commands
| Item | Value |
|---|---|
| Downlink port | FPort 4 — [CMD:1][PAYLOAD…] |
| Acknowledgment uplink | FPort 2 — [CMD:1][STATUS:1][DATA…] |
| Read parameters | GET_PARAM 0x10 — payload [COUNT:1]{[PARAM_ID:2]}×COUNT |
| Write parameters | SET_PARAM 0x11 — payload [COUNT:1]{[PARAM_ID:2][LEN:1][VALUE:LEN]}×COUNT |
| Success | STATUS 0xAA on FPort 2 |
Other commands on FPort 4 (optional):
| CMD | Name | Payload |
|---|---|---|
0x03 |
GET_VERSION | none |
0x06 |
GET_HW_VERSION | none |
RESET (0x04), FACTORY_RESET (0x05), and credential parameters are not covered here — use a defined maintenance procedure and Harvestree Toolbox where required.
SET_PARAM rules:
- Every downlink byte after
COUNTmust belong to a parameter block; no trailing bytes (otherwise STATUS0xBE, nothing saved). - All-or-nothing batch: if one parameter in the command is wrong (unknown ID, bad length, out-of-range value, or validation failure at commit), the entire SET is rejected — no parameter from that command is written; the previous configuration stays unchanged. Fix the error and send a new SET (the ACK may include the failing PARAM_ID, 2 bytes big-endian).
ACK format (FPort 2)
- Generic:
[CMD:1][STATUS:1][DATA…] - GET_PARAM success:
DATA = [COUNT:1]{[PARAM_ID:2][LEN:1][VALUE:LEN]}×COUNT - SET_PARAM success (
0xAA): usually noDATA— the full batch was saved - SET_PARAM failure: no
DATAor failing PARAM_ID inDATA(2 bytes, big-endian); none of the parameters in that SET were applied
Status codes
| Code | Meaning |
|---|---|
0xAA |
Success |
0xBB |
Invalid payload size |
0xBC |
Invalid value size |
0xBD |
Invalid batch count |
0xBE |
Invalid payload structure |
0xBF |
Invalid argument |
0xEE |
Unknown command |
0xEF |
Invalid parameter ID |
0xF0 |
Not ready |
0xF1 |
Busy |
0xF2 |
Not implemented |
0xF3 |
CRC error |
0xF4 |
Flash error |
0xF5 |
Validation / read-only / range error |
0xF6 |
Timeout |
0xF7 |
Read protected |
0xF8 |
Authentication failed |
Workflow
- Plan one logical change (for example one period or mode), not a full reconfiguration.
- Send SET_PARAM on FPort 4 (remember: one bad parameter rejects the whole batch).
- Read ACK on FPort 2 (
0xAA= entire batch saved). - Optionally GET_PARAM the same IDs to confirm stored values.
- Wait for the next measurement or alarm cycle and verify behaviour on air.
- Record who changed what and when.
flowchart TD
A[Plan change] --> B[SET_PARAM on FPort 4]
B --> C{ACK success?}
C -->|No| D[Read status / GET]
C -->|Yes| E[Optional GET verify]
E --> F[Verify uplink]
Examples
SET application mode Monitoring (0) and measurement period 1000 s (0x0003E8):
11 02 00 01 01 00 00 02 04 E8 03 00 00
GET mode and period:
10 02 00 01 00 02
Parameters (downlink)
Application
| ID | Size | Encoding | Description | Values / limits |
|---|---|---|---|---|
0x0000 |
4 | uint32 LE |
Configuration change counter | Read-only |
0x0001 |
1 | enum u8 |
Application mode | 0 Monitoring, 1 Alarm, 127 Idle, 255 Modbus slave |
0x0002 |
4 | uint32 LE |
Measurement period (s) | 20 … 604800 |
0x0003 |
4 | uint32 LE |
Keepalive period (s) | 3600 … 2592000 |
0x0004 |
2 | uint16 LE |
Minimum operating voltage (mV) | 3500 … 4000 |
0x0005 |
1 | enum u8 |
ILS mode | 0 off, 1 on |
LoRaWAN radio (over-the-air changes only)
Only the parameters below are intended for remote radio tuning. Region (0x0102), JoinEUI (0x0100), and AppKey (0x0101) must be set with Harvestree Toolbox at commissioning.
Warning — expert use: ADR, data rate, and rejoin settings can break the network link (no join, no usable uplinks, or loss of downlink access). If the device no longer reaches the network server, you may lose remote configuration until the device is recovered on site with Toolbox. Change one setting at a time and verify join and uplinks after each step.
| ID | Size | Encoding | Description | Values / limits |
|---|---|---|---|---|
0x0103 |
1 | enum u8 |
ADR | 0 off, 1 on |
0x0104 |
1 | enum u8 |
Data rate (DR) | Valid set depends on the commissioned region (see below; read 0x0102 with GET if needed) |
0x0105 |
1 | enum u8 |
Rejoin mode | 0 none, 1 on ACK, 2 forced |
0x0106 |
4 | uint32 LE |
Rejoin timer (s) | 3600 … 2592000 |
Data rate (0x0104) by commissioned region — stored value is the firmware DR index (DR0 = 0 … DR5 = 5):
| Region | Allowed DR values |
|---|---|
| EU868 | 0, 1, 2, 3, 4, 5 |
| US915 | 1, 2, 3 |
| AU915 | 3, 4, 5 |
| AS923 | 3, 4, 5 |
Alarm timing (Alarm mode)
| ID | Size | Encoding | Description | Values / limits |
|---|---|---|---|---|
0x0200 |
4 | uint32 LE |
Alarm check period (s) — cadence without active alarm | 20 … 604800 |
0x0201 |
4 | uint32 LE |
Alarm event period (s) — cadence while alarm active | 20 … 604800 |
0x0202 |
1 | bitfield u8 |
System alarm status flags | bit0 HVT, bit1 HEAT, bit2 MOVE (range 0 … 7) |
System alarm thresholds
Alarm type enum (1 byte): 0 none, 1 high, 2 low, 3 in range, 4 out of range. Thresholds use corrected values (same as telemetry). No hysteresis.
| ID | Size | Encoding | Description | Values / limits |
|---|---|---|---|---|
0x0210 |
1 | enum u8 |
Harvest voltage alarm type | Alarm type enum |
0x0211 |
4 | float32 LE |
Harvest voltage low threshold | 0.0 … 1000.0 |
0x0212 |
4 | float32 LE |
Harvest voltage high threshold | 0.0 … 1000.0 |
0x0220 |
1 | enum u8 |
Base temperature alarm type | Alarm type enum |
0x0221 |
4 | float32 LE |
Base temperature low (°C) | -40.0 … 200.0 |
0x0222 |
4 | float32 LE |
Base temperature high (°C) | -40.0 … 200.0 |
0x0230 |
4 | float32 LE |
Motion threshold (mg) | 0.0 … 15000.0 |
Port alarm thresholds
port_index = 0 … 3 (Port 1 … 4), var = 0 … 4 (measurement variable index).
| ID formula | Size | Encoding | Description |
|---|---|---|---|
0x0240 + port_index |
1 | bitfield u8 |
Port alarm enable flags (bits 0–4 per variable; bits 5–6 edge for async dry contact only) |
0x0250 + port_index×16 + var |
1 | enum u8 |
Alarm type for port / variable |
0x02C0 + port_index×16 + var×2 |
4 | float32 LE |
Low threshold |
0x02C1 + port_index×16 + var×2 |
4 | float32 LE |
High threshold |
Low/high thresholds: -1e8 … 1e8 (finite). Example — Port 2, variable 0 type: ID 0x0260.
Precautions
- Prefer GET after SET when verifying a change.
- In a multi-parameter SET, one error rejects the entire command — correct and resend; do not assume partial updates were saved.
- Apply one functional change at a time — not several unrelated settings in the same SET.
- Shorter periods increase energy use; for autonomy planning, contact MOIZ or your supplier.
- Radio parameters (ADR, DR, rejoin): for experts only — a bad value can drop the network link and remove remote access until Toolbox recovery on site.
- A DR value not allowed for the commissioned region is rejected at SET; a valid but unsuitable DR or ADR choice can still degrade or drop the radio link (fewer uplinks, no remote access).