Knowledge Base
HOME » KNOWLEDGE BASE » FORUM

Last 4 bytes of metadata = ?

The LoRa Gateway driver will "pull" an extra 16 bytes of data from the SX1301 when a packet is received. For example, if the packet length = 16 bytes, then the driver reads 32 bytes. The first 16 bytes are the PHYPayload.

The driver then interprets the 12 bytes following the PHYPayload as:
- IF chain [1 byte]
- spread factor/coding rate [1 byte]
- SNR [1 byte]
- Min SNR [1 byte]
- Max SNR [1 byte]
- RSSI [1 byte]
- timestamp [4 bytes - big endian format]
- CRC [2 bytes, big endian format]

This leaves 4 bytes downloaded/pulled but not examined. What do these 4 bytes contain?
Avatar
Hi, you are correct for the first 12 bytes.
The other 4 are internal debug values that you do not need
Stupid question, how is the CRC computed? What's the algorithm, input data, and seed?
Avatar
Hi,

It is a CRC16, polynoms are not public.