Persistence of a "join"
- This topic has 9 replies, 2 voices, and was last updated 8 years, 9 months ago by
Jason Reiss.
-
AuthorPosts
-
May 10, 2016 at 1:54 pm #12453
Michael
ParticipantIf an mDot remote successfully “Joins” to a gateway, how durable is that session? Specifically…
If the session is created with “ACK” required but the mDot stops getting the ACKs, will the mDot do something different: does it retry the packet (how may times) or perhaps tear down the sessions and try to rejoin, or..?
If the gateway stops hearing from an mDot node after some period, does something different happen (session drops, etc.)?
May 11, 2016 at 7:47 am #12455Jason Reiss
KeymasterSee AT+ACK, AT+LCT and AT+LCC
http://www.multitech.com/manuals/s000643_1_1.pdfThe network server has a lease time setting to configure the amount of time to keep a session without activity.
May 11, 2016 at 2:52 pm #12468Michael
ParticipantOK, thanks.
Is there some example code illustrating a recommended way for a remote to maintain network connectivity in light of the above?
May 11, 2016 at 3:05 pm #12469Jason Reiss
KeymasterPage 93 of the linked manual above shows an AT Command example.
An application would setLinkCheckThreshold and setLinkCheckCount then monitor the getNetworkJoinStatus between sends to detect when the network may be down.
The AT Command firmware code on mbed provides an example too.
In CommandTerminal.cpp
bool CommandTerminal::autoJoinCheck()May 12, 2016 at 11:17 am #12482Michael
ParticipantThanks Jason, that was quite informative.
However, going forward I’m not using AT commands – I’m using the mbed library (libmDot.h) So, let me see if I understand this…
If I join in automatic mode and ACKs “On” with`setJoinMode(mDot::AUTO_OTA);
setAck( 1 );`
and make no other changes, I’d expect the mDot to automatically attempt to “re-Join” after one missed ACK?And I can change the number of missed ACKs before the mDot attempts a re-Join with:
setLinkCheckCount()
Is that all correct?
Is there another setting I should be concerned with for this arrangement – that is AUTO, and ACKs ON?Thanks.
-MikeJune 1, 2016 at 2:43 pm #12838Michael
ParticipantBump
June 1, 2016 at 3:02 pm #12839Jason Reiss
Keymaster/** Set network link check count to perform automatic link checks every count packets * only applicable if ACKs are disabled * @param count must be between 0 - 255 * @returns MDOT_OK if success */ int32_t setLinkCheckCount(const uint8_t& count); /** Get network link check count * @returns count (0 - 255) */ uint8_t getLinkCheckCount(); /** Set network link check threshold, number of link check failures or missed acks to tolerate * before considering network connection lost * @pararm count must be between 0 - 255 * @returns MDOT_OK if success */ int32_t setLinkCheckThreshold(const uint8_t& count);
June 2, 2016 at 8:30 am #12849Michael
ParticipantExcellent! I was unable to track down those functions on my own, sadly.
(I guess the operative word for searching is “link” and not “join” 😉 )Thanks!
June 13, 2016 at 8:47 am #13021Michael
ParticipantI’d like some clarification here…
int32_t setLinkCheckCount(const uint8_t& count);
How does the application know the Link Check has been performed and failed? Will the response to the “send” fail just like it would fail in other cases or is this a special case?
June 13, 2016 at 8:56 am #13022Jason Reiss
KeymasterAn application would monitor the join status.
getNetworkJoinStatus()
This will be set to false if the threshold is met.
-
AuthorPosts
- You must be logged in to reply to this topic.