POLL messages and mac commands

I have a device that runs the Arduino LMIC libary and uses otaa. It all works quite well with chirpstack. But I do see some behaviour that I don’t fully understand. It may totally be correct, but I just don’t know. And I think it all relates to potential mac commands that are sent by chirpstack to the device. So I have some questions that I hope help me understand the MAC command process a little better.

First of all, after each UPLINK message from my device, chirpstack always sends a DOWNLINK message back. Is that correct? Even if I didn’t schedule one?

Secondly, sometimes a “POLL” message is triggered on the device. I don’t know exactly what triggers it, but basically the device is triggered to send an empty message (no payload) after it successfully sent an UPLINK message. This sometimes happens 2 or 3 times in a row, but definitely not always. I see in the arduino LMIC library source that it is triggered by “pending (piggyback?) mac data”, and if that’s present, it sends an empty message. But I don’t really know what the “pending mac data is” and why that causes and empty message to be sent.

Thirdly, what are the mac commands that chirpstack can send back to the devices? I assume they are in the header of the downlink messages? Which fields in the DOWNLINK messages (in the live lorawan frame viewer) contain those mac commands? I would like to understand them better so I know the device is obeying them correctly.

Sorry for the big question, but I need to figure out where to go from here to understand the LoraWAN protocol better.

To LoRa Alliance resource or search Google :slight_smile:
maybe it helps you too https://qrcline.com/lora-wan/packet-format

THanks for that. That helps understanding which fields I need to look at in the live packet viewer. But doesn’t help me understanding what these messages are and if they are required by the LoraWAN standard.

I asked a similar question over on the MCCI Ardiuno LMIC github and got very useful answers. So in case anyone comes across this question through google, this helped me a lot:

On page 22 of the second link, all MAC messages are described. The “POLL” messages are actually just MAC responses from the device to downlink MAC commands that the gateway sends to the device after an uplink message. In the “LORAWAN frames” tab for a device in chirpstack, you can see all the uplink and downlink messages, including the MAC commands/responses.

1 Like