This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:wiki3:faq_message_buffering [2020/10/07 16:57] tda |
wiki:wiki3:faq_message_buffering [2020/12/21 17:56] tda |
||
---|---|---|---|
Line 5: | Line 5: | ||
To activate message buffering, issue the following command: | To activate message buffering, issue the following command: | ||
- | <code>/usr/bin/lorafwdctl database.enable true</code> | + | <code>lorafwdctl database.enable true</code> |
You can verify that the feature is enabled by reading the database.enable variable in the configuration file specified in ''/etc/default/lorafwd'' | You can verify that the feature is enabled by reading the database.enable variable in the configuration file specified in ''/etc/default/lorafwd'' | ||
+ | |||
+ | * For FW < 4.3.3 : | ||
<code> | <code> | ||
Line 21: | Line 24: | ||
root@klk-lpbs-050792:/etc/default # grep -i -A10 "\[ database \]" /user/etc/lorafwd/lorafwd.toml | root@klk-lpbs-050792:/etc/default # grep -i -A10 "\[ database \]" /user/etc/lorafwd/lorafwd.toml | ||
+ | [ database ] | ||
+ | |||
+ | # Whether or not a persistent database will store the incoming messages until | ||
+ | # they will be sent and acknowledged. | ||
+ | # | ||
+ | # Type: boolean | ||
+ | # Example: true | ||
+ | # Default: false | ||
+ | # | ||
+ | enable = true | ||
+ | |||
+ | </code> | ||
+ | |||
+ | * For FW >= 4.3.3 : | ||
+ | |||
+ | <code> | ||
+ | |||
+ | root@klk-lpbs-050792:~ # cat /etc/default/lorafwd | ||
+ | # Configuration file for lorafwd. | ||
+ | |||
+ | # The configuration file. | ||
+ | # The configuration files can be found in: /etc/lorafwd | ||
+ | CONFIGURATION_FILE="/etc/lorafwd/lorafwd.toml" | ||
+ | |||
+ | # The extra arguments. | ||
+ | EXTRA_ARGS="-v" | ||
+ | |||
+ | root@klk-lpbs-050792:/etc/default # grep -i -A10 "\[ database \]" /etc/lorafwd/lorafwd.toml | ||
[ database ] | [ database ] | ||
Line 34: | Line 65: | ||
</code> | </code> | ||
\\ | \\ | ||
+ | Then restart the packet forwarder: | ||
+ | <code> | ||
+ | monit stop lorafwd | ||
+ | monit stop lorad | ||
+ | monit start lorad | ||
+ | monit start lorafwd | ||
+ | </code> | ||
+ | |||
\\ | \\ | ||
===== How to deactivate the message buffering on my gateway? ===== | ===== How to deactivate the message buffering on my gateway? ===== | ||
Line 41: | Line 80: | ||
<code>lorafwdctl database.enable false</code> | <code>lorafwdctl database.enable false</code> | ||
You can verify that the feature is enabled by reading the database.enable variable in the configuration file specified in ''/etc/default/lorafwd'' | You can verify that the feature is enabled by reading the database.enable variable in the configuration file specified in ''/etc/default/lorafwd'' | ||
+ | |||
+ | * For FW < 4.3.3 : | ||
<code> | <code> | ||
Line 68: | Line 109: | ||
</code> | </code> | ||
+ | * For FW >= 4.3.3 : | ||
+ | |||
+ | <code> | ||
+ | |||
+ | root@klk-lpbs-050792:~ # cat /etc/default/lorafwd | ||
+ | # Configuration file for lorafwd. | ||
+ | |||
+ | # The configuration file. | ||
+ | # The configuration files can be found in: /etc/lorafwd | ||
+ | CONFIGURATION_FILE="/etc/lorafwd/lorafwd.toml" | ||
+ | |||
+ | # The extra arguments. | ||
+ | EXTRA_ARGS="-v" | ||
+ | |||
+ | root@klk-lpbs-050792:/etc/default # grep -i -A10 "\[ database \]" /etc/lorafwd/lorafwd.toml | ||
+ | [ database ] | ||
+ | |||
+ | # Whether or not a persistent database will store the incoming messages until | ||
+ | # they will be sent and acknowledged. | ||
+ | # | ||
+ | # Type: boolean | ||
+ | # Example: true | ||
+ | # Default: false | ||
+ | # | ||
+ | enable = false | ||
+ | |||
+ | </code> | ||
\\ | \\ | ||
+ | Then restart the packet forwarder: | ||
+ | <code> | ||
+ | monit stop lorafwd | ||
+ | monit stop lorad | ||
+ | monit start lorad | ||
+ | monit start lorafwd | ||
+ | </code> | ||
+ | |||
\\ | \\ | ||
===== How to configurate the number of messages in database ? ===== | ===== How to configurate the number of messages in database ? ===== | ||
Line 75: | Line 151: | ||
<note important> | <note important> | ||
The default value is 200 messages stored in the database. \\ | The default value is 200 messages stored in the database. \\ | ||
- | The maximum value is 1000 but **Kerlink does not recommend changing the default value of 200 to avoid system load issues**. | + | The maximum value is 1000 but **Kerlink does not recommend to change the default value of 200 to avoid system load issues**. |
</note> | </note> | ||
+ | |||
+ | * FW < 4.3.3: | ||
<code> | <code> | ||
root@klk-lpbs-050792:/etc/default # grep -i -A10 "\[ limit.messages \]" /user/etc/lorafwd/lorafwd.toml | root@klk-lpbs-050792:/etc/default # grep -i -A10 "\[ limit.messages \]" /user/etc/lorafwd/lorafwd.toml | ||
+ | </code> | ||
+ | |||
+ | * FW >= 4.3.3: | ||
+ | |||
+ | <code> | ||
+ | root@klk-lpbs-050792:/etc/default # grep -i -A10 "\[ limit.messages \]" /etc/lorafwd/lorafwd.toml | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
# The maximum number of messages allowed to be stored in the database. When | # The maximum number of messages allowed to be stored in the database. When | ||
# full the newest message will replace the oldest one. | # full the newest message will replace the oldest one. | ||
Line 89: | Line 176: | ||
#limit.messages = 200 | #limit.messages = 200 | ||
</code> | </code> | ||
+ | |||
+ | Uncomment the variable limit.messages. Modify the value then restart the packet forwarder: | ||
+ | <code> | ||
+ | monit stop lorafwd | ||
+ | monit stop lorad | ||
+ | monit start lorad | ||
+ | monit start lorafwd | ||
+ | </code> | ||
+ | |||
+ |