The term Link Mode refers to the operation which Monnit sensors execute when attempting to connect (or reconnect) to a gateway. Sensors enter Link Mode when they first attempt to connect or after they lose connection to a gateway and attempt to seek a gateway and reconnect. This article will outline the details of this operation in Alta (Generation 2) and standard Commercial (Generation 1) sensors.
What triggers a sensor to enter Link Mode
There are two scenarios when sensors enter Link Mode:
- When a sensor is powered up
- When a sensor loses connection to a gateway with which the sensor was linked
Sensors will only link to a gateway with which the sensor has been authorized to communicate. This authorization comes in the form of a sensor being on a gateway’s Sensor List. Only sensor ID’s that are on the gateway’s Sensor List are authorized to communicate with that gateway. This generally takes the form of a sensor being added to the same gateway in the iMonnit Online portal. If a sensor is not on the gateway’s Sensor List, the gateway will not allow the link. For more information about a gateway’s Sensor List, see the relevant article.
The configuration in iMonnit relating to Link Mode is “Failed transmissions before link mode”. This configuration can be found in iMonnit Online under the Sensor Overview > Settings tab toward the bottom of the page. This configuration determines how many failed attempts a sensor will make before entering Link Mode and seeking out a link to another gateway. The default setting for this is 3.
What a sensor does when it loses connections
Once a sensor links to a gateway, it will transit data to the gateway on the sensor’s Heartbeat (for information on Heartbeats, see the following article: Understanding Sensor Heartbeat, Aware State, Assessments, and Rearm). On the sensor’s Heartbeat, the sensor will activate its radio and attempt to transmit data to the gateway. Once the gateway receives a transmission from a sensor, the gateway respond by transmitting an acknowledgement to the sensor. Once the sensor receives the acknowledgement, the Heartbeat is completed successfully.
If the sensor does not hear the acknowledgement from the gateway, the sensor considers the transmission unsuccessful. The sensor will then attempt to retransmit the reading to the existing preferred gateway. This is considered a “Retry”. Gen1 and Gen2 have different retry configurations, but both generations will attempt to Retry the transmission to the preferred gateway within seconds of the the failed attempt.
After multiple Retry attempts are unsuccessful, the sensor will enter Link Mode and attempt “Recovery”. Recovery attempts occur during a period in which the sensor will attempt to transmit only to the preferred gateway with which it was communicating previously. During Recovery, the sensor will not seek out a new gateway. The sensor will attempt to transmit to the existing gateway on its configured Heartbeat to the previously connected gateway the number of times in its Recovery configuration (the default value for this differs between Gen1 and Gen2 sensors). If the sensor was not successful during Recovery, it will be able to join with any gateway that has that sensor’s ID in its allowed device list.
Differences in Link Mode between Commercial (Gen1) and Alta (Gen2) sensors
There are important differences between Generation 1 and Alta sensors in terms of Link Mode behavior and default configurations. These differences are outlined below.
Link Mode with Alta (Generation 2) sensors
Default Link Mode configurations for Alta sensors are listed below:
Failed transmissions before link mode: 3
Retry Count: 6 (not configurable in iMonnit Online)
Recovery Count: 10 (not configurable in iMonnit Online)
Default scan interval: 1 hour (not configurable in iMonnit Online)
As described above, sensors transmit data to their gateways on Heartbeats. If the sensor does not hear the acknowledgement response from the gateway after transmitting on its Heartbeat, an Alta sensor will attempt 6 Retries (by default) .2 to 3 seconds apart. If it is unsuccessful in during one of the Retries, the sensor will enter Link Mode and increment the Recovery count. During the Recovery time, the sensor can only reconnect to the existing gateway. After an Alta sensor has incremented the Recovery count (10 by default), the sensor will enter Link Mode in which it can seek out a different gateway.
After a sensor enters Link Mode, it will scan for gateways at 0 seconds, 5 seconds, 15 seconds, 30 seconds, 1 minute, 2 minutes, 3 minutes, 5 minutes, 15 minutes, and then (default) 1 hour. If the sensor does not find a gateway with which it is authorized to communicate during the previous scans, the sensor will scan at the default interval (60 minutes) repeatedly until it relinks with a gateway or runs out of batteries.
Note: With the default Recovery Count set to 10, it would be at least 1 hour before the sensor could link to another gateway. This is because Recovery Counts 1-10 would occur at the 0 seconds (first Recovery attempt), 5 seconds (second Recovery attempt), 15 seconds (third Recovery attempt), 30 seconds (fourth Recovery attempt), 1 minute (fifth Recovery attempt), 2 minutes (sixth Recovery attempt), 3 minutes (seventh Recovery attempt), 5 minutes (eighth Recovery attempt), 15 minutes (ninth Recovery attempt), and 1 hour (tenth Recovery attempt). After these attempts, the sensor would scan for other gateways every 1 hour after the tenth Recovery attempt, and every 60 minutes thereafter.
Link Mode with Commercial (Generation 1) sensors
Default Link Mode configurations for Commercial sensors are listed below:
Failed transmissions before link mode: 2
Retry Count: 2 (not configurable in iMonnit Online)
Recovery Count: 2 (not configurable in iMonnit Online)
Default scan interval: 2 hours
Commercial (Gen1) sensors also offer Link Mode operation, but the execution of Link Mode differs compared to Alta. Commercial (Gen1) sensors do not offer a “cascading” scan wherein they scan for a gateway more frequently immediately after losing connection. Additionally, the default Retry and Recovery settings with Commercail (Gen1) sensors differ compared to Alta.
When the batteries are inserted into a Gen1 a sensor, the sensor tries all of the available channels to find a gateway. Commercial (Gen1) sensors start on the first channel and send a message, “I’m number 12345, can I talk to you?" If it doesn’t hear anything back it assumes there is not a gateway on that channel, and tries the next channel. After it has tried all of the channels and determines there is no available gateway, it stops sending messages for two hours.
Each scan-cycle takes about 30 seconds, but uses over a day’s worth of battery power. In other words, if it just continued to scan continually when the gateway wasn’t powered on, the battery would deplete very quickly. After two hours the sensor starts the scanning process over again beginning with the first channel.
Similar to power up, a Gen1 sensors enter Link Mode when they lose connection to their gateway. If the sensor was talking to a gateway on a specific channel but has multiple failed transmissions (2 Heartbeats, plus two additional retries for each missed Heartbeat for a total of six missed communications in a row), the sensor assumes the gateway it was communicating with is no-longer available and enters the same Link Mode.
Inserting batteries before the gateway is powered on
As a result of the differences in Link Mode behavior between Gen1 and Gen2 sensors, order of operations can affect setup differently between the two generations. There are two specific behaviors that differ between the two that might affect setup.
Join message transmission
As noted in the article Differences between Alta (Gen2) and Commercial (Gen1) Devices, when Alta (Gen2) sensors first Join gateways, they trigger a gateway Heartbeat immediately whereas Gen1 sensors do not. This means before you see the first sensor check in on power up, you will generally need to wait for a scheduled gateway Heartbeat with Gen1 sensors.
Powering the sensor prior to the gateway on initial setup
If an Alta sensor is powered on prior to the gateway being first powered on, you will see different behavior compared to Commercial (Gen1) sensors. Since Alta sensors function with a Link Mode in which they “cascade” more frequent Link attempts after power up, you will generally see Alta sensors active in the Monnit software earlier than you would see Commercial (Gen1) sensors.
This is important because if the battery is put in the Commercial (Gen1) sensor before the gateway is active and ready to listen for the sensor, the sensor will miss the gateway and not scan again for another two hours. Therefore if you powered a Commercial (Gen1) sensor on prior to powering on the gateway during setup, it may be 2 hours or more before the sensor shows as active in the Monnit software.
Link Mode is a critical operation of the Monnit platform. Because of the intricacies of Link Mode, this article can be very useful in explaining behavior you see, or diagnosing issues. If you have related inquiries, feel free to contact Monnit Support.