meshtastic/docs/configuration/module/store-and-forward-module.mdx

196 lines
6.6 KiB
Plaintext
Raw Normal View History

2023-03-28 10:04:56 -07:00
---
id: store-and-forward-module
title: Store & Forward Module Settings
sidebar_label: Store & Forward
2023-03-28 10:04:56 -07:00
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
## Overview
Using this module, a client device can ask a special Store & Forward Router to resend text messages after the client has been temporarily not in LoRa range of the mesh.
:::info
Only ESP32 based devices with onboard PSRAM like the T-Beam and T3S3 can be a Store & Forward Router. Requires the device to use at least firmware version 2.2.23 and to be set as a `ROUTER` or `ROUTER_CLIENT`.
2023-03-28 10:04:56 -07:00
:::
When a client device requests the history from the Store & Forward Router, the router will resend the text messages over LoRa that it has received. The router will only return messages that are within the time window the client has requested up to the maximum number of messages configured for the router.
The router does not know which messages the client device actually missed, so it is possible that you receive duplicates.
2023-03-28 10:04:56 -07:00
:::important
Be mindful when requesting the history, as the router might send a lot of messages which will burden your mesh for a short period of time.
:::
2023-03-28 10:04:56 -07:00
2023-06-18 22:43:10 -07:00
## Details
2023-03-28 10:04:56 -07:00
2023-06-18 22:43:10 -07:00
### How it works
2023-03-28 10:04:56 -07:00
![Store & Forward - Overview](/img/modules/store_and_forward/store_and_forward-overview.webp)
2023-03-28 10:04:56 -07:00
2023-06-18 22:43:10 -07:00
### Requirements
2023-06-18 06:29:46 -07:00
Initial requirements for the Store and Forward Router:
2023-06-18 06:29:46 -07:00
- Must be installed on a `ROUTER` or `ROUTER_CLIENT` node.
2023-06-18 22:43:10 -07:00
- This is an artificial limitation, but is in place to enforce best practices.
- Router nodes are intended to be always online. If this module misses any messages, the reliability of the stored messages will be reduced.
- ESP32 Processor based device with onboard PSRAM (T-Beam > v1.0, T3S3, and maybe others).
2023-06-18 06:29:46 -07:00
2023-06-18 22:43:10 -07:00
### Usage Overview
- To use / test this you will want at least 3 devices
- One ESP32 device with PSRAM configured as `ROUTER` or `ROUTER_CLIENT`.
- Two others will be regular clients. If one client sends a text message when the other is not in range, the other can request the history from the router to receive the missed message when it is back in range.
2023-06-18 22:43:10 -07:00
### Router setup
- Configure your device as a `ROUTER` or `ROUTER_CLIENT`.
2023-06-18 22:43:10 -07:00
- Name your router node something that makes it easily identifiable, aka "Router".
- Configure the Store and Forward module
```shell title="Required - Enable the module"
meshtastic --set store_forward.enabled true
```
```shell title="Optional - Disable sending heartbeat."
meshtastic --set store_forward.heartbeat false
2023-06-18 22:43:10 -07:00
```
:::tip
Best to disable the heartbeat (which is sent every 15 minutes) when all client devices have identified the router to reduce network traffic.
2023-06-18 22:43:10 -07:00
:::
### Client Usage
Currently implemented in the Android and Apple apps version 2.2.23 and higher. To request the history from the Store & Forward Router, for Android it is required to send it a direct message containing the text "SF" (without quotes). The router will then respond with the requested messages.
The Apple apps will also show whether a node is a Store & Forward Router in the node list after it heard the heartbeat. You can then long press the node and select "Client History" to request the history from the router.
2023-06-18 22:43:10 -07:00
## Settings
2023-06-18 06:29:46 -07:00
### Enabled
Enables the module.
### Heartbeat
The Store & Forward Router sends a periodic message onto the network. This allows connected devices to know that a router is in range and listening to received messages. A client like Android, iOS, or Web can (if supported) indicate to the user whether a store and forward router is available.
### History Return Max
Sets the maximum number of messages to return to a client device when it requests the history.
2023-06-18 06:29:46 -07:00
### History Return Window
Limits the time period (in minutes) a client device can request.
2023-06-18 22:43:10 -07:00
2023-06-18 06:29:46 -07:00
### Records
Set this to the maximum number of records the router will save. Best to leave this at the default (`0`) where the module will use 2/3 of your device's available PSRAM. This is about 11,000 records.
2023-06-18 06:29:46 -07:00
2024-03-07 12:50:52 -08:00
## Store & Forward Module Config Client Availability
2023-06-18 22:43:10 -07:00
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
{label: 'CLI', value: 'cli'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">
2024-02-22 13:09:26 -08:00
#### Android
2023-06-18 22:43:10 -07:00
:::info
Store and Forward Config options are available for Android.
1. Open the Meshtastic App
2. Navigate to: **Vertical Ellipsis (3 dots top right) > Radio Configuration > Store & Forward**
:::
2023-06-18 06:29:46 -07:00
</TabItem>
<TabItem value="apple">
2024-02-22 13:09:26 -08:00
#### Apple
2023-06-18 06:29:46 -07:00
:::info
All Store & Forward module config options are available on iOS, iPadOS and macOS at Settings > Module Configuration > Store & Forward.
2023-06-18 06:29:46 -07:00
:::
</TabItem>
2023-03-28 10:04:56 -07:00
<TabItem value="cli">
2024-02-22 13:09:26 -08:00
#### CLI
2023-06-18 22:43:10 -07:00
| Setting | Acceptable Values | Default |
| :---------------------------------: | :---------------: | :-----: |
| store_forward.enabled | `true`, `false` | `false` |
| store_forward.heartbeat | `true`, `false` | `false` |
| store_forward.history_return_max | `integer` | `0` (25 messages) |
| store_forward.history_return_window | `integer` | `0` (240 minutes) |
| store_forward.records | `integer` | `0` (≈11,000 records) |
2023-06-17 21:13:24 -07:00
2023-06-18 22:43:10 -07:00
:::tip
Because the device will reboot after each command is sent via CLI, it is recommended when setting multiple values in a config section that commands be chained together as one.
```shell title="Example:"
meshtastic --set store_forward.enabled true --set store_forward.history_return_max 0
```
:::
2024-02-22 13:09:26 -08:00
##### Examples of CLI Usage
2023-06-17 21:13:24 -07:00
2023-03-28 10:04:56 -07:00
```shell title="Enable the module"
meshtastic --set store_forward.enabled true
```
```shell title="Disable the module"
meshtastic --set store_forward.enabled false
```
```shell title="Set store_forward.heartbeat to default"
meshtastic --set store_forward.heartbeat 0
```
```shell title="Set store_forward.history_return_max to default (25 messages)"
2023-03-28 10:04:56 -07:00
meshtastic --set store_forward.history_return_max 0
```
```shell title="Set store_forward.history_return_max to 100 messages"
meshtastic --set store_forward.history_return_max 100
```
```shell title="Set store_forward.history_return_window to default (240 minutes)"
2023-03-28 10:04:56 -07:00
meshtastic --set store_forward.history_return_window 0
```
```shell title="Set store_forward.history_return_window to 1 day (1440 minutes)"
meshtastic --set store_forward.history_return_window 1440
```
2023-06-17 21:13:24 -07:00
```shell title="Set store_forward.records to default (≈11,000 records)"
meshtastic --set store_forward.records 0
```
```shell title="Set store_forward.records to 100 records"
meshtastic --set store_forward.records 100
```
</TabItem>
2023-03-28 10:04:56 -07:00
2023-06-17 21:13:24 -07:00
<TabItem value="web">
2023-03-28 10:04:56 -07:00
2024-02-22 13:09:26 -08:00
#### Web
2023-03-28 10:04:56 -07:00
:::info
2023-06-18 22:43:10 -07:00
Store and Forward configuration is not currently available via the web client.
2023-03-28 10:04:56 -07:00
:::
2023-06-17 21:13:24 -07:00
</TabItem>
2023-03-28 10:04:56 -07:00
</Tabs>