Merge branch 'master' into i18n

This commit is contained in:
Thomas Göttgens 2023-04-14 11:08:39 +02:00 committed by GitHub
commit 2551b44271
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 483 additions and 9743 deletions

View file

@ -187,6 +187,14 @@ meshtastic --ch-set psk simple15 --ch-index 0
meshtastic --ch-set psk 0x1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b --ch-index 0
```
```shell title="Set encryption to your own key on PRIMARY channel (Base64 encoded)"
meshtastic --ch-set psk base64:puavdd7vtYJh8NUVWgxbsoG2u9Sdqc54YvMLs+KNcMA= --ch-index 0
```
:::tip
Use this to copy and paste the `base64` encoded (single channel) key from the meshtastic --info command. Please dont use the omnibus (all channels) code here, it is not a valid key.
:::
```shell title="Disable encryption on PRIMARY channel"
meshtastic --ch-set psk none --ch-index 0
```

View file

@ -66,9 +66,19 @@ In most cases you should use zero here. Units are in dBm.
### Bandwidth
Bandwidth in MHz
Bandwidth in kHz
Certain bandwidth numbers are 'special' and will be converted by the device firmware to the appropriate floating point value: 31 -> 31.25MHz
Certain bandwidth numbers are 'special' and will be converted by the device firmware to the appropriate floating point value:
| Special Value | Interpreted as |
| :---: | :---: |
| 31 | 31.25kHz |
| 62 | 62.5kHz |
| 200 | 203.125kHz |
| 400 | 406.25kHz |
| 800 | 812.5kHz |
| 1600 | 1625.0kHz |
Please be aware that values < 62.5kHz may require a TCXO on some hardware devices.
### Spread Factor

View file

@ -7,6 +7,7 @@ sidebar_label: Power
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import calculateADC from "@site/src/utils/calculateADC";
The power config options are: Power Saving, Shutdown after losing power, ADC Multiplier Override Wait Bluetooth Interval, Mesh Super Deep Sleep Timeout, Super Deep Sleep Interval, Light Sleep Interval and Minimum Wake Interval. Power config uses an admin message sending a `Config.Power` protobuf.
@ -28,7 +29,59 @@ Ratio of voltage divider for battery pin e.g. 3.20 (R1=100k, R2=220k)
Overrides the ADC_MULTIPLIER defined in the firmware device variant file for battery voltage calculation.
Should be set to floating point value between 2 and 4
Should be set to floating point value between 2 and 6
#### Calibration Process ([Attribution](https://wiki.uniteng.com/en/meshtastic/nano-g1-explorer#calibration-process))
1. Install the rechargeable Li-Polymer battery.
2. Charge the battery until full. Indication of this state may vary depending on device. At this point, the battery voltage should be 4.2V +-1%.
3. Input the "Battery Charge Percent" displayed on the screen or in your connected app into the calculator below.
4. If "Battery Charge Percent" (e.g., B 3.82V 60%) is not displayed on the screen, it means that the default value of "Operative Adc Multiplier" is too high. Lower the "Operative Adc Multiplier" to a smaller number (it is recommended to decrease by 0.1) until the screen displays "Battery Charge Percent". Enter the current "Operative Adc Multiplier" in use into the "Operative Adc Multiplier" field in the calculator. Also, input the "Battery Charge Percent" displayed on the screen into the calculator.
5. Click the "Calculate" button to compute the "Calculated New Operative Adc Multiplier", and set it as the new "Operative Adc Multiplier" for the device.
:::tip ADC Calculator
<table>
<tr>
<td> Battery Charge Percent: </td>
<td>
<input type="text" id="batteryChargePercent" defaultValue="65" />
</td>
</tr>
<tr>
<td>Current Adc Multiplier: </td>
<td>
<input type="text" id="operativeAdcMultiplier" defaultValue="2" />
</td>
</tr>
<tr>
<td>Calculated New Operative Adc Multiplier: </td>
<td>
<input
type="text"
id="newOperativeAdcMultiplier"
value="2"
disabled="disabled"
/>
</td>
</tr>
<tr>
<td></td>
<td>
<button
className="button button--outline button--lg cta--button"
onClick={calculateADC}
>
Calculate
</button>
</td>
</tr>
</table>
:::
:::info
It's important to note that this calibration method only maps 4.2V to Battery Charge Percent 100%, and does not address the potential non-linearities of the ADC.
:::
### Wait Bluetooth Interval

View file

@ -0,0 +1,326 @@
---
id: store-and-forward-module
title: Store & Forward Module Settings
sidebar_label: Store & Forward
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::info
Currently only available for ESP32 based devices with external PSRAM. Requires the device to be set as a ROUTER or ROUTER_CLIENT.
**Don't enable Store & Forward Module on multiple nodes.**
:::
## Overview
:::caution
This is a work in progress and is partially available. Stability is not guaranteed.
:::
The Store & Forward Module is an implementation of a Store and Forward system to enable resilient messaging in the event that a client device is disconnected from the main network.
Because of the increased network traffic for this overhead, it's not advised to use this if you are duty cycle limited for your airtime usage (EU_868 and EU_433) nor is it advised to use this for presets using SF11 or SF12 (e.g. all of the LongRange and VeryLongRange presets).
## Settings
| Setting | Acceptable Values | Default |
| :---------------------------------: | :---------------: | :-----: |
| store_forward.enabled | `true`, `false` | `false` |
| store_forward.heartbeat | `true`, `false` | `false` |
| store_forward.history_return_max | `integer` | `0` |
| store_forward.history_return_window | `integer` | `0` |
| store_forward.records | `integer` | `0` |
### Enabled
Enables the module.
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
```shell title="Enable the module"
meshtastic --set store_forward.enabled true
```
```shell title="Disable the module"
meshtastic --set store_forward.enabled false
```
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
### 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.
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
```shell title="Set store_forward.heartbeat to default"
meshtastic --set store_forward.heartbeat 0
```
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
### History Return Max
Sets the maximum number of messages to return to a client device.
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
```shell title="Set store_forward.history_return_max to default"
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
```
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
### History Return Window
Limits the time period (in minutes) a client device can request.
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
```shell title="Set store_forward.history_return_window to default"
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
```
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
### Records
Set this to the maximum number of records to 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.
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
```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>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
## Details
### How it works
![Store & Forward - Overview](/img/modules/store_and_forward/store_and_forward-overview.png)
### Requirements
Initial Requirements:
- Must be installed on a ROUTER or ROUTER_CLIENT node.
- 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 external PSRAM. (tbeam > v1.0, T3S3, and maybe others)
### Usage Overview
- To use / test this you will want at least 3 devices
- One ESP32 device with PSRAM configured as a Meshtastic router.
- Two others will be regular clients. Nothing special required.
### Meshtastic channel configuration
Don't use this on the "LongRange" channel settings. You're welcome to try and report back, but those channels have a [low bitrate](/docs/overview/radio-settings#pre-defined).
Either use a custom channel configuration with at an at least 1kbit data rate or use a Medium or Short range preset.
### Router setup
:::warning
Don't enable the Store and Forward module on multiple nodes for now!
:::
- Configure your device as a router.
- 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 - Set maximum number of records to save to device"
meshtastic --set store_forward.records 100
```
:::tip
Best to leave `store_forward.records` at the default (`0`) where the module will use 2/3 of your device's available PSRAM. This is about 11,000 records.
:::
### Client Usage
Currently, no special configuration is required. To request your history sent to you, send the command into the message field "SF". That's it. This will eventually change to make it easier. At the moment, that message will be sent to everyone on the mesh but we'll (eventually) make it easier to use where there'll be a button (or maybe it'll be transparent) and the command isn't sent as a text message to the mesh.
Available Commands:
| Command | Definition |
| :-----: | :----------------------------------------------------: |
| SF | Send the last hour worth of messages I may have missed |
The Store and Forward module will only service one client at a time. If a second client requests messages while the S&F is busy, the S&F will send a private message to the second client that they will need to wait.

View file

@ -15,16 +15,16 @@ Meshtastic uses [PlatformIO](https://platformio.org), a development environment
```
3. Update the repository's [submodules](https://github.com/meshtastic/firmware/blob/master/.gitmodules)
```shell
git submodule update --init
cd firmware && git submodule update --init
```
## Build
1. Open the newly cloned folder in [Visual Studio Code](https://code.visualstudio.com).
1. Open the newly cloned folder in [Visual Studio Code](https://code.visualstudio.com). If you do this for the first time, this can take quite some while as PlatformIO will download all the necessary tooling and libraries. Also if platformio is not installed, VSCode will ask you to install it, probably requiring a restart of the program.
2. To select the device you you wish to build, open your [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette):
- Windows: `Ctrl + Shift + P`
- Mac: `command + Shift + P`
3. Enter: `platformio: Switch Project Environment` and select your target.
3. Enter: `PlatformIO: Pick Project Environment` and select your target.
4. To build the firmware, simply run `PlatformIO: Build` from your command palette.
5. Finally, flash the firmware to your device by running `PlatformIO: Upload`

View file

@ -126,7 +126,7 @@ Not recommended because of design issues! Support is being phased out. Use V3 in
## Resources
- Firmware file: `firmware-heltec-v3-X.X.X.xxxxxxx.bin`
- Purchase link: [AliExpress](https://www.aliexpress.com/item/1005004823000595.html)
- Purchase link: [AliExpress](https://www.aliexpress.com/item/1005004970848837.html)
</TabItem>
<TabItem value="Wireless Stick Lite V3">

View file

@ -49,7 +49,7 @@ This board is still in production but for various reasons not recommended for ne
## Resources
- Firmware file: `firmware-tlora-v1-X.X.X.xxxxxxx.bin`
- Purchase link: [AliExpress](https://www.aliexpress.com/item/32840238513.html)
- Purchase link: [AliExpress](https://www.aliexpress.com/item/32996759721.html)
- US Distributor - Purchase link: [Rokland](https://store.rokland.com/products/lilygo-ttgo-lora32-v1-0-wireless-module-esp32-lora-915mhz-oled-0-96-inch-display-wifi-bluetooth-esp-32-antenna-ch9102-q184?ref=8Bb2mUO5i-jKwt)
![LILYGO® TTGO Lora V1](/img/hardware/lora-v1.png)
@ -145,6 +145,12 @@ Early versions of some of these boards contained the wrong component in the LiPo
- Micro USB
- Antenna: SMA antenna connector
## Variations of identifying marks
- FCC ID: 2ASYE-T3-V1-6-1
- "T3_v1.6.1 20210104" on the board
- "Model T3 V1.6.1" on the FCC sticker
## Features
- Built in 0.96 inch OLED display

View file

@ -7,11 +7,19 @@ sidebar_position: 3
## Functionality
- **Reset Button (right)**
- _**Single press**_ resets the device.
- **Power Button (left)**
- _**Long press**_ powers the device off or turns it back on again.
- **Program button (middle)**
- _**Single press**_ changes the page of information displayed on the screen.
- _**Long press**_ adjusts the contrast of the screen.
- _**Triple press**_ sends a broadcast message of the device position.
- **Power Button (left):**
- **Long press:** Powers the device on or off.
- **Reset Button (right):**
- **Single press:** Resets the device.
- **Program button (middle):**
- **Long press:** Will signal the device to shutdown after 5 seconds.
- **Single press:** Changes the information page displayed on the device's screen.
- **Double press:** Sends an adhoc ping of the device's position to the network.
- **Triple press:** Disables the device's GPS. Repeat to re-enable. (_This will be indicated on both information screen pages on the device's display as shown below_)
<img src="/img/hardware/GPS-disabled.jpg" width="200" align="center-left" />
<img
src="/img/hardware/GPS-disabled-by-button.jpg"
width="200"
align="center-right"
/>

View file

@ -118,7 +118,7 @@ This is an earlier version of the T-Beam board. Due to changes in the design thi
## Resources
- Firmware file: `firmware-tbeam-X.X.X.xxxxxxx.bin`
- Purchase link: [AliExpress](https://www.aliexpress.com/item/33047631119.html)
- Purchase link: [AliExpress](https://www.aliexpress.com/item/32889583204.html)
- US Distributor - Purchase link: [Rokland](https://store.rokland.com/products/lilygo-ttgo-t-beam-v1-1-ipex-esp32-lora-915mhz-wifi-wireless-bluetooth-module-gps-neo-m8n-ipex-18650-battery-holder-q107?ref=8Bb2mUO5i-jKwt)
![TTGO T-Beam M8N](/img/hardware/t-beam-m8n.png)

View file

@ -7,14 +7,14 @@ sidebar_position: 3
## Functionality
- **Capacitive Touch Button (Top)**
- _**Short press**_ updates the e-ink display
- **Reset Button (Button 1)**
- _**Single press**_ resets the device.
- _**Double press**_ puts the device into bootloader mode ready to receive new firmware.
- **Program/Power Button (Button 2)**
- _**Single press**_ changes the page displayed on the device.
- _**Double press**_ turns the screen backlight on/off
- _**Long press**_ signals the device to shutdown.
- **Capacitive Touch Button (Top):**
- **Short press:** Updates the e-ink display.
- **Reset Button (Button 1):**
- **Single press:** Resets the device.
- **Double press:** Puts the device into bootloader mode which allows you to update the firmware.
- **Program/Power Button (Button 2):**
- **Single press:** Changes the information page displayed on the device's screen.
- **Double press:** Turns the screen backlight on/off and sends an adhoc ping of the device's position to the network.
- **Long press:** Signals the device to shutdown after 5 seconds.
![TechoButtons](/img/hardware/t-echo-lilygo.jpg)

View file

@ -13,41 +13,41 @@
"crowdin": "crowdin"
},
"dependencies": {
"@algolia/client-search": "^4.14.3",
"@crowdin/cli": "3",
"@docusaurus/core": "2.3.1",
"@docusaurus/plugin-content-docs": "2.3.1",
"@docusaurus/preset-classic": "2.3.1",
"@docusaurus/theme-mermaid": "^2.3.1",
"@headlessui/react": "^1.7.7",
"@heroicons/react": "^2.0.13",
"@algolia/client-search": "^4.16.0",
"@docusaurus/core": "2.4.0",
"@docusaurus/plugin-content-docs": "2.4.0",
"@docusaurus/preset-classic": "2.4.0",
"@docusaurus/theme-mermaid": "^2.4.0",
"@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.17",
"@mdx-js/react": "^1.6.22",
"@meshtastic/meshtasticjs": "2.0.13-0",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"@typescript-eslint/parser": "^5.48.2",
"autoprefixer": "^10.4.13",
"@meshtastic/meshtasticjs": "2.1.6-0",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"autoprefixer": "^10.4.14",
"base64-js": "^1.5.1",
"dotenv": "^16.0.3",
"eslint": "^8.32.0",
"eslint": "^8.37.0",
"framer-motion": "^6.5.1",
"postcss": "^8.4.21",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.7.1",
"react-icons": "^4.8.0",
"react-responsive-carousel": "^3.2.23",
"swr": "^2.0.0",
"tailwindcss": "^3.2.4",
"swr": "^2.1.1",
"tailwindcss": "^3.3.1",
"url-search-params-polyfill": "^8.1.1",
"use-breakpoint": "^3.0.6"
"use-breakpoint": "^3.0.7"
},
"devDependencies": {
"@docusaurus/eslint-plugin": "^2.3.1",
"@docusaurus/module-type-aliases": "2.3.1",
"@docusaurus/eslint-plugin": "^2.4.0",
"@docusaurus/module-type-aliases": "2.4.0",
"@tailwindcss/typography": "^0.5.9",
"@tsconfig/docusaurus": "^1.0.6",
"@types/node": "^18.11.18",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"typescript": "^4.9.4"
"@tsconfig/docusaurus": "^1.0.7",
"@types/node": "^18.15.11",
"@types/react": "^18.0.31",
"@types/react-dom": "^18.0.11",
"typescript": "^5.0.3"
}
}

File diff suppressed because it is too large Load diff

23
src/utils/calculateADC.ts Normal file
View file

@ -0,0 +1,23 @@
export default function calculateADC() {
//const variables
const BAT_MILLIVOLTS_FULL = 4.2;
const BAT_MILLIVOLTS_EMPTY = 3.27;
const BAT_FULL_PERCENT = 1;
//variable
const batteryChargePercent =
parseFloat(
(<HTMLInputElement>document.getElementById("batteryChargePercent")).value
) / 100;
const operativeAdcMultiplier = parseFloat(
(<HTMLInputElement>document.getElementById("operativeAdcMultiplier")).value
);
const result =
(operativeAdcMultiplier *
((BAT_FULL_PERCENT - 1) * BAT_MILLIVOLTS_EMPTY -
BAT_FULL_PERCENT * BAT_MILLIVOLTS_FULL)) /
((batteryChargePercent - 1) * BAT_MILLIVOLTS_EMPTY -
batteryChargePercent * BAT_MILLIVOLTS_FULL);
(<HTMLInputElement>(
document.getElementById("newOperativeAdcMultiplier")
)).value = result.toFixed(4);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 79 KiB