From LMIC-V3.3.0.pdf
:
2.5.9 void LMIC_setLinkCheckMode (bit_t enabled)
Enable/disable link check validation.Link check mode is enabled by default and is used to periodically verify network connectivity. Must be called only if a session is established.
This is all documentation about link check and LMIC_setLinkCheckMode but it does not provide any useful information.
Questions
-
Why is link check mode enabled by default?
-
When is a link check performed?
-
What does periodically mean here?
-
What happens if no
LinkCheckAns
response is received?
Is this where EV_LINK_DEAD and EV_LINK_ALIVE come into play? -
What happens with the
Margin
andGwCnt
values returned by MAC responseLinkCheckAns
? -
Is it possible for user code to:
- initiate a link check?
- check if a
LinkCheckAns
response was received or not? - read the
Margin
andGwCnt
values returned in theLinkCheckAns
response?
-
If yes, how?
-
If not, then what is the practical use of link checks?
-
(Almost) all examples included with the MCCI LMIC library disable link check mode (
LMIC_setLinkCheckMode(0)
). Why?
LMIC_setLinkCheckMode ā¦ Must be called only if a session is established.
-
Why must LMIC_setLinkCheckMode be called only if a session is established?
-
To my understanding āenabling link check modeā only enables use of link checks but does not instantly perform a link check by itself. I expect that the library code which sends the actual
LinkCheckReq
MAC command(s) is smart enough to know whether a session is established or not (OTAA is used and is joined or ABP is used) and therefore it should not matter if a session is established or not whenLMIC_setLinkCheckMode()
is called.
Is this correct? -
In several OTAA examples
LMIC_setLinkCheckMode(0)
is called from withinsetup()
when a session has not yet been established. That would confirm my assumption above.
Is that correct? -
In several OTAA examples
LMIC_setLinkCheckMode(0)
is called in response to theEV_JOINED
event (see below). Why is link check mode disabled after a join has completed? Do I understand correctly from the comment that link check validation is always automatically enabled during join?
case EV_JOINED:
...
// Disable link check validation (automatically enabled
// during join, but because slow data rates change max TX
// size, we don't use it in this example.
LMIC_setLinkCheckMode(0);
break;
-
In several OTAA examples
LMIC_setLinkCheckMode(0)
is called both insetup()
and in response to theEV_JOINED
event. Why? To initially disable it and disable it again after a join has automatically enabled it again? -
If latter is true wouldnāt it be better to enhance the join process to save link check mode state at the start of the join process and restore the initial link check mode state at the end of the join process (assuming that link check mode is required during the join process)?