The Received Signal Strength Indicator (RSSI) model collects information about the strength of the signal between different mesh devices and sends this data to a centralized point of the mesh network for further analysis. Use this model to simplify the process of monitoring the overall signal quality in a mesh network, for example a ligthing network in a office building, where the installer could utilize this model to ensure that the coverage of the network is sufficient.
Table of contents
The model is centered around the server. The server continuously takes samples with the RSSI data from the messages that arrive at the server’s mesh device. At a set interval, the server forwards a processed version of the data to the client. Each message received by the client is acknowledged with a reply to the server. The server expects this acknowledgement before it wipes the outgoing data buffer. If the message transaction is not successful within 30 seconds, the server will still wipe this data. While there is an ongoing data transfer between the client and the server, the raw data buffer will be wiped, and it will start accumulating any new samples that are added. This means that the server can collect data while you are waiting for a data transfer to complete.
The following figure shows an example network with four devices at the exact moment when an interval has expired and a the RSSI data message has been sent from the sever to the client.
In this figure, the node 0x0001 is an implementation of the client model and the node 0x0002 is an implementation of the server model. The RSSI message contains all the collected data from the last interval, and the server has registered two links, one from the node 0x0003 and one from the node 0x0004.
See the following figure for the message flow of the mesh network from Figure 1 during a time interval.
The RSSI model consists of two models:
The RSSI model does not generate its own data. It uses (leeches) metadata generated by messages passing from other model operations.
The server model sends the collected data to the client at a set time interval. All messages sent from the server are acknowledged by the client upon arrival. The time interval can be configured with the Configuration Model to suit the specific application.
The number of entries in one message depends on the number of unique links that has been registered since the last time a message was sent. By default, the server model raw database buffer can contain up to 20 unique link entries. This value can be altered by defining RSSI_DATA_BUFFER_SIZE with the desired maximal value in the preprocessor. When this buffer is full, the server model ignores attempts to add new entries until the current entries are sent and the buffer is wiped.
The maximal number of entries in a single on-air message is also equal to RSSI_DATA_BUFFER_SIZE. For this reason, use a value that will not allow a exessive amount of messages to go on air at the same time, since this will affect the on-air capacity.
Before implementing the model, take note of the following requirements:
To implement the RSSI client model on a device:
rssi_client_init()
from the model API.access_model_application_bind()
and access_model_publish_application_set()
API functions.To implement the RSSI server model on a device:
rssi_server_init()
from the model API.access_model_application_bind()
and access_model_publish_application_set()
API functions.access_model_subscription_add()
API function (see the requirements mentioned above).access_model_publish_period_set()
API function.The RSSI model uses the following types of messages:
This message contains the data collected by the servers. The data is stored in an array that by default can contain up to 20 entries, depending on how many links the server has registered.
See the following table for the entry structure breakdown.
Member name | Type | Description |
---|---|---|
src_addr | uint16_t | Element address of the device that is the source of this link. |
mean_rssi | uint8_t | Average RSSI value of the link in the previous time interval. |
msg_count | uint8_t | Number of samples received on this link in the previous time interval. |
This message acknowledges that the server data has arrived to the client.
Member name | Type | Description |
---|---|---|
- | - | This message is empty. |
Message name | Opcode | Direction |
---|---|---|
Send RSSI data | 0x8039 | Server -> Client |
Reply status | 0x8038 | Client -> Server |