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.