What is inside this frame?
The sensor sent “0B490B0500010501” and the platform shows… nothing. Before blaming the network, read the frame yourself: paste the bytes, pick the sensor, and every value appears with the byte it comes from. Ready? Let’s go!
A quick reminder before we start
A decoded LoRaWAN frame is a sequence of bytes, and every sensor arranges them its own way: two bytes for the battery voltage in millivolts, two for the distance in millimetres, one for a flag… A codec is nothing more than that layout table. Here we describe it in one line: bat:u16@0/1000#V means “the field bat is a 16-bit unsigned integer starting at byte 0, divided by 1,000, in volts”.
Bytes
Decoded values
| Field | Value | Unit | Bytes |
|---|---|---|---|
| Paste a frame to start. | |||
Known limits of this codec
The trap
The same sensor sends several layouts depending on the port (FPort): the measurement frame on port 2, the device status on port 5, the datalog on port 3. Decoding a status frame with the measurement codec gives plausible… and wrong values. Always check the port before blaming the sensor.
The right setting
When a value is absurd (a temperature of 3,276.7 °C, say), it is almost always a sentinel: 0x7FFF for “no probe”, 0x0000 for “sensor missing”. The manufacturer documents them in the manual; each codec’s limits are recalled under the result.
In short
- A frame = bytes; a codec = the table that says where each value is.
- Check the FPort before decoding: a sensor has several layouts.
- Absurd value = sentinel, not a failure.
- The one-line layout can be pasted as is into an Awaro gateway.
Your sensor is not in the list? Describe its layout in one line and send it to us: it will join the database.
Codecs and grammar: open database lorawan2mqtt/codecs (format importable into the Awaro gateway).
Missing a tool?
Tell us what you are trying to do: if we already have it on the bench, we will put it online.