Merge branch 'meshtastic:master' into master

This commit is contained in:
Jm Casler 2022-02-14 09:29:06 -08:00 committed by GitHub
commit c557fc049e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
204 changed files with 5899 additions and 1901 deletions

View file

@ -0,0 +1,20 @@
---
name: Documentation Change Request
about: Create a report about our documentation to help us improve
title: 'Documentation Change Request'
labels: ''
assignees: ''
---
Please - if you just have a question, post in our [forum](https://meshtastic.discourse.group/) instead. Please reserve this system for requesting changes to the Meshtastic documentation.
**Describe what section of the docs is outdated or otherwise in need of change**
Be as clear and concise as possible. Provide a URL or GitHub path to the doc you are referencing.
**Suggested Changes**
What specifically in that documentation area needs to be changed / removed / added?
If possible provide replacement text when requesting changes or new text to fill in missing documentation.
**Additional Notes**
Add any other context here.

View file

@ -27,7 +27,6 @@
</span>
<br />
<hr />
</div>
## What is Meshtastic?
@ -41,3 +40,32 @@ Meshtastic uses LoRa for the long range communications and depending on settings
Please see our [website](https://meshtastic.org) for more information about Meshtastic.
[![Powered by Vercel](https://raw.githubusercontent.com/abumalick/powered-by-vercel/master/powered-by-vercel.svg)](https://vercel.com?utm_source=meshtastic&utm_campaign=oss)
## Installation
nodejs is required in your dev. environment. The method for installing nodejs depends on your operating system. This software is built using [Docusaurus](https://docusaurus.io).
Fork then clone the repository:
```bash
git clone https://github.com/meshtastic/meshtastic
```
Go to the root directory of your repository and install dependencies:
```bash
yarn install
```
Build the project with the following command
```bash
yarn build
```
Start a local dev. instance with the following command
```bash
yarn start
```

View file

@ -0,0 +1,10 @@
---
id: docusaurus
title: Docusaurus
sidebar_label: Docusaurus
---
## Overview
Meshtastic's documentation is set up using [Docusaurus](https://docusaurus.io). It is highly encouraged to look at [their documentation](https://docusaurus.io/docs) when looking for a solution to a problem with our docs. They most likely have thought of the use case you've discovered.
## Known Issues
- Admonitions within a `TabItem` component need to be completely unindented to show up correctly.

View file

@ -0,0 +1,11 @@
---
id: github
title: GitHub
sidebar_label: GitHub
---
## Overview
All of Meshtastic's code and documentation is hosted on GitHub. If you would like to contribute to the project, having a GitHub account is an important step to doing so.
## Set up GitHub account
- Go to [github.com](https://github.com)
- Click `Sign Up`

View file

@ -0,0 +1,58 @@
---
id: overview
title: Overview
sidebar_label: Overview
slug: /about-documentation
---
Meshtastic documentation is an important ingredient to the overall project. We want users to hit the ground running with the information they need right at their finger tips. This section will discuss the documentation software stack, file organization, and style guides.
## Software Stack
All of our documentation resides on GitHub. Instructions for setting up your GitHub account are located [here](about-documentation/github).
Our documentation is powered by [Docusaurus](https://docusaurus.io) — a documentation platform built on React that utilizes markdown files. Because markdown files are easy to edit, most content changes should be fairly simple. Instructions for setting up your instance of Docusaurus are located [here](about-documentation/docusaurus).
Another component that we use is [Vercel](https://vercel.com) — a platform for frontend frameworks and static sites. Instructions for setting up your instance of Vercel are located [here](about-documentation/vercel).
## Documentation Organization
| Section | File Path | Description |
| :-----: | :-------: | :---------: |
| About Meshtastic | `docs/about` | High level explanation of of Meshtastic. |
| Meshtastic Software | `docs/software` | Current bulk of documentation running through each Meshtastic project. |
| Getting Started | `docs/getting-started` | Instructions on how to get the Meshtastic firmware onto a users device. |
| Device Settings | `docs/software/settings` | Details each user setting and provides explanations for what the setting does and how to configure the device using the various clients available (Android, CLI, iOS, Web) |
| Hardware Details | `docs/hardware` | Any hardware related content. Any time a user is attaching a peripheral accessory to their device. That includes 3d printed cases, antennas, buttons, chimes, rotary encoders, and screens. |
| Radio Mesh Details | `docs/mesh` | This section discusses everything relating to the Meshtastic mesh. Mesh health metrics will be discussed here as well as topics such as signal strength, range and anyting else pertaining to "over the air". |
| Contribute to Meshtastic | `docs/developers` | Details each of the projects and how they work together to give a developer an idea of how the Meshtastic ecosystem operates. |
| About the Documentation | `docs/about-documentation` | This section explains how our documentation is organized, how to make edits to the documentation, view a local copy of your fork of the project. Style guides and tips will also be included here. |
| Legal | `docs/legal` | Any legal information. Most changes here will be handled by developers actually working on the projects that require any legal disclosures. Examples include: the Meshtastic trademark, terms of service, and privacy policy. |
## Quick Start
Assuming you have the [prerequisites installed](about-documentation/serve-docs-locally#prerequisites), running a local instance of Docusaurus takes three steps:
1. Fork/Clone the [meshtastic/Meshtastic](https://github.com/meshtastic/Meshtastic) repository and navigate to the root directory of the project.
```bash title="Clone the project"
git clone https://github.com/meshtastic/Meshtastic.git
```
```bash title="Clone fork of the project"
git clone https://github.com/[username]/Meshtastic.git
```
```bash title="Change Directory"
cd ~/Meshtastic
```
2. Install Dependencies
```bash title="Install dependencies using Yarn"
yarn install
```
3. Run Docusaurus
```bash title="Run node.js server"
yarn start
```
:::tip
Before submitting a pull request, it's helpful to run the following command to ensure there are no broken links or errors:
```bash title="Build Project"
yarn build
```
:::

View file

@ -0,0 +1,51 @@
---
id: serve-docs-locally
title: Setting up Local Documentation
sidebar_label: Serve Docs Locally
---
:::note
Some things won't display properly like logos or protobufs, this is not cause for concern.
:::
## Prerequisites
In order to set up your local environment, you will need to install:
- [Node & Node package manager (NPM)](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- [Yarn package manager](https://yarnpkg.com/getting-started/install)
## Getting Started
### Fork the Meshtastic Repository
Log into Github and create a fork of the [meshtastic/Meshtastic](https://github.com/meshtastic/Meshtastic) repository.
### Clone your Meshtastic Repository fork
:::note
Replace `username` with your Github username.
:::
```bash title="Clone username/Meshtastic Repo"
git clone https://github.com/username/Meshtastic.git
```
### Change directory to Local copy
```bash title="Change Directory"
cd ~/Meshtastic
```
### Install Dependencies
```bash title="Install dependencies using Yarn"
yarn install
```
### Run Development Server
```bash title="Run node.js server"
yarn start
```
:::tip
Before submitting a pull request, it's helpful to run the following command to ensure there are no broken links or errors:
```bash title="Build Project"
yarn build
```
:::

View file

@ -0,0 +1,95 @@
---
id: style-guide-settings
title: Style Guide - Settings Pages
sidebar_label: Settings Pages
---
## Overview
Setting pages should focus solely on settings and configuring the device. Hardware is often a related topic, however these pages should not attempt to explain attaching hardware. Mention that hardware is required and link to the appropriate page(s).
## Layout
### Overview
This section should describe the group of settings and what they do for the device.
### Settings
This section starts with an alphabetized table of settings, available values, and default values.
Available values should be listed with tick marks `` surrounding the value.
| Value Type | Example |
| :--------: | :-----: |
| Boolean | `true`, `false` |
| List | `apple`, `banana`, `orange` |
| Range | `0`-`100` |
After the table each setting is described in brief detail. If the available options for a setting need additional explanation, a table should be used to describe each available option.
### Details
If additional details are needed, this optional section can explain that. These would include prerequisites, links to hardware guides, etc.
### Examples
This optional section can have examples of configurations needed where multiple settings are required to be set up for a specific use case.
## Example Template
```markdown title="Template for Settings Pages"
---
id: unique-id
title: Title for Page
sidebar_label: Label for Sidebar
---
<!--- Allows client-specific tabs to be used --->
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Overview
<!--- Add overview text to describe this group of settings --->
## Settings
<!--- Table of settings in alphabetical order --->
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| my_setting_with_options | `apple`, `banana`, `orange` | `apple` |
<!--- H3 for each setting above (alphabetized) --->
### my_setting_with_options
<!--- description for what the setting does --->
<!--- if the setting has many options, insert a table describing what those variables do --->
| Value | Description |
| :---: | :---------: |
| `apple` | Description of apple (default) |
| `banana` | Description of banana |
| `orange` | Description of orange |
<!--- Client tabs that were imported above --->
<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">
CLI content here
</TabItem>
<TabItem value="android">
Android content here
</TabItem>
<TabItem value="iOS">
iOS content here
</TabItem>
<TabItem value="web">
Web content here
</TabItem>
</Tabs>
## Details
<!--- Additional details about the settings IF NEEDED otherwise delete this h2 header --->
## Examples
<!--- Meant for examples where multiple settings are configured at the same time (WiFi type/SSID/password in a single command). If not needed, delete this h2 header --->
```

View file

@ -0,0 +1,35 @@
---
id: vercel
title: Vercel
sidebar_label: Vercel
---
## Overview
Setting up a Vercel account is an optional step that can help you view your changes to the documentation in a server environment just like the actual docs. This can be helpful to include when submitting a pull request so that developers can review your changes and visually check that things look correct.
## Set up Vercel account
- Go to [vercel.com](https://vercel.com)
- Login with your GitHub account, click `Continue with GitHub`
## Link your fork of the project
- Click `New Project`
- Under `Import Git Repository` select `+ Add GitHub Account`
You'll be redirected to GitHub to allow access to select repositories.
- Select your fork of the project: `username/Meshtastic`
## Configure project
Configure project:
- Set a name for the project
- Select a framework preset: `Docusaurus 2`
- Click `Deploy`
That's it! You should now see your project with a green or orange status dot showing that your fork of the project has been compiled. There will be a commit-specific url that you can share to view your changes. There also will be a branch-specific url that you can view. If there are any errors it will show up red and include the logs for you to figure out what has gone wrong.
:::tip
There is a limited number of branch urls that you will be able to view. If you notice that option has disappeared, you can delete unused branches on your fork and that will enable that feature again.
Branch urls are helpful in PRs because they will remain constant, and you won't need to resubmit a new url for review each new commit if changes are requested.
:::

View file

@ -31,7 +31,7 @@ To get a clean build you may have to delete the auto-generated file `./.vscode/c
```
sudo apt-get update
sudo apt-get install python3 g++ zip
sudo apt-get install python3 python3-dev g++ zip
```
2. Install PlatformIO (which is usually via wget/curl command).

View file

@ -4,219 +4,103 @@ title: Mesh broadcast algorithm
sidebar_label: Mesh algorithm
---
## Current algorithm
## Current Algorithm
The routing protocol for Meshtastic is really quite simple (and suboptimal). It is heavily influenced by the mesh routing algorithm used in [RadioHead](https://www.airspayce.com/mikem/arduino/RadioHead/) (which was used in very early versions of this project). It has four conceptual layers.
### A note about protocol buffers
### A Note About Protocol Buffers
Because we want our devices to work across various vendors and implementations, we use [Protocol Buffers](https://github.com/meshtastic/Meshtastic-protobufs) pervasively. For information on how the protocol buffers are used with respect to API clients see [sw-design](/software/other/sw-design.md), for purposes of this document you mostly only
need to consider the MeshPacket and Subpacket message types.
### Layer 1: Non-reliable zero hop messaging
### Later 0: LoRa Radio
This layer is conventional non-reliable LoRa packet transmission. The transmitted packet has the following representation on the ether:
All data is converted into LoRa symbols which are sent to the radio for transmission. The details are described elsewhere, but it is worth noting that in addition to the converted packet bytes described below, there is also a preamble sent at the start of any data packet.
- A 256-bit LoRa preamble (to allow receiving radios to synchronize clocks and start framing). We use a longer than minimum (8 bit) preamble to maximize the amount of time the LoRa receivers can stay asleep, which dramatically lowers power consumption.
This preamble allows receiving radios to synchronize clocks and start framing. We use a preable length of 32, which is longer than the minimum preamble length of 8, to maximize the amount of time the LoRa receivers can stay asleep, which dramatically lowers power consumption.
After the preamble and the syncWord of 0x2b, the 16 byte packet header is transmitted. This header is described directly by the PacketHeader class in the C++ source code. But indirectly it matches the first portion of the "MeshPacket" protobuf definition. But notably: this portion of the packet is sent directly as the following 16 bytes (rather than using the protobuf encoding). We do this to both save airtime and to allow receiving radio hardware the option of filtering packets before even waking the main CPU.
### Layer 1: Unreliable Zero Hop Messaging
- to (4 bytes): the unique NodeId of the destination (or 0xffffffff for NodeNum_BROADCAST)
- from (4 bytes): the unique NodeId of the sender
- id (4 bytes): the unique (with respect to the sending node only) packet ID number for this packet. We use a large (32 bit) packet ID to ensure there is enough unique state to protect any encrypted payload from attack.
- flags (4 bytes): Only a few bits are currently used - 3 bits for the "HopLimit" (see below) and 1 bit for "WantAck"
This layer is conventional non-reliable LoRa packet transmission. The transmitted packet has the following representation before encoding for transmission:
After the packet header, the actual packet is placed onto the the wire. These bytes are merely the encrypted packed protobuf encoding of the SubPacket protobuf. A full description of our encryption is available in [crypto](/docs/developers/device/encryption). It is worth noting that only this SubPacket is encrypted, headers are not. Which leaves open the option of eventually allowing nodes to route packets without knowing the keys used to encrypt.
| Offset | Length | Type | Usage |
|--------|--------|------|-------|
| 0x00 | 1 byte | Integer | syncWord, always `0x2B`. |
| 0x01 | 4 bytes | Integer | Packet header: Destination. The destination's unique NodeID. `0xFFFFFFFF` for broadcast. |
| 0x05 | 4 bytes | Integer | Packet Header: Sender. The sender's unique NodeID. |
| 0x09 | 4 bytes | Integer | Packet Header: The sending node's unique packet ID for this packet. |
| 0x0D | 32 bits | Bits | Packet Header: Flags. See the [header flags](#packet-header-flags) for usage. |
| 0x11 .. 0xFD | Varies, maximum of 237 bytes. | Bytes | Actual packet data. Unused bytes are not transmitted. |
| 0xFE .. 0xFF | 2 Bytes | Bytes | Unused. |
NodeIds are constructed from the bottom four bytes of the macaddr of the Bluetooth address. Because the OUI is assigned by the IEEE, and we currently only support a few CPU manufacturers, the upper byte is defacto guaranteed unique for each vendor. The bottom 3 bytes are guaranteed unique by that vendor.
#### Packet Header Flags
To prevent collisions all transmitters will listen before attempting to send. If they hear some other node transmitting, they will reattempt transmission in x milliseconds. This retransmission delay is random between 20 and 22 seconds. (these two numbers are currently hardwired, but really should be scaled based on expected packet transmission time at current channel settings).
| Index | # of Bits | Usage |
|-------|-----------|-------|
| 0 | 3 | HopLimit (see note in Layer 3) |
| 3 | 1 | WantAck |
| 4 .. 32 | 28 | Currently unused |
### Layer 2: Reliable zero hop messaging
#### Usage Details
This layer adds reliable messaging between the node and its immediate neighbors (only).
- **Packet Header:** is described directly by the `PacketHeader` class in the C++ source code. But indirectly it matches the first portion of the `MeshPacket` protobuf definition. Note that the packet header is not encoded using a protobuf, but is sent as raw bytes. This both saves airtime and allows receiving radio hardware to optionally filter packets before waking the main CPU.
The default messaging provided by layer-1 is extended by setting the "want-ack" flag in the MeshPacket protobuf. If want-ack is set the following documentation from mesh.proto applies:
- **Packet Header - NodeIDs:** are constructed from the bottom four bytes of the MAC address of the Bluetooth address. Because the OUI is assigned by the IEEE, and we currently only support a few CPU manufacturers, the upper byte is defacto guaranteed unique for each vendor. The bottom 3 bytes are guaranteed unique by that vendor.
"""This packet is being sent as a reliable message, we would prefer it to arrive
at the destination. We would like to receive an ACK packet in response.
- **Packet Header - Unique ID:** The ID is a large, 32 bit ID to ensure there is enough unique state to protect an encrypted payload from attack.
Broadcast messages treat this flag specially: Since ACKs for broadcasts would
rapidly flood the channel, the normal ACK behavior is suppressed. Instead,
the original sender listens to see if at least one node is rebroadcasting this
packet (because naive flooding algorithm). If it hears that, the odds (given
typical LoRa topologies) are very high that every node should
eventually receive the message. So FloodingRouter.cpp generates an implicit
ACK which is delivered to the original sender. If after some time we don't
hear anyone rebroadcast our packet, we will timeout and retransmit, using the
regular resend logic."""
- **Payload:** An encrypted and packed protobuf encoding of the SubPacket protobuf. Only the SubPacket is encrypted, while headers are not. This allows the option of eventually allowing nodes to route packets without knowing anything about the encrypted payload. For more information, see the [encryption](/docs/developers/device/encryption) and [protobufs](/docs/developers/protobufs/api) documentation. Any data past the maximum length is truncated.
If a transmitting node does not receive an ACK (or a NAK) packet within FIXME milliseconds, it will use layer-1 to attempt a retransmission of the sent packet. A reliable packet (at this 'zero hop' level) will be resent a maximum of three times. If no ACK or NAK has been received by then the local node will internally generate a NAK (either for local consumption or use by higher layers of the protocol).
#### Collision Avoidance
### Layer 3: (Naive) flooding for multi-hop messaging
All transmitters must listen before attempting to transmit. If another node is heard transmitting, the listening node will reattempt transmission after a calculated delay. The delay depends on various settings and is based on Semtech's [LoRa Modem Design Guide](/documents/LoRa_Design_Guide.pdf), section 4 and implemented in `RadioInterface::getPacketTime`. The following tables contains some calculated values for how long it takes to transmit a packet, which is used to calculate the delay.
Given our use-case for the initial release, most of our protocol is built around [flooding](<https://en.wikipedia.org/wiki/Flooding_(computer_networking)>). The implementation is currently 'naive' - i.e. it doesn't try to optimize flooding other than abandoning retransmission once we've seen a nearby receiver has ACKed the packet. Therefore, for each source packet up to N retransmissions might occur (if there are N nodes in the mesh).
| Payload Bytes | Spreading Factor | Bandwidth | Coding Rate | Time |
|---------------|------------------|-----------|-------------|------|
| 0 | 7 | 125 kHz | 4/5 | 13 ms |
| 237 | 7 | 125 kHz | 4/5 | 100 ms |
| 0 | 7 | 500 kHz | 4/5 | 4 ms |
| 237 | 7 | 500 kHz | 4/5 | 25 ms |
| 0 | 10 | 250 kHz | 4/7 | 51 ms |
| 237 | 10 | 250 kHz | 4/7 | 391 ms |
| 0 | 11 | 250 kHz | 4/6 | 101 ms |
| 237 | 11 | 250 kHz | 4/6 | 633 ms |
| 0 | 9 | 31.25 kHz | 4/8 | 201 ms |
| 237 | 9 | 31.25 kHz | 4/8 | 2.413 **seconds** |
| 0 | 12 | 125 kHz | 4/8 | 402 ms |
| 237 | 12 | 125 kHz | 4/8 | 3.482 **seconds** |
Each node in the mesh, if it sees a packet on the ether with HopLimit set to a value other than zero, it will decrement that HopLimit and attempt retransmission on behalf of the original sending node.
The actual delay calculation is a random value between 100ms (a hardcoded minimum) and the time taken to transmit just the header, which is given in the table as a 0 Byte payload.
### Layer 4: DSR for multi-hop unicast messaging
### Layer 2: Reliable Zero Hop Messaging
This layer is not yet fully implemented (and not yet used). But eventually (if we stay with our own transport rather than switching to QMesh or Reticulum)
we will use conventional DSR for unicast messaging. Currently, (even when not requiring 'broadcasts') we send any multi-hop unicasts as 'broadcasts' so that we can
leverage our (functional) flooding implementation. This is suboptimal but it is a very rare use-case, because the odds are high that most nodes (given our small networks and 'hiking' use case) are within a very small number of hops. When any node witnesses an ACK for a packet, it will realize that it can abandon its own
broadcast attempt for that packet.
This layer adds reliable messaging between the node and its immediate neighbors only.
## Misc notes on remaining tasks
The default messaging provided by Layer 1 is extended by setting the `WantAck` flag in the MeshPacket protobuf. If `WantAck` is set, the following documentation from mesh.proto applies:
This section is currently poorly formatted, it is mostly a mere set of TODO lists and notes for @geeksville during his initial development. After release 1.0 ideas for future optimization include:
> This packet is being sent as a reliable message, we would prefer it to arrive at the destination. We would like to receive an ACK packet in response.
>
> Broadcast messages treat this flag specially: Since ACKs for broadcasts would rapidly flood the channel, the normal ACK behavior is suppressed. Instead, the original sender listens to see if at least one node is rebroadcasting this
packet (because naive flooding algorithm). If it hears that, the odds (given typical LoRa topologies) are very high that every node should eventually receive the message. So FloodingRouter.cpp generates an implicit ACK which is delivered to the original sender. If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic.
- Make flood-routing less naive (because we have GPS and radio signal strength as heuristics to avoid redundant retransmissions)
- If nodes have been user marked as 'routers', preferentially do flooding via those nodes
- Fully implement DSR to improve unicast efficiency (or switch to QMesh/Reticulum as these projects mature)
If a transmitting node does not receive an ACK (or NAK) packet within FIXME milliseconds, it will use Layer 1 to attempt a retransmission of the sent packet. A reliable packet (at this 'zero hop' level) will be resent a maximum of three times. If no ACK or NAK has been received by then the local node will internally generate a NAK (either for local consumption or use by higher layers of the protocol).
great source of papers and class notes: <http://www.cs.jhu.edu/~cs647/>
Similarly to the delay used for [collision avoidance](#collision-avoidance), a delay is used before attempting to retransmit a dropped packet. The delay is calculated based on the time it takes to transmit just the header, which is a packet with a 0 Byte payload, and is a random value between `9 * header time` and `10 * header time`, in milliseconds.
flood routing improvements
### Layer 3: (Naive) Flooding for Multi-Hop Messaging
- DONE if we don't see anyone rebroadcast our want_ack=true broadcasts, retry as needed.
Given our use-case for the initial release, most of our protocol is built around [flooding](<https://en.wikipedia.org/wiki/Flooding_(computer_networking)>). The implementation is currently 'naive' and doesn't try to optimize flooding, except by abandoning retransmission once a node has seen a nearby receiver ACK the packet it's trying to flood. This means that up to N retransmissions of a packet could occur in an N node mesh.
reliable messaging tasks (stage one for DSR):
If any mesh nodes see a packet with a HopLimit other than zero, it will decrement that HopLimit and attempt retransmission on behalf of the original sending node.
- DONE generalize naive flooding
- DONE add a max hops parameter, use it for broadcast as well (0 means adjacent only, 1 is one forward etc...). Store as three bits in the header.
- DONE add a 'snoopReceived' hook for all messages that pass through our node.
- DONE use the same 'recentmessages' array used for broadcast msgs to detect duplicate retransmitted messages.
- DONE in the router receive path?, send an ACK packet if want_ack was set and we are the final destination. FIXME, for now don't handle multi-hop or merging of data replies with these ACKs.
- DONE keep a list of packets waiting for ACKs
- DONE for each message keep a count of # retries (max of three). Local to the node, only for the most immediate hop, ignorant of multi-hop routing.
- DONE delay some random time for each retry (large enough to allow for ACKs to come in)
- DONE once an ACK comes in, remove the packet from the retry list and deliver the ACK to the original sender
- DONE after three retries, deliver a NAK packet to the original sender (i.e. the phone app or mesh router service)
- DONE test one hop ACK/NAK with the python framework
- DONE Do stress test with ACKs
:::note
A node being in router mode does **not** currently change this behavior, but is intended to be used for future versions of the meshing algorithm. For an explanation of what router mode currently does, see [settings](/docs/software/settings/router#enabledisable-router-mode).
:::
DSR tasks
### Layer 4: DSR for Multi-Hop Unicast Messaging
- DONE oops I might have broken message reception
- DONE Don't use broadcasts for the network pings (close open GitHub issue)
- DONE add ignoreSenders to radioconfig to allow testing different mesh topologies by refusing to see certain senders
- DONE test multi-hop delivery with the python framework
This layer is not yet fully implemented and is currently unused. Eventually conventional [DSR](https://en.wikipedia.org/wiki/Dynamic_Source_Routing) will be used for for unicast messaging, unless transport is switched to [QMesh](https://github.com/faydr/QMesh) or [Reticulum](https://github.com/markqvist/Reticulum).
optimizations / low priority:
Currently, we send any multi-hop unicasts as broadcasts so that we can leverage the existing flooding implementation, even when broadcasts are not required. While this is suboptimal, it is a very rare use-case, because current networks are small and are geared towards a hiking use case, which means that most nodes are withing a very small number of hops.
- read this [this](http://pages.cs.wisc.edu/~suman/pubs/nadv-mobihoc05.pdf) paper and others and make our naive flood routing less naive
- read @cyclomies long email with good ideas on optimizations and reply
- DONE Remove NodeNum assignment algorithm (now that we use 4 byte node nums)
- DONE make android app warn if firmware is too old or too new to talk to
- change nodenums and packetids in protobuf to be fixed32
- low priority: think more careful about reliable retransmit intervals
- make ReliableRouter.pending threadsafe
- bump up PacketPool size for all the new ACK/NAK/routing packets
- handle 51 day rollover in doRetransmissions
- use a priority queue for the messages waiting to send. Send ACKs first, then routing messages, then data messages, then broadcasts?
when we send a packet
- do "hop by hop" routing
- when sending, if destnodeinfo.next_hop is zero (and no message is already waiting for an arp for that node), startRouteDiscovery() for that node. Queue the message in the 'waiting for arp queue' so we can send it later when then the arp completes.
- otherwise, use next_hop and start sending a message (with ack request) towards that node (starting with next_hop).
when we receive any packet
- sniff and update tables (especially useful to find adjacent nodes). Update user, network and position info.
- if we need to route() that packet, resend it to the next_hop based on our nodedb.
- if it is broadcast or destined for our node, deliver locally
- handle routereply/routeerror/routediscovery messages as described below
- then free it
routeDiscovery
- if we've already passed through us (or is from us), then it ignore it
- use the nodes already mentioned in the request to update our routing table
- if they were looking for us, send back a routereply
- NOT DOING FOR NOW -if max_hops is zero, and they weren't looking for us, drop (FIXME, send back error - I think not though?)
- if we receive a discovery packet, and we don't have next_hop set in our nodedb, we use it to populate next_hop (if needed) towards the requester (after decrementing max_hops)
- if we receive a discovery packet, and we have a next_hop in our nodedb for that destination we send a (reliable) we send a route reply towards the requester
when sending any reliable packet
- if timeout doing retries, send a routeError (NAK) message back towards the original requester. all nodes eavesdrop on that packet and update their route caches.
when we receive a routereply packet
- update next_hop on the node, if the new reply needs fewer hops than the existing one (we prefer shorter paths). FIXME, someday use a better heuristic
when we receive a routeError packet
- delete the route for that failed recipient, restartRouteDiscovery()
- if we receive routeerror in response to a discovery,
- FIXME, eventually keep caches of possible other routes.
TODO:
- optimize our generalized flooding with heuristics, possibly have particular nodes self mark as 'router' nodes.
- DONE reread the radiohead mesh implementation - hop to hop acknowledgment seems VERY expensive but otherwise it seems like DSR
- DONE read about mesh routing solutions (DSR and AODV)
- DONE read about general mesh flooding solutions (naive, MPR, geo assisted)
- DONE reread the disaster radio protocol docs - seems based on Babel (which is AODVish)
- REJECTED - seems dying - possibly dash7? <https://www.slideshare.net/MaartenWeyn1/dash7-alliance-protocol-technical-presentation> <https://github.com/MOSAIC-LoPoW/dash7-ap-open-source-stack> - does the open source stack implement multi-hop routing? flooding? their discussion mailing list looks dead-dead
- update duty cycle spreadsheet for our typical use case
a description of DSR: <https://tools.ietf.org/html/rfc4728>, good slides here: <https://www.slideshare.net/ashrafmath/dynamic-source-routing>,
good description of batman protocol: <https://www.open-mesh.org/projects/open-mesh/wiki/BATMANConcept>
interesting paper on LoRa mesh: <https://portal.research.lu.se/portal/files/45735775/paper.pdf>
It seems like DSR might be the algorithm used by RadioheadMesh. DSR is described in <https://tools.ietf.org/html/rfc4728>
<https://en.wikipedia.org/wiki/Dynamic_Source_Routing>
broadcast solution:
Use naive flooding at first (FIXME - do some math for a 20 node, 3 hop mesh. A single flood will require a max of 20 messages sent)
Then move to MPR later (<http://www.olsr.org/docs/report_html/node28.html>). Use altitude and location as heuristics in selecting the MPR set
compare to db sync algorithm?
What about never flooding GPS broadcasts? Instead, only have them go one hop in the common case. But if any node X is looking at the position of Y on their GUI, then send a unicast to Y asking for position update. Y replies.
If Y were to die, at least the neighbor nodes of Y would have their last known position of Y.
## approach 1
- send all broadcasts with a TTL
- periodically(?) do a survey to find the max TTL that is needed to fully cover the current network.
- to do a study, first send a broadcast (maybe our current initial user announcement?) with TTL set to one (so therefore no one will rebroadcast our request)
- survey replies are sent unicast back to us (and intervening nodes will need to keep the route table that they have built up based on past packets)
- count the number of replies to this TTL 1 attempt. That is the number of nodes we can reach without any rebroadcasts
- repeat the study with a TTL of 2 and then 3. stop once the # of replies stops going up.
- it is important for any node to do listen before talk to prevent stomping on other rebroadcasters...
- For these little networks I bet a max TTL would never be higher than 3?
## approach 2
- send a TTL1 broadcast, the replies let us build a list of the nodes (stored as a bitvector?) that we can see (and their RSSIs)
- we then broadcast out that bitvector (also TTL1) asking "can any of ya'll (even indirectly) see anyone else?"
- if a node can see someone I missed (and they are the best person to see that node), they reply (unidirectionally) with the missing nodes and their RSSIs (other nodes might sniff (and update their db) based on this reply, but they don't have to)
- given that the max number of nodes in this mesh will be like 20 (for normal cases), I bet globally updating this db of "nodenums and who has the best RSSI for packets from that node" would be useful
- once the global DB is shared, when a node wants to broadcast, it just sends out its broadcast . the first level receivers then make a decision "am I the best to rebroadcast to someone who likely missed this packet?" if so, rebroadcast
## approach 3
- when a node X wants to know other nodes positions, it broadcasts its position with want_replies=true. Then each of the nodes that received that request broadcast their replies (possibly by using special timeslots?)
- all nodes constantly update their local db based on replies they witnessed.
- after 10s (or whatever) if node Y notices that it didn't hear a reply from node Z (that Y has heard from recently) to that initial request, that means Z never heard the request from X. Node Y will reply to X on Z's behalf.
- could this work for more than one hop? Is more than one hop needed? Could it work for sending messages (i.e. for a message sent to Z with want-reply set).
## approach 4
look into the literature for this idea specifically.
- don't view it as a mesh protocol as much as a "distributed db unification problem". When nodes talk to nearby nodes, they work together
to update their nodedbs. Each nodedb would have a last change date and any new changes that only one node has would get passed to the
other node. This would nicely allow distant nodes to propagate their position to all other nodes (eventually).
- handle group messages the same way, there would be a table of messages and time of creation.
- when a node has a new position or message to send out, it does a broadcast. All the adjacent nodes update their db instantly (this handles 90% of messages I'll bet).
- Occasionally, a node might broadcast saying "anyone have anything newer than time X?" If someone does, they send the diffs since that date.
- essentially everything in this variant becomes broadcasts of "request db updates for >time X - for _all_ or for a particular nodenum" and nodes sending (either due to request or because they changed state) "here's a set of db updates". Every node is constantly trying to
build the most recent version of reality, and if some nodes are too far, then nodes closer in will eventually forward their changes to the distributed db.
- construct non-ambiguous rules for who broadcasts to request db updates. Ideally the algorithm should nicely realize node X can see most other nodes, so they should just listen to all those nodes and minimize the # of broadcasts. The distributed picture of nodes RSSI could be useful here?
- possibly view the BLE protocol to the radio the same way - just a process of reconverging the node/msgdb database.
If a node is attemptimg to broadcast a packet and receives an ACK for that packet, it can stop trying to broadcast that packet.

View file

@ -52,34 +52,53 @@ storeFile=nononononono.jks
TBD
## Meshtastic-flasher
A `meshtastic-flasher` release consists of publishing the release to PyPi https://pypi.org/project/meshtastic-flasher/ as well as producing single-executable files that are downloadable from Github https://github.com/meshtastic/Meshtastic-gui-installer/releases.
### Instructions - mostly automated
* Update https://github.com/meshtastic/Meshtastic-gui-installer/blob/master/meshtastic_flasher/version.py
* Go to Actions / Make Release / Run Workflow https://github.com/meshtastic/Meshtastic-gui-installer/actions/workflows/release.yml
* Draft & Publish release https://github.com/meshtastic/Meshtastic-gui-installer/releases
## Python
A python release consists of publishing the release to PyPi https://pypi.org/project/meshtastic/ as well as producing single-executable files that are downloadable from Github https://github.com/meshtastic/Meshtastic-python/releases.
### Pre-requisites
* Python Packages
* * pip3 install pdoc3
* * pip3 install pygatt
* * pip3 install pandoc
* * pip install twine
* * pip3 install -r requirements.txt
* https://pandoc.org/installing.html
* nanopb 0.4.4 installed
No pre-requisites are needed locally to make a release. All builds are done via Github Actions currently.
To test/validate, you will need to run:
```
pip3 install -r requirements.txt
pip install .
```
### Instructions
* Update protobufs
* * cd proto
* * git checkout master && git pull
* * cd ..
* * git add proto
* * git commit -m "updating proto submodule to latest"
* run bin/regen-protos.sh
* bump the version in setup.py
* run bin/test-release.sh
* * Ensure no errors.
* run bin/upload-release.sh
* Update protobufs by running the "Update protobufs" workflow in Actions: https://github.com/meshtastic/Meshtastic-python/actions/workflows/update_protobufs.yml
I usually just edit setup.py to bump the version number, then run "bin/upload-release.sh" (though you should use bin/test-release.sh for the first time - which is just a dry deploy to the pypi test server). This script does the build (including new docs - which will end up in the git checkin) and upload to pypi. Then I do a git commit/push and tag wit the version number.
* run the "smoke1" test (optional):
connect one device to the serial port and run:
```
pytest -m smoke1
```
* run unit tests: `pytest` (optional)
* run bin/test-release.sh (optional)
* bump the version in setup.py
* Run the "Make Release" workflow in Actions: https://github.com/meshtastic/Meshtastic-python/actions/workflows/release.yml
* After the "Make Release" is done, go into Releases: https://github.com/meshtastic/Meshtastic-python/releases There should be a draft. Add the title, update the "What's Changed" (Tip: Click on the "Auto-generate release notes" button.). Uncheck the "This is a pre-release" (if applicable).
:::note
You need permissions in the GitHub project to make a build

View file

@ -22,154 +22,156 @@ import TabItem from '@theme/TabItem';
## General
Q: What is Meshtastic?
### What is Meshtastic?
- Meshtastic is the most awesome long range, low power communications service on the planet earth! That's not even an exaggeration!
Meshtastic is the most awesome long range, low power communications service on the planet earth! That's not even an exaggeration!
Q: Where can I get additional help, ask questions, or bond with the Meshtastic community?
### Where can I get additional help, ask questions, or bond with the Meshtastic community?
- After reading this FAQ and checking out the links on the left, there are two places... The preferred place is to check out the [Forum](https://meshtastic.discourse.group). There you can be part of our growing community and search for previous posts that may be similar to what you're looking for. We also have the [Meshtastic Discord](https://discord.com/invite/UQJ5QuM7vq) server where you may connect with like-minded people.
After reading this FAQ and checking out the links on the left, there are two places... The preferred place is to check out the [Forum](https://meshtastic.discourse.group). There you can be part of our growing community and search for previous posts that may be similar to what you're looking for. We also have the [Meshtastic Discord](https://discord.com/invite/UQJ5QuM7vq) server where you may connect with like-minded people.
Q: How can I contribute to Meshtastic?
### How can I contribute to Meshtastic?
- Everyone contributes in a different way. Join the [Forum](https://meshtastic.discourse.group) and/or the [Meshtastic Discord](https://discord.com/invite/UQJ5QuM7vq) and introduce yourself. We're all very friendly. If you'd like to pitch in some code, check out the [Developers](https://meshtastic.org/docs/developers) menu on the left.
Everyone contributes in a different way. Join the [Forum](https://meshtastic.discourse.group) and/or the [Meshtastic Discord](https://discord.com/invite/UQJ5QuM7vq) and introduce yourself. We're all very friendly. If you'd like to pitch in some code, check out the [Developers](https://meshtastic.org/docs/developers) menu on the left.
## Device (aka Node)
Q: Where do I purchase the device hardware?
### Where do I purchase the device hardware?
- Each [supported device](https://meshtastic.org/docs/hardware/supported/tbeam) has a "Purchase Link".
Each [supported device](https://meshtastic.org/docs/hardware/supported/tbeam) has a "Purchase Link".
Q: I have my hardware. How do I install the firmware and any required drivers?
### I have my hardware. How do I install the firmware and any required drivers?
- See: https://meshtastic.org/docs/getting-started/flashing-esp32
See: https://meshtastic.org/docs/getting-started/flashing-esp32
Q: How do I update the firmware to the latest version?
### How do I update the firmware to the latest version?
- If the device is running Meshtastic firmware, you might be able to update over-the-air like via the Android app.
If the device is running Meshtastic firmware, you might be able to update over-the-air like via the Android app.
Q: My device has gone to sleep. Are received messages lost?
### My device has gone to sleep. Are received messages lost?
- The LoRa radio on the node is still active and will wake up the CPU when the device is sleeping. If your phone is in range, the node will relay any messages your phone may have missed. If you're in range and your device is active, messages have not been lost.
The LoRa radio on the node is still active and will wake up the CPU when the device is sleeping. If your phone is in range, the node will relay any messages your phone may have missed. If you're in range and your device is active, messages have not been lost.
Q: My device has gone to sleep and I can't send any messages.
### My device has gone to sleep and I can't send any messages.
- Once the node wakes up from sleep, your phone will relay any delayed messages through your node and to the mesh network. Give it a few minutes and it'll do the right thing.
Once the node wakes up from sleep, your phone will relay any delayed messages through your node and to the mesh network. Give it a few minutes and it'll do the right thing.
Q: How do I turn off an ESP32 t-beam based device?
### How do I turn off an ESP32 t-beam based device?
- Hold down the left PWR button for about 10 seconds and the display should turn off.
Hold down the left PWR button for about 10 seconds and the display should turn off.
Q: How do I turn on an ESP32 t-beam based device?
### How do I turn on an ESP32 t-beam based device?
- Push the left PWR button for about 1 second.
Push the left PWR button for about 1 second.
Q: How can I tell the device not to sleep?
### How can I tell the device not to sleep?
- Android instructions see: [Android Usage](https://meshtastic.org/docs/software/android/android-usage#configuration-options)
- Python CLI instructions see: [Python Usage](https://meshtastic.org/docs/software/python/python-cli#changing-device-settings)
### Plugins
Q: What are Plugins?
### What are Plugins?
- Plugins are features that expand the basic device functionality and/or integrate with other services.
Plugins are features that expand the basic device functionality and/or integrate with other services.
Q: What plugins do we have available?
### What plugins do we have available?
- To see the list of available plugins, please go to: https://meshtastic.org/docs/software/plugins/
To see the list of available plugins, please go to: https://meshtastic.org/docs/software/plugins/
Q: I'd like to write a plugin. How do I get started?
### I'd like to write a plugin. How do I get started?
- See: https://meshtastic.org/docs/developers/device/plugin-api
See: https://meshtastic.org/docs/developers/device/plugin-api
## Android
Q: What versions of Android does the Meshtastic Android App require?
### What versions of Android does the Meshtastic Android App require?
- Android 5.0 is the current minSdkVersion (21).
Android 5.0 is the current minSdkVersion (21).
Q: What's the cloud icon next to the message?
### What's the cloud icon next to the message?
- Empty Cloud - Queued on the app to be sent to your device.
- Up Arrow - Queued on the device to be sent over the mesh.
- Check Mark - Delivered over the mesh.
- Cross Mark - Error.
Q: How can I clear the message history?
### How can I clear the message history?
- Clear the storage from Android Settings > App
Clear the storage from Android Settings > App
## iOS
Q: What version of iOS does the Meshtastic iOS App Require?
### What version of iOS does the Meshtastic iOS App Require?
- The now-in-beta iOS app requires iOS v15.
The now-in-beta iOS app requires iOS v15.
Q: How do I get the Meshtastic iOS App?
### How do I get the Meshtastic iOS App?
- See [iOS App](https://meshtastic.org/docs/software/ios/ios-development)
See [iOS App](https://meshtastic.org/docs/software/ios/ios-development)
## Bluetooth
Q: How do I pair my phone to the device if my device doesn't have a screen?
### How do I pair my phone to the device if my device doesn't have a screen?
- Use [Wifi](https://meshtastic.org/docs/software/device/device-wifi) or use Bluetooth with [screenless pairing](https://github.com/meshtastic/Meshtastic-device/issues/26). When prompted to pair, double click on the device button and the password will be set to `123456`.
Use [Wifi](https://meshtastic.org/docs/software/device/device-wifi) or use Bluetooth with [screenless pairing](https://github.com/meshtastic/Meshtastic-device/issues/26). When prompted to pair, double click on the device button and the password will be set to `123456`.
Q: Can I have Bluetooth enabled and use WiFi radio?
### Can I have Bluetooth enabled and use WiFi radio?
- No. Only one method will work at a time.
No. Only one method will work at a time.
Q: How do I disable WiFi so Bluetooth will work?
### How do I disable WiFi so Bluetooth will work?
- Ensure the wifi_ssid and wifi_password values are blank.
Ensure the wifi_ssid and wifi_password values are blank.
## WiFi / Web Browser
Q: How do I turn on the WiFI radio?
### How do I turn on the WiFI radio?
- See: https://meshtastic.org/docs/software/device/device-wifi
See: https://meshtastic.org/docs/software/device/device-wifi
Q: When I turn on WiFi, Bluetooth turns off. Why is this?
### When I turn on WiFi, Bluetooth turns off. Why is this?
- Currently WiFi and Bluetooth can not be enabled at the same time.
Currently WiFi and Bluetooth can not be enabled at the same time.
Q: How do I access the network from my web browser?
### How do I access the network from my web browser?
- Visit http://meshtastic.local (Note: This is a work in progress.)
Visit http://meshtastic.local (Note: This is a work in progress.)
Q: I've Flashed my device but I can't access the Web UI
### I've Flashed my device but I can't access the Web UI
- Ensure you have used the included `device-install` script to flash your device, and that the file `spiffs-*.bin` is present in the same folder as your firmware at the time of flashing.
Ensure you have used the included `device-install` script to flash your device, and that the file `spiffs-*.bin` is present in the same folder as your firmware at the time of flashing.
Note: Currently only Chrome and Chromium based browsers offer reliable support for the Web UI.
## Channels
Q: What is a Meshtastic Channel?
### What is a Meshtastic Channel?
- This is the LoRa channel you're broadcasting on, the modem configuration (spreading factor, bandwidth and error correction), along with a special identifier for your group, and optional encryption.
This is the LoRa channel you're broadcasting on, the modem configuration (spreading factor, bandwidth and error correction), along with a special identifier for your group, and optional encryption.
Q: What is a LoRa channel?
### What is a LoRa channel?
- This is the LoRa frequency within the frequency band your device is configured to use.
This is the LoRa frequency within the frequency band your device is configured to use.
Q: How do I share my Meshtastic Channel with other people?
### How do I share my Meshtastic Channel with other people?
- Your Meshtastic client (Android, iOS, Web or Python) will provide you a URL or QR code. You can email, text or print this URL or QR code and share it with people you want to join your Meshtastic Channel.
Your Meshtastic client (Android, iOS, Web or Python) will provide you a URL or QR code. You can email, text or print this URL or QR code and share it with people you want to join your Meshtastic Channel.
Q: What is a Primary Channel?
### What is a Primary Channel?
- This is the first channel that's created for you when you initially setup your Meshtastic Channel.
This is the first channel that's created for you when you initially setup your Meshtastic Channel.
Q: What is a Secondary Channel?
### What is a Secondary Channel?
- As this is a new feature, secondary channels work on the device and the Python Script. Support for secondary channels by other clients is pending. For more information: https://meshtastic.org/docs/software/device/device-channels#how-to-use-secondary-channels
As this is a new feature, secondary channels work on the device and the Python Script. Support for secondary channels by other clients is pending. For more information: https://meshtastic.org/docs/software/device/device-channels#how-to-use-secondary-channels
## Command Line / Python
Q: How do I find out more about installing (and using) Meshtastic via command line?
### How do I find out more about installing (and using) Meshtastic via command line?
- See https://meshtastic.org/docs/software/python/python-installation
See https://meshtastic.org/docs/software/python/python-installation
Q: How do I find out more about using python to interact?
### How do I find out more about using python to interact?
- See https://meshtastic.org/docs/software/python/python-uses
See https://meshtastic.org/docs/software/python/python-uses

View file

@ -15,7 +15,7 @@ Plug your device into your computer using a USB cable and then do the following:
:::important
You may need to install a driver from Silicon Labs for the [CP210X USB to UART bridge](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
Some newer boards may require the drivers for the [CH9102](http://www.wch.cn/downloads/CH343SER_ZIP.html) or [Direct Download](https://github.com/Xinyuan-LilyGO/CH9102_Driver) for Windows 7.
Some newer boards may require the drivers for the [CH9102 Windows](http://www.wch.cn/downloads/CH343SER_ZIP.html) or [Direct Download](https://github.com/Xinyuan-LilyGO/CH9102_Driver) for Windows 7. For [CH9102 Mac](http://www.wch.cn/downloads/CH34XSER_MAC_ZIP.html). Click the big blue button with the down arrow. Be sure to open up the application and click "Install" after the package is installed. Also, reboot.
:::
<Tabs
@ -52,7 +52,7 @@ values={[
### Download Latest Firmware
Firmware can be downloaded from the [Firmware](/firmware) page. Your initial installation has to happen over USB from your Mac, Windows, or Linux PC. Once our software is installed, all future software updates happen over Bluetooth from your phone.
Firmware can be downloaded from the [Downloads](/downloads) page. Your initial installation has to happen over USB from your Mac, Windows, or Linux PC. Once our software is installed, all future software updates happen over Bluetooth from your phone.
:::note
The [T-Beam 0.7](/docs/hardware/supported/tbeam#t-beam---v07) board is an earlier version of the T-Beam board, and due to changes in the design in subsequent iterations this board uses a specific firmware file different from the other T-Beam boards.

View file

@ -66,7 +66,7 @@ Please ensure that you have updated the bootloader to the latest version using t
## Download Latest Firmware
Firmware can be downloaded from the [Firmware](/firmware) page. Your initial installation has to happen over USB from your Mac, Windows or Linux PC. Once our software is installed, all future software updates happen over Bluetooth from your phone.
Firmware can be downloaded from the [Downloads](/downloads) page. Your initial installation has to happen over USB from your Mac, Windows or Linux PC. Once our software is installed, all future software updates happen over Bluetooth from your phone.
## Install/Update Firmware

View file

@ -27,7 +27,7 @@ Make sure not to power the radio on without first attaching the antenna! You cou
## Download Firmware
Firmware can be downloaded from the [Firmware](/firmware) page. Your initial installation has to happen over USB from your Mac, Windows, or Linux PC. Once our software is installed, all future software updates happen over Bluetooth from your phone.
Firmware can be downloaded from the [Downloads](/downloads) page. Your initial installation has to happen over USB from your Mac, Windows, or Linux PC. Once our software is installed, all future software updates happen over Bluetooth from your phone.
## Flashing Firmware
@ -55,8 +55,8 @@ If you have at least two radios with the Meshtastic firmware, you may consider c
- Ensure you can run `meshtastic --info`.
- Ensure the region is set appropriately. If the radios are 915 MHz and you are in the US, then no region changes/settings are necessary. If you are in another region, you may need to run something like: `meshtastic --set region EU865`.
- Send a message `meshtastic --sendtext hello1`
- The radio connected via USB should show the message almost instantly.
- Other radios may take a few seconds before they show the message. You may need to press one of the buttons on the other radio to see if the message arrived.
- Note: The radio connected via USB will not show messages sent.
- After a few seconds the other radios will show the message. You may need to press one of the buttons on the other radio to see if the message arrived.
- Run `meshtastic --nodes` to see if other nodes show in the display.
- Messages sent from the USB radio should be sent to the other radio(s) via LoRa. The default settings should allow this to work.
@ -68,9 +68,9 @@ The Android app is currently more robust than the iOS app. But, they both should
- Start Meshtastic app
- Connect to radio(s) from inside the app
- Pair with radio(s). A paring code should show on the radio. Enter that value when prompted to pair a Bluetooth device.
- Note: May want to set the Bluetooth timeout (ex: `meshtastic --set wait_bluetooth_secs 28800`)
- Send message(s) from inside the app.
- Verify that all radios are receiving the messages. Might have to click on the button on the radio to see most recent message.
- Note: The radio connected via Bluetooth will not show messages sent.
- Verify that all other radios are receiving the message(s). Might have to click on the button on the radio to see most recent message.
## A good third test (connect via Wifi/HTTP)
@ -78,7 +78,8 @@ The Android app is currently more robust than the iOS app. But, they both should
- Reboot radio by either removing power or pressing the power button.
- Click on the button to cycle through to the screen with IP address and verify that there was a connection to the Wifi access point.
- Send message(s). `meshtastic --host 192.168.1.200 --sendtext hello`
- Verify that all radios are receiving the messages. Might have to click on the button on the radio(s) to see most recent message.
- Note: The radio connected via Wifi will not show messages sent.
- Verify that all radios are receiving the message(s). Might have to click on the button on the radio(s) to see most recent message.
- Open up a browser to http://meshtastic.local to view the web UI (currently under development). You may need to open http://meshtastic.local/static )
- If you want to switch back to Bluetooth, you will need to set the _wifi_ssid_ and _wifi_password_ values to blank values (ex: `meshtastic --set wifi_ssid '' --set wifi_password ''`).

View file

@ -0,0 +1,78 @@
---
id: meshtastic-flasher
title: Using Meshtastic Flasher GUI
sidebar_label: Meshtastic Flasher GUI
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Prerequisites
Install Meshtastic Flasher by either [downloading the executable file](https://github.com/meshtastic/Meshtastic-gui-installer/releases) or installing using `pip`. The following operating systems are: Windows, Mac, and Ubuntu.
### Install using `pip`
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
```bash title="Install Meshtastic Flasher"
pip install meshtastic-flasher
```
```bash title="Running Meshtastic Flasher"
meshtastic-flasher
```
</TabItem>
<TabItem value="macos">
```bash title="Install Meshtastic Flasher"
pip install meshtastic-flasher
```
```bash title="Running Meshtastic Flasher"
meshtastic-flasher
```
</TabItem>
<TabItem value="windows">
```bash title="Install Meshtastic Flasher"
pip install meshtastic-flasher
```
```bash title="Running Meshtastic Flasher"
meshtastic-flasher
```
</TabItem>
</Tabs>
## Flashing the Device
The Meshtastic Flasher will flash the latest firmware to esp32 and nrf52 devices. This is a newly developed application (as of February 1, 2022), so there may be some issues discovered as it is tested by users.
There are three steps:
* Click the "GET VERSIONS" button to get the versions available (from GitHub).
* Click the "DETECT DEVICE" button to determine the port and device variant connected.
* Click the "FLASH" button to flash the version selected, using the port selected to the device.
## Issues?
If you run into an issue, please create a ticket here: [Flasher Issues](https://github.com/meshtastic/Meshtastic-gui-installer/issues)
The code can be found at the [Meshtastic-gui-installer repo](https://github.com/meshtastic/Meshtastic-gui-installer)
## Known limitations
The following are known limitations:
* Raspberry Pi is not available, since it is arm-based and there are no pre-built libraries for [PySide](https://wiki.qt.io/Qt_for_Python)
* Ubuntu 20.04 is the version used for testing, it may work with other versions

View file

@ -23,6 +23,8 @@ sidebar_label: Heltec
[<img src="Heltec WiFi LoRa 32 (V2)" src="/img/hardware/heltec-v2.png" style={{zoom:'25%'}} />](/img/hardware/heltec-v2.png)
[<img src="Heltec WiFi LoRa 32 (V2) Pinouts" src="/img/hardware/heltec_v2_pinmap.png" style={{zoom:'25%'}} />](/img/hardware/heltec_v2_pinmap.png)
- There are two versions of the Heltec (V2). Below is a picture highlighting the visual differences:
[<img src="Heltec WiFi LoRa 32 (V2)" src="/img/hardware/heltec_v2_vs_v21.png" style={{zoom:'25%'}} />](/img/hardware/heltec_v2_vs_v21.png)

View file

@ -21,6 +21,7 @@ sidebar_label: LILYGO® Lora
[<img alt="LILYGO® TTGO Lora V1" src="/img/hardware/lora-v1.png" style={{zoom:'25%'}} />](/img/hardware/lora-v1.png)
## Lora V1.3
- ESP32 - Wifi & Bluetooth
@ -37,6 +38,7 @@ sidebar_label: LILYGO® Lora
- [Purchase link](https://www.aliexpress.com/item/4000628100802.html)
[<img alt="LILYGO® TTGO Lora V1.3" src="/img/hardware/lora-v1.3.png" style={{zoom:'25%'}} />](/img/hardware/lora-v1.3.png)
[<img alt="LILYGO® TTGO Lora V1.3 pin map" src="/img/hardware/lora-v1.3_pinmap.webp" style={{zoom:'25%'}} />](/img/hardware/lora-v1.3_pinmap.webp)
## Lora V2.0
@ -57,6 +59,7 @@ sidebar_label: LILYGO® Lora
[<img alt="LILYGO® TTGO Lora V2" src="/img/hardware/lora-v2.0.png" style={{zoom:'25%'}} />](/img/hardware/lora-v2.0.png)
## Lora V2.1-1.6
- ESP32 - Wifi & Bluetooth

View file

@ -6,6 +6,8 @@ sidebar_label: RAK WisBlock
The RAK WisBlock is a low power modular hardware system that can be used to build Meshtastic devices. Soldering is only required for the optional OLED screen.
As of February 6, 2022, there is a [Meshtastic Getting Started kit](https://store.rakwireless.com/products/wisblock-meshtastic-starter-kit) that has the minimum you need to get started.
You will need a [base board](https://store.rakwireless.com/collections/wisblock-base), a [core 4631 LPWAN module](https://store.rakwireless.com/collections/wisblock-core/products/rak4631-lpwan-node), and optionally a GPS Sensor to build a Meshtastic device.
Both available base boards ([5005](https://store.rakwireless.com/collections/wisblock-base/products/rak5005-o-base-board) & [19003](https://store.rakwireless.com/collections/wisblock-base/products/wisblock-base-board-rak19003)) have a reset button, support an OLED screen, and have built in connectors for a 3.7V LIPO battery (max 4.3V) and 5V Solar panel (max 5.5V)
@ -16,7 +18,7 @@ To add a GPS to the 5005 base board, you need the [1910 GPS sensor](https://stor
To add a GPS to the 19003 base board, you need the [12500 GPS sensor](https://store.rakwireless.com/products/wisblock-gnss-location-module-rak12500). It is supported via I2C on slot B for firmware versions 1.49 and above.
Flashing the firmware is a simple process. Connect your device via USB, click the reset button twice, and a drive will appear. On Windows, Linux, or Mac, drag the appropriate .uf2 firmware file onto the root of the drive and the firmware will be updated.
Flashing the firmware is a simple process. Connect your device via USB, click the reset button twice, and a drive will appear. On Windows, Linux, or Mac, drag the appropriate .uf2 firmware file onto the root of the drive and the firmware will be updated. Or, you can use [Meshtastic-flasher](https://github.com/meshtastic/Meshtastic-gui-installer)
There is currently no pin required to pair RAK devices via BLE.
@ -36,10 +38,12 @@ There is currently no pin required to pair RAK devices via BLE.
- Optional switches
- Optional screen
- Firmware for 5005 base board: [`firmware-rak4631_5005-1.x.x.uf2`](https://meshtastic.org/firmware)
- Firmware for 19003 base board: [`firmware-rak4631_19003-1.x.x.uf2`](https://meshtastic.org/firmware)
- Firmware for 5005 base board: [`firmware-rak4631_5005-1.x.x.uf2`](/downloads)
- Firmware for 19003 base board: [`firmware-rak4631_19003-1.x.x.uf2`](/downloads)
- [Installation instructions](https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Quickstart/#rak4631-lora-mesh-via-meshtastic)
- Don't forget to [update the bootloader](https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Quickstart/#updating-the-bootloader) first!
- Don't forget to [update the bootloader](https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Quickstart/#updating-the-bootloader) first! This can be done easily with [Meshtastic-flasher](https://github.com/meshtastic/Meshtastic-gui-installer)
- RAK's [GitHub Page](https://github.com/RAKWireless/WisBlock) for the WisBlock
<img alt="RAK4631 Core Module" src="/img/hardware/rak4631.png" style={{zoom:'50%'}} />
There is development activity to get sensors added in Meshtastic core. For example, the Environment Sensor.

View file

@ -24,6 +24,7 @@ sidebar_label: LILYGO® T-Beam
[<img alt="LILYGO® TTGO T-Beam Meshtastic" src="/img/hardware/t-beam-meshtastic.png" style={{zoom:'25%'}} />](/img/hardware/t-beam-meshtastic.png)
## T-Beam - v0.7
:::note
@ -47,6 +48,8 @@ This is an earlier version of the T-Beam board, and due to changes in the design
- [Purchase link](https://www.aliexpress.com/item/4000469332610.html)
[<img alt="LILYGO TTGO T-Beam v0.7" src="/img/hardware/t-beam-v0.7.png" style={{zoom:'25%'}} />](/img/hardware/t-beam-v0.7.png)
[<img alt="LILYGO TTGO T-Beam v0.7 pinmap" src="/img/hardware/t-beam_v0.7_pinmap.jpeg" style={{zoom:'25%'}} />](/img/hardware/t-beam_v0.7_pinmap.jpeg)
## T-Beam - V1.1
@ -66,6 +69,8 @@ This is an earlier version of the T-Beam board, and due to changes in the design
- [Purchase link](https://www.aliexpress.com/item/4001178678568.html)
[<img alt="LILYGO® TTGO T-Beam v1.1" src="/img/hardware/t-beam-v1.1.png" style={{zoom:'35%'}} />](/img/hardware/t-beam-v1.1.png)
[<img alt="LILYGO® TTGO T-Beam v1.1 pinmap" src="/img/hardware/t-beam_v1.1_pinmap.webp" style={{zoom:'35%'}} />](/img/hardware/t-beam_v1.1_pinmap.webp)
## T-Beam - M8N

View file

@ -2,13 +2,12 @@
id: privacy
title: Meshtastic privacy policy
sidebar_label: Privacy
custom_edit_url: null
---
We don't collect any personal identifying information.
We don't collect any personal identifying information. We never capture usernames, the contents of your texts, or your location data.
If you have opted-in to analytics on the Android app (thank you - that helps us know what things we need to improve), we will receive anonymized information about user behavior. This includes crash reports, which screens you used in the app etc... Analytics is provided by [Crashlytics](https://firebase.google.com/products/crashlytics).
We never capture usernames, the contents of your texts, or your location.
If you opt-in to analytics on the Android app (thank you - that helps us know what things we need to improve), we will receive anonymized information about user behavior. This includes crash reports, screens used in the app, etc... Analytics is provided by [Firebase Crashlytics](https://firebase.google.com/products/crashlytics).
Maps provided by Mapbox require analytics to work. For more information about what they collect, please see the [Mapbox privacy policy](https://www.mapbox.com/legal/privacy/).

View file

@ -3,12 +3,12 @@ id: android-installation
title: Android application installation
sidebar_label: Installation
---
~~Our Android application is available to download on Google Play.~~ Our Google Play listing has been removed by google due to a recent policy change by them with respect to the background location access (which our app needs). We've started the '[appeal](/docs/software/android/location-access)' process, but for now you'll need to get the app from other places.
Our Android application is available to download on Google Play Store.
<p align="center"><a href="https://play.google.com/store/apps/details?id=com.geeksville.mesh&referrer=utm_source%3Dgithub-homepage"><img alt="Download at https://play.google.com/store/apps/details?id=com.geeksville.mesh" src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" style={{zoom:'35%'}} /></a></p>
The app is also available on the Amazon [Appstore](https://www.amazon.com/Geeksville-Industries-Meshtastic/dp/B08CY9394Q). You will need to install the Amazon Appstore onto your phone in order to install the Meshtastic application.
<p align="center"><a href="https://play.google.com/store/apps/details?id=com.geeksville.mesh&referrer=utm_source%3Dgithub-homepage"><img alt="Download at https://play.google.com/store/apps/details?id=com.geeksville.mesh" src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" style={{zoom:'35%'}} /></a> <a href="https://www.amazon.com/Geeksville-Industries-Meshtastic/dp/B08CY9394Q"><img alt="Download at https://www.amazon.com/Geeksville-Industries-Meshtastic/dp/B08CY9394Q" src="/img/amazon-fire-button.png" style={{zoom:'20%',padding:'3.5em'}} /></a></p>
The application may not be found if your phone/Android version are too old. The minimum Android version is 5.0 (Lollipop 2014, first BLE support). However, Android 6, Marshmallow 2015, is recommended as the Bluetooth is more stable.
The app can also be sideloaded by downloading the .apk from the <a href="https://github.com/meshtastic/Meshtastic-Android/releases/latest">GitHub releases</a> page. If you do sideload, you may have to give your browser permissions to run a package installer. If you wish to view the code or contribute to development of the app, please visit the app's <a href="https://github.com/meshtastic/Meshtastic-Android">GitHub page</a>.

View file

@ -8,7 +8,7 @@ The device firmware runs on the nodes to build the mesh for communication. Each
The current firmware has support for a screen to display received messages, along with information about nodes on the mesh, and more detailed information about the device on which it is running.
The latest firmware can be downloaded from the [Firmware](/firmware) page. If you wish to view the code or contribute to development of the firmware, please visit the device code <a href="https://github.com/meshtastic/Meshtastic-device">GitHub page</a>.
The latest firmware can be downloaded from the [Downloads](/downloads) page. If you wish to view the code or contribute to development of the firmware, please visit the device code <a href="https://github.com/meshtastic/Meshtastic-device">GitHub page</a>.
### Buttons

View file

@ -23,27 +23,113 @@ You can get the latest python tool/library with `pip3 install --upgrade meshtast
## Setup
To prevent access from untrusted users, you must first make a `gpio` channel that is used for authenticated access to this feature. You'll need to install this channel on both the local and remote node.
The procedure using the python command line tool is:
1. Connect local device via USB
2. Create a gpio channel
```bash
meshtastic --ch-add gpio
```
:::tip
If doing local testing, may want to change the speed of the channel at this time, too. (ex: "meshtastic --ch-mediumfast")
:::
3. Check the channel has been created and copy the long "Complete URL" that contains all the channels on that device
```bash
meshtastic --info
```
4. Connect the remote device via USB (or use the [remote admin](device-remote-admin) feature to reach it through the mesh)
5. Set it to join the gpio channel you created
```bash
meshtastic --seturl theurlyoucopiedinstep3
```
Now both devices can talk over the `gpio` channel.
Now both devices should be able to talk over the `gpio` channel. Send a text message from one the other other verify. Also run "--nodes" to verify the second node shows up.
## A little bit of information about masks
To determine the appropriate mask for the pin(s) that you want to know. The python program (and output) below might help:
```
>>> for i in range(1,45):
... print(f'GPIO:{i} mask:{hex(2**i)}')
...
GPIO:1 mask:0x2
GPIO:2 mask:0x4
GPIO:3 mask:0x8
GPIO:4 mask:0x10
GPIO:5 mask:0x20
GPIO:6 mask:0x40
GPIO:7 mask:0x80
GPIO:8 mask:0x100
GPIO:9 mask:0x200
GPIO:10 mask:0x400
GPIO:11 mask:0x800
GPIO:12 mask:0x1000
GPIO:13 mask:0x2000
GPIO:14 mask:0x4000
GPIO:15 mask:0x8000
GPIO:16 mask:0x10000
GPIO:17 mask:0x20000
GPIO:18 mask:0x40000
GPIO:19 mask:0x80000
GPIO:20 mask:0x100000
GPIO:21 mask:0x200000
GPIO:22 mask:0x400000
GPIO:23 mask:0x800000
GPIO:24 mask:0x1000000
GPIO:25 mask:0x2000000
GPIO:26 mask:0x4000000
GPIO:27 mask:0x8000000
GPIO:28 mask:0x10000000
GPIO:29 mask:0x20000000
GPIO:30 mask:0x40000000
GPIO:31 mask:0x80000000
GPIO:32 mask:0x100000000
GPIO:33 mask:0x200000000
GPIO:34 mask:0x400000000
GPIO:35 mask:0x800000000
GPIO:36 mask:0x1000000000
GPIO:37 mask:0x2000000000
GPIO:38 mask:0x4000000000
GPIO:39 mask:0x8000000000
GPIO:40 mask:0x10000000000
GPIO:41 mask:0x20000000000
GPIO:42 mask:0x40000000000
GPIO:43 mask:0x80000000000
GPIO:44 mask:0x100000000000
```
## How to easily test GPIO operations?
You can add a simple LED and resistor to validate that the GPIO operations work as expected. Used the tutorial at https://www.instructables.com/Slide-Switch-With-Arduino-Uno-R3/ as a guide.
Need:
* 2 Meshtastic devices (one device could be on a local computer, and the other one just has to be powered and is the one with the LED to be connected to it)
* 2 wires (black and yellow; they can be any color but typically black is used for ground)
* breadboard (optional)
* 1 LED
* 1 220Ω resistor (somewhat optional, but recommended)
Prep:
* disconnect the remote device from power (battery/usb)
* add a resistor from yellow wire to the one end of the LED (either end of the resistor is ok, either end of the LED is ok)
* add the yellow wire from a GPIO pin that will not cause any issues (ex: for TLoraV1, we can use GPIO21)
* add the black "ground" wire from the ground pin on the device (ex: for TLoraV1 it is the end pin next to the RST button) to the other end of the LED
* power on the device
Validation:
By default, the pin may be "off" or "on". (It will most likely "off".) See the steps below for running commands. In the example of GPIO21, the mask would be 0x200000.
[<img alt="T-Lora v1 with LED on GPIO 21" src="/img/LED_on_TLoraV1.jpg" style={{zoom:'25%'}} />](/img/LED_on_TLoraV1.jpg)
## Doing GPIO operations
@ -51,14 +137,14 @@ You can programmatically do operations from your own python code by using the Me
## Using GPIOs from the python CLI
Writing a GPIO:
Writing a GPIO (ex: turn "on" GPIO4):
```bash title="Expected output"
$ meshtastic --port /dev/ttyUSB0 --gpio-wrb 4 1 --dest \!28979058
Connected to radio
Writing GPIO mask 0x10 with value 0x10 to !28979058
```
Reading a GPIO:
Reading a GPIO (ex: read GPIO4):
```bash title="Expected output"
$ meshtastic --port /dev/ttyUSB0 --gpio-rd 0x10 --dest \!28979058
Connected to radio
@ -66,7 +152,11 @@ Reading GPIO mask 0x10 from !28979058
GPIO read response gpio_value=16
```
Watching for GPIO changes:
:::note
If the mask and the gpio_value match, then the value is "on". If the gpio_value is 0, then the value is "off".
:::
Watching for GPIO changes (ex: watching GPIO4 for changes):
```bash title="Expected output"
$ meshtastic --port /dev/ttyUSB0 --gpio-watch 0x10 --dest \!28979058
Connected to radio

View file

@ -4,7 +4,7 @@ title: OSX Install
sidebar_label: OSX
---
(Here's some quick tips on installing the device code from OS-X, thanks to @android606)
(Here's some quick tips and [troubleshooting](#troubleshooting) on installing the device code from OS-X, thanks to @android606)
First time using LoRa for anything, just checking it out.
@ -31,3 +31,31 @@ I got it working fairly smoothly, but there were two hang-ups I thought I'd ment
[driver for the CP210X USB to UART bridge from Silicon Labs](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
After I installed that, esptool.py was completely happy and the firmware loaded right up.
### Troubleshooting
**1. Running into trouble when installing `esptool` via brew**
- Make sure that `openssl` is installed first:
```
brew install openssl
```
- Set some flags in your bash/zsh/whichever profile for `esptool` to install [cryptography](https://cryptography.io/en/latest/installation/) as a dependency correctly:
```
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
```
- attempt a reinstall of esptool
```
pip3 install --upgrade esptool
```
**2. I can't see the usb device as `/dev/tty[something]`:**
- Driver config successfully tested on Big Sur v11.6.2: https://github.com/WCHSoftGroup/ch34xser_macos

View file

@ -4,6 +4,71 @@ title: MQTT
sidebar_label: MQTT
---
## MQTT
Meshtastic devices with wifi hardware (ESP32) are able to connect to an MQTT broker to uplink and downlink mesh packets. This is useful for a number of purposes:
- Connecting your mesh to the official Meshtastic MQTT broker. This makes your devices appear on the world map, and provides a limited copy of your mesh traffic, translated into JSON.
- Using a custom MQTT broker to bridge several mesh networks together, via the internet (or just a local IP network)
- Using a custom MQTT broker and a translator program to decode the raw protobuf packets and translate them into a plain text form for use in other systems. eg plotting temperature readings in Grafana, or device positions in Traccar.
When MQTT enabled, the Meshtastic device simply uplinks and/or downlinks every raw protobuf packet that it sees to the MQTT broker. All packets are sent to the broker, whether they originate from another device on the mesh, or the gateway node itself.
Packets may be encrypted. If you use the default meshtastic MQTT server, packets are always encrypted. If you use a custom MQTT broker (ie set `mqtt_server`), the `mqtt_encryption_enabled` setting applies, which by default is false.
IMPORTANT: When MQTT is turned on, you are potentially broadcasting your entire mesh traffic onto the public internet. This includes messages and position information.
### MQTT Topic
The device will uplink and downlink packets to the `msh/` prefix:
`msh/1/c/ShortFast/!12345678` where
- `!12345678` is the address of the gateway device.
- `ShortFast` is the channel name.
The payload is a raw protobuf. Looking at the MQTT traffic with a program like `mosquitto_sub` will tell you it's working, but you won't get much useful information out of it. For example:
```
苓????"!
!937bed1cTanksTnk"D???05??=???aP`
ShortFast !937bed1c
```
### Basic Configuration
Check out [MQTT Settings](https://meshtastic.org/docs/software/settings/mqtt) for full information. For quick start instructions, read on.
- Connect your gateway node to wifi, by setting the `wifi_ssid` and `wifi_password` preferences.
- Configure your broker settings: `mqtt_server`, `mqtt_username`, and `mqtt_password`. If all are left blank, the device will connect to the Meshtastic broker.
- Set `uplink_enabled` and `downlink_enabled` as appropriate for each channel. Most users will just have a single channel (at channel index 0). `meshtastic --ch-index 0 --ch-set uplink_enabled true`
`uplink_enabled` will tell the device to publish mesh packets to MQTT.
`downlink_enabled` will tell the device to subscribe to MQTT, and forward any packets from there onto the mesh.
### Getting plain data out of the mesh
As of firmware 1.2.53, it is possible for the device to decrypt the protobufs before publishing to MQTT. To translate this into a plain format:
- Set up a gateway node to uplink packets to your MQTT broker:
- `meshtastic --set wifi_ssid XXXX`
- `meshtastic --set wifi_password XXXX`
- `meshtastic --set mqtt_server 192.168.1.1`
- `meshtastic --set mqtt_username XXXX`
- `meshtastic --set mqtt_password XXXX`
- `meshtastic --set mqtt_encryption_enabled false`
- `meshtastic --ch-index 0 --ch-set uplink_enabled true`
- Grab the meshtastic-mqtt script from [here](https://github.com/joshpirihi/meshtastic-mqtt)
- `git clone https://github.com/joshpirihi/meshtastic-mqtt && cd meshtastic-mqtt`
- Edit `meshtastic_mqtt/meshtastic_mqtt.py` and enter your mqtt broker details
- Install the script with `pip install .`
- Run `meshtastic-mqtt`. It will print some debug output by default, and publish the plain values to the `meshtastic/` prefix.
- View the plain data with `mosquitto_sub -h YOUR_MQTT_SERVER -t meshtastic/# -v`
- You can then consume the data easily in other systems. For example, nodered->influx db->grafana.
#Original brainstorming for MQTT:
## Abstract
:::note

View file

@ -5,7 +5,7 @@ sidebar_label: Environment measurement
---
## About
The Environment Measurement Plugin will allow nodes to send a specific message with information from connected environmental sensors. Currently supported sensors are BME280, BME680, DHT11, DHT12, DHT21, DHT22 and Dallas 1-wire DS18B20.
The Environment Measurement Plugin will allow nodes to send a specific message with information from connected environmental sensors. Currently supported sensors are BME280, BME680, DHT11, DHT12, DHT21, DHT22, Dallas 1-wire DS18B20, and MCP9808.
The preferred setup is using I2C, so the `environmental_measurement_plugin_sensor_pin` may not be needed.
@ -56,6 +56,7 @@ These are the settings that can be configured.
4 = DHT22
5 = BME280
6 = BME680
7 = MCP9808
environmental_measurement_plugin_sensor_pin
Which pin is the sensor connected to?
@ -85,6 +86,129 @@ The device must be restarted after the settings have been changed for the plugin
The sensors can be wired differently, here's one example for sensor DS18B20 https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide
## Example of T-LoraV1 with DHT22 temperature sensor
Setup of a T-LoraV1 with DHT22 temperature sensor.
[<img src="T-LoraV1 with DHT22" src="/img/hardware/lora_v1_with_DHT22.jpg" style={{zoom:'25%'}} />](/img/hardware/lora_v1_with_DHT22.jpg)
Requirements:
* T-LoraV1 (but any esp32 should work, just be sure to double check which GPIO to use)
* DHT22 sensor
* 10 Kohm resistor (optional, but recommended)
* breadboard (optional)
* two red wires (could be a different color, but 5V is typically red)
* two yellow wires for GPIO (could be a different color)
* one black wire (could be a different color, but GROUND is typically black)
Steps:
* disconnect power/battery
* connect black wire from GROUND to "-" on the DHT22
* connect yellow wire from middle PIN to a row on bread board
* connect red wire from 5V to a row on breadboard
* connect resistor between red and yellow rows
* connect red wire from row with red to "+" on DHT22
* connect yellow wire from yellow row to GPIO on device (ex: GPIO21)
* double check the cabling (if you get it wrong, you can damage the device and/or the DHT22 sensor)
* plug in device
* configure the device:
```
meshtastic --set environmental_measurement_plugin_measurement_enabled true --set environmental_measurement_plugin_screen_enabled true --set environmental_measurement_plugin_update_interval 15 --set environmental_measurement_plugin_display_farenheit true --set environmental_measurement_plugin_sensor_type DHT22 --set environmental_measurement_plugin_sensor_pin 21
```
:::tip
You can change the values above to suit your needs. The commands can be run one at a time or in a group as show above.
:::
* reboot/reset the device (press the RST button or unplug/plug in the device)
* when the device boots it should say "Environment" and it may show the sensor data
* if "no data", then triple check the wiring
* if still "no data", run:
```
meshtastic --info
```
and verify the the environmental_measurement_plugin_sensor_type and environmental_measurement_plugin_sensor_pin
## Example of T-LoraV1 with Dallas DS18B20 temperature sensor
Setup of a T-LoraV1 with DS18B20 temperature sensor.
[<img src="T-LoraV1 with DS18B20" src="/img/hardware/lora_v1_with_DS18B20.jpg" style={{zoom:'25%'}} />](/img/hardware/lora_v1_with_DS18B20.jpg)
Requirements:
* T-LoraV1 (but any esp32 should work, just be sure to double check which GPIO to use)
* DS18B20 sensor
* 10 Kohm resistor (optional, but recommended)
* breadboard (optional)
* two red wires (could be a different color, but 5V is typically red)
* two yellow wires for GPIO (could be a different color)
* one black wire (could be a different color, but GROUND is typically black)
Steps:
* disconnect power/battery
* connect black wire from GROUND to "-" on the DS18B20
* connect yellow wire from DAT pin to a row on bread board
* connect red wire from 5V to a row on breadboard
* connect resistor between red and yellow rows
* connect red wire from row with red to "VCC" on DS18B20
* connect yellow wire from yellow row to GPIO on device (ex: GPIO21)
* double check the cabling (if you get it wrong, you can damage the device and/or the sensor)
* plug in device
* configure the device:
```
meshtastic --set environmental_measurement_plugin_measurement_enabled true --set environmental_measurement_plugin_screen_enabled true --set environmental_measurement_plugin_update_interval 15 --set environmental_measurement_plugin_display_farenheit true --set environmental_measurement_plugin_sensor_type DS18B20 --set environmental_measurement_plugin_sensor_pin 21
```
:::tip
You can change the values above to suit your needs. The commands can be run one at a time or in a group as show above.
:::
* reboot/reset the device (press the RST button or unplug/plug in the device)
* when the device boots it should say "Environment" and it may show the sensor data
* if "no data", then triple check the wiring
* if still "no data", run:
```
meshtastic --info
```
and verify the the environmental_measurement_plugin_sensor_type and environmental_measurement_plugin_sensor_pin
## Example of RAK 4631 with Environment Sensor
Setup of a RAK 4631 with Environment Sensor
[<img src="RAK4631_with_EnvSensor" src="/img/hardware/rak/RAK4631_with_EnvSensor.jpg" style={{zoom:'25%'}} />](/img/hardware/rak/RAK4631_with_EnvSensor.jpg)
Requirements:
* RAK4631
* Environment Sensor
Steps:
* configure the device:
```
meshtastic --set environmental_measurement_plugin_measurement_enabled true --set environmental_measurement_plugin_screen_enabled true --set environmental_measurement_plugin_update_interval 15 --set environmental_measurement_plugin_display_farenheit true --set environmental_measurement_plugin_sensor_type 6
```
:::tip
You can change the values above to suit your needs. The commands can be run one at a time or in a group as show above.
:::
* reboot/reset the device (press the button or unplug/plug in the device)
* when the device boots it should say "Environment" and it may show the sensor data
* if still "no data", run:
```
meshtastic --info
```
and verify the the environmental_measurement_plugin_sensor_type
## Known Problems

View file

@ -22,7 +22,7 @@ meshtastic -h
### --port PORT
The port the Meshtastic device is connected to, i.e. /dev/ttyUSB0 or COM4. if unspecified, meshtastic will try to find it. Important to use when multiple devices are connected to ensure you call the command for the correct device.
The port the Meshtastic device is connected to, i.e. `/dev/ttyUSB0`, `/dev/cu.wchusbserial`, `COM4` etc. if unspecified, meshtastic will try to find it. Important to use when multiple devices are connected to ensure you call the command for the correct device.
**Usage**
@ -130,6 +130,7 @@ Add a secondary channel, you must specify a channel name.
```shell
meshtastic --ch-add testing-channel
```
### --ch-del
Delete the ch-index channel.
@ -197,7 +198,7 @@ Set device owner name.
**Usage**
```shell
meshtastic --dest \!28979058 --set-owner "MeshyJohn"
meshtastic --dest '!28979058' --set-owner "MeshyJohn"
```
### --set-ham SET_HAM
@ -217,7 +218,7 @@ The destination node id for any sent commands
**Usage**
```shell
meshtastic --dest \!28979058 --set-owner "MeshyJohn"
meshtastic --dest '!28979058' --set-owner "MeshyJohn"
```
### --sendtext SENDTEXT
@ -247,7 +248,7 @@ Tell the destination node to reboot.
**Usage**
```shell
meshtastic --dest \!28979058 --reboot
meshtastic --dest '!28979058' --reboot
```
### --reply
@ -267,7 +268,7 @@ Set a particular GPIO # to 1 or 0.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --gpio-wrb 4 1 --dest \!28979058
meshtastic --port /dev/ttyUSB0 --gpio-wrb 4 1 --dest '!28979058'
```
### --gpio-rd GPIO_RD
@ -277,7 +278,7 @@ Read from a GPIO mask.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --gpio-rd 0x10 --dest \!28979058
meshtastic --port /dev/ttyUSB0 --gpio-rd 0x10 --dest '!28979058'
```
### --gpio-watch GPIO_WATCH
@ -287,7 +288,7 @@ Start watching a GPIO mask for changes.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --gpio-watch 0x10 --dest \!28979058
meshtastic --port /dev/ttyUSB0 --gpio-watch 0x10 --dest '!28979058'
```
### --no-time
@ -401,6 +402,7 @@ To create to a file with the connected device's configuration, this command's ou
```shell
meshtastic --export-config > example_config.yaml
```
**Usage**
```shell

View file

@ -1,53 +1,244 @@
---
id: canned-message-plugin-settings
title: Canned Message Plugin Settings
sidebar_label: Canned Message Plugin Settings
id: canned-message-plugin
title: Canned Message Plugin
sidebar_label: Canned Message Plugin
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<!--- TODO add link to hardware setup to admonition--->
:::note
This plugin requires attaching a peripheral accessory to your device. It will not work without one. It also requires use of the [Rotary Encoder Plugin](rotary-encoder-plugin) to configure the input source.
:::
## Overview
The CannedMessage Plugin will allow you to send messages to the mesh network
from the device without using the phone app.
You can predefine text messages to choose from.
The CannedMessage Plugin will allow you to send messages to the mesh network from the device without using the phone app. You can predefine text messages to choose from.
Please also follow settings of Rotary Encoder to configure input source!
:::tip
Once plugin settings are changed, a **reset** is required for them to take effect.
:::
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| canned_message_plugin_allow_input_source | `rotEnc1`, `_any` | `_any` |
| canned_message_plugin_enabled | `true`, `false` | `false` |
| canned_message_plugin_allow_input_source | `string` | `_all` |
| canned_message_plugin_messages | `string` | (not defined) |
| canned_message_plugin_messages | `string` | `""` |
| canned_message_plugin_send_bell | `true`, `false` | `false` |
### canned_message_plugin_allow_input_source
Input event source accepted by the canned message plugin.
| Value | Description |
| :---: | :---------: |
| `_any` | Default. Allows any peripheral input device connected to the device. |
| `rotEnc1` | Hardcoded value naming the input device that this plugin listens to. This could allow multiple input devices to be named with future software development. At present, this doesn't do anything differently than the default setting. |
#### Set input source
<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">
```bash title="Set Allowed Input Source"
meshtastic --set canned_message_plugin_allow_input_source "_any"
```
```bash title="Specify Allowed Input Source"
meshtastic --set canned_message_plugin_allow_input_source "rotEnc1"
```
</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>
### canned_message_plugin_enabled
Enables the plugin.
### canned_message_plugin_allow_input_source
:::tip
Using the canned message plugin requires you set up the [rotary encoder plugin](rotary-encoder-plugin). See [prerequisites](#prerequisites) below.
:::
#### Enable/Disable the plugin
<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">
Input event origin accepted by the canned message plugin.
Can be e.g. "rotEnc1" or keyword "_any"
```bash title="Enable Canned Message Plugin"
meshtastic --set canned_message_plugin_enabled true
```
```bash title="Disable Canned Message Plugin"
meshtastic --set canned_message_plugin_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>
### canned_message_plugin_messages
Predefined messages for CannedMessagePlugin separated by '|' characters.
Predefined messages for CannedMessagePlugin separated by `|` characters.
You can define up to 50 messages with a total length 1024 bytes.
#### Set canned messages
<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">
```bash title="Set Canned Messages"
meshtastic --set canned_message_plugin_messages "I'm fine|I'm out|I'm back|Need helping hand|Help me with saw|I need an alpinist|I need ambulance|Keep Calm|On my way|I will be late|I'm already waiting|We have company|Beer is cold|Roger"
```
</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>
### canned_message_plugin_send_bell
CannedMessagePlugin also sends a bell character with the messages.
ExternalNotificationPlugin can benefit from this feature.
The [External Notification Plugin](external-notification-plugin) can benefit from this feature as it utilizes the bell character.
#### Enable/Disable bell character
<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">
```bash title="Enable Bell Character"
meshtastic --set canned_message_plugin_send_bell true
```
```bash title="Disable Bell Character"
meshtastic --set canned_message_plugin_send_bell 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>
## Details
See "Software / Plugins / Canned messages" for details!
### Prerequisites
## Examples
<!--- TODO add link to hardware pages to first bullet point --->
- Attach a compatible peripheral device. Take note of the GPIO numbers you use, as they will be used in the following step.
- Once attached, configure peripheral device with [Rotary Encoder Plugin Settings](rotary-encoder-plugin).
See "Software / Plugins / Canned messages" for examples!
:::note
Replace each `GPIO` (x3) below with the GPIO numbers from hardware setup.
```bash title="Canned Message Plugin - Required Rotary Encoder Plugin Settings"
meshtastic --set rotary1_pin_a GPIO
meshtastic --set rotary1_pin_b GPIO
meshtastic --set rotary1_pin_press GPIO
meshtastic --set rotary1_event_cw KEY_UP
meshtastic --set rotary1_event_ccw KEY_DOWN
meshtastic --set rotary1_event_press KEY_SELECT
meshtastic --set rotary1_enabled True
```
:::
That's it! With a functioning and enabled rotary encoder, you're ready to begin configuring the Canned Message Plugin.

View file

@ -6,47 +6,30 @@ sidebar_label: Channel
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
:::caution
:::warning
These settings are for advanced users only. If you don't know what you are doing you could damage your radio or break local radio laws. Proceed with caution.
:::
## Overview
Most
Most users should not need to change these settings. The default [modem_config](channel#modem_config) settings should work just fine.
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| bandwidth | | |
| channel_num | | |
| coding_rate | | |
| spread_factor | `7`, `8`, `9`, `10`, `11`, `12` | TODO |
| tx_power | `integer` (in dBm) | `0` |
| bandwidth | `10.4`, `15.6`, `20.8`, `31.25`, `41.7`, `62.5`, `125`, `250`, `500` | `125` |
| channel_num | Depends on Region | Region Channel Number Default |
| coding_rate | `5`, `6`, `7`, `8` | `5` |
| frequency_offset | real numbers | `0` |
| spread_factor | `7`, `8`, `9`, `10`, `11`, `12` | `7` |
| tx_power | `0`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15`, `16`, `17`, (dBm) | `0` |
### bandwidth
TODO
Total amount of spectrum used for the transmission.
### channel_num
TODO
### coding_rate
TODO
### spread_factor
TODO
### tx_power
TODO
## Examples
### Set Bandwidth
#### Set Bandwidth
<Tabs
groupId="settings"
@ -54,6 +37,8 @@ TODO
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -64,12 +49,32 @@ meshtastic --ch-set bandwidth 125 --ch-index 0
</TabItem>
<TabItem value="android">
TODO
:::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>
### Set Channel Number
### channel_num
An abstraction that maps to a specific center frequency used for transmission.
#### Set Channel Number
<Tabs
groupId="settings"
@ -77,20 +82,44 @@ meshtastic --ch-set bandwidth 125 --ch-index 0
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
TODO
:::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="android">
TODO
:::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>
### Set Coding Rate
### coding_rate
The amount of forward error correction applied to allow for us to automatically repair errors in the data transmission.
#### Set Coding Rate
<Tabs
groupId="settings"
@ -98,6 +127,8 @@ meshtastic --ch-set bandwidth 125 --ch-index 0
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -108,12 +139,32 @@ meshtastic --ch-set coding_rate 8 --ch-index 0
</TabItem>
<TabItem value="android">
TODO
:::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>
### Set Spread Factor
### frequency_offset
This parameter is for advanced users with advanced test equipment, we do not recommend most users use it. A frequency offset that is added to to the calculated band center frequency. Used to correct for crystal calibration errors.
#### Configure frequency_offset
<Tabs
groupId="settings"
@ -121,6 +172,53 @@ meshtastic --ch-set coding_rate 8 --ch-index 0
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
:::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="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>
### spread_factor
LoRa is a spread spectrum technology. spread_factor is how much the signal is spread over the spectrum. SF8 = 2^8 or spread 256 times. SF12 = 2^12 or spread 4096 times.
#### Set Spread Factor
<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">
@ -131,12 +229,38 @@ meshtastic --ch-set spread_factor 12 --ch-index 0
</TabItem>
<TabItem value="android">
TODO
:::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>
### Set TX Power
### tx_power
Configured transmit power out of the LoRa radio, measured in dBM. Setting this to `0` will use the device default which is the max legal continuous power for your region.
:::caution
Ensure that you are not exceeding your country's regulations.
`Country regulation - antenna gain = tx_power max setting`
:::
#### Set TX Power
<Tabs
groupId="settings"
@ -144,15 +268,38 @@ meshtastic --ch-set spread_factor 12 --ch-index 0
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
TODO
```bash title="Set Default"
meshtastic --ch-set tx_power 0 --ch-index 0
```
```bash title="Set to 2dBM"
meshtastic --ch-set tx_power 2 --ch-index 0
```
</TabItem>
<TabItem value="android">
TODO
:::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>

View file

@ -16,69 +16,234 @@ Channel settings are an integral part of the way your devices communicate across
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| downlink_enabled | `true`, `false` | `false` |
| id | `integer` | `0` |
| modem_config | `Bw125Cr45Sf128`, `Bw500Cr45Sf128`, `Bw31_25Cr48Sf512`, `Bw125Cr48Sf4096` | TODO |
| modem_config | `Bw125Cr45Sf128`, `Bw500Cr45Sf128`, `Bw31_25Cr48Sf512`, `Bw125Cr48Sf4096` | `Bw125Cr45Sf128` |
| name | `string` | `""` |
| psk | `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `none`, `default`, `random` | `1` |
| region | `Unset`, `US`, `EU433`, `EU865`, `CN`, `JP`, `ANZ`, `KR`, `TW`, `RU` | `Unset` |
| uplink_enabled | `true`, `false` | `false` |
### downlink_enabled
If `true`, messages seen on the internet will be forwarded to the local mesh through a gateway node. See [MQTT settings](mqtt) for more details.
:::caution
This is in active development and not ready for casual users. Testing only.
:::
### id
<!--- Used to construct a globally unique channel ID. The full globally unique ID will be: "name.id" where ID is shown as base36. Assuming that the number of meshtastic users is below 20K (true for a long time) the chance of this 64 bit random number colliding with anyone else is super low. And the penalty for collision is low as well, it just means that anyone trying to decrypt channel messages might need to try multiple candidate channels. Any time a non wire compatible change is made to a channel, this field should be regenerated. There are a small number of 'special' globally known (and fairly) insecure standard channels. Those channels do not have a numeric id included in the settings, but instead it is pulled from a table of well known IDs. (see Well Known Channels FIXME) --->
#### Set Channel ID
<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">
```bash title="Set the PRIMARY channel ID"
meshtastic --ch-set id 1234 --ch-index 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>
:::note
The channel `id` must be an integer.
:::
### modem_config
| Setting | Name | Bandwidth | Coding Rate | Spread Factor | Speed |
| Setting | Name (Range/Speed) | Bandwidth | Coding Rate | Spread Factor | Speed |
| :-----: | :--: | :-------: | :---------: | :-----------: | :-----: |
| `Bw125Cr45Sf128` | ShortSlow | 125 kHz | 4/5 | 7 = 128chips/symbol | 5.469 kbps |
| `Bw500Cr45Sf128` | ShortFast | 500 kHz | 4/5 | 7 = 128chips/symbol | 21.875 kbps |
| `Bw31_25Cr48Sf512` | LongFast | 31.25 kHz | 4/8 | 9 = 512chips/symbol | 275 bps |
| `Bw125Cr48Sf4096` | LongSlow | 125 kHz | 4/8 | 12 = 4096chips/symbol | 183 bps |
| `Bw500Cr45Sf128` | Short/Fast | 500 kHz | 4/5 | 7 = 128chips/symbol | 18.89 kbps |
| `Bw125Cr45Sf128` | Short/Slow | 125 kHz | 4/5 | 7 = 128chips/symbol | 4.69 kbps |
| `Bw250Cr47Sf1024` | Medium/Fast | 250 kHz | 4/7 | 10 = 1024chips/symbol | 1.2 kbps |
| `Bw250Cr46Sf2048` | Medium/Slow | 250 kHz | 4/6 | 11 = 2048chips/symbol | 0.75 kbps |
| `Bw31_25Cr48Sf512` | Long/Fast | 31.25 kHz | 4/8 | 9 = 512chips/symbol | 0.19 kbps |
| `Bw125Cr48Sf4096` | Long/Slow | 125 kHz | 4/8 | 12 = 4096chips/symbol | 0.13 kbps |
#### Set Modem
<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">
```bash title="Set Modem - LongSlow"
meshtastic --ch-set modem_config Bw125Cr48Sf4096 --ch-index 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>
:::tip
For advanced modem configuration, see [Channel Settings - Advanced](channel-advanced).
:::
### name
<!--- A SHORT name that will be packed into the URL. Less than 12 bytes. Something for end users to call the channel If this is the empty string it is assumed that this channel is the special (minimally secure) "Default"channel. In user interfaces it should be rendered as a local language translation of "X". For channel_num hashing empty string will be treated as "X". Where "X" is selected based on the English words listed above for ModemConfig --->
The name of the channel. If this is left an empty string it is assumed that this channel is the special (minimally secure) "Default" channel. Channel Names should be short (less than 12 bytes).
#### Set Channel Name
<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">
```bash title="Set channel name for the PRIMARY channel"
meshtastic --ch-set name MyChannel --ch-index 0
```
```bash title="Set channel name for the PRIMARY channel with spaces"
meshtastic --ch-set name "My Channel" --ch-index 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>
:::note
A channel `id` must be set in order to name a channel.
:::
### psk
<!--- TODO pick which psk description to keep --->
<!--- option A as documented in the protobufs --->
<!--- A simple pre-shared key for now for crypto. Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256). A special shorthand is used for 1 byte long psks. These psks should be treated as only minimally secure, because they are listed in this source code. Those bytes are mapped using the following scheme: 0 = No crypto 1 = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0xbf} 2 through 10 = The default channel key, except with 1 through 9 added to the last byte. Shown to user as simple1 through 10 --->
Selecting a number from the following table will use publicly known encryption keys. They're shipped with Meshtastic source code and thus, anyone can listen to messages encrypted by them. They're great for testing and public channels.
| Setting | Behavior |
| :-----: | :------: |
| `0` | Disable Encryption |
| `1` | Default Encryption |
| `2`-`10` | Default Encryption, except with 1-9 added to the last byte |
<!--- option B as documented in the python library --->
<!--- Use "--setchan psk none" to turn off encryption. Use "--setchan psk random" will assign a new (high quality) random AES256 key to the primary channel (similar to what the Android app does when making new channels). Use "--setchan psk default" to restore the standard 'default' (minimally secure, because it is in the source code for anyone to read) AES128 key. --->
:::note
Selecting a `default` or any of the `simple` values from the following table will use publicly known encryption keys. They're shipped with Meshtastic source code and thus, anyone can listen to messages encrypted by them. They're great for testing and public channels.
:::
| Setting | Behavior |
| :-----: | :------: |
| `none` | Disable Encryption |
| `default` | Default Encryption (use the weak encryption key) |
| `random` | Generate a secure 256-bit encryption key. Use this setting for private communication. |
| `simple0`- `simple254` | Uses a single byte encoding for encryption |
:::note
:::tip
If you use Meshtastic for exchanging messages you don't want other people to see, `random` is the setting you should use.
:::
#### Set/Disable Encryption
<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">
```bash title="Set encryption to default on PRIMARY channel"
meshtastic --ch-set psk default --ch-index 0
```
```bash title="Set encryption to random on PRIMARY channel"
meshtastic --ch-set psk random --ch-index 0
```
```bash title="Set encryption to single byte on PRIMARY channel"
meshtastic --ch-set psk simple15 --ch-index 0
```
```bash title="Set encryption to your own key on PRIMARY channel"
meshtastic --ch-set psk 0x1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b --ch-index 0
```
```bash title="Disable encryption on PRIMARY channel"
meshtastic --ch-set psk none --ch-index 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>
### region
The `region` variable sets which region your radio is configured to work in. It is important to ensure that you've set it to the correct region. If left `Unset`, it will default to `US` settings.
@ -99,139 +264,45 @@ The `region` variable sets which region your radio is configured to work in. It
For more details about `region` settings, you can see the source code [here](https://github.com/meshtastic/Meshtastic-device/blob/master/src/mesh/RadioInterface.cpp)
:::
### uplink_enabled
If `true`, messages on the mesh will be sent to the public internet by any gateway node. See [MQTT settings](mqtt) for more details.
## Examples
### Set Channel ID
#### Set Region
<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">
```bash title="Set the PRIMARY channel ID"
meshtastic --ch-set id 1234 --ch-index 0
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
:::note
The channel `id` must be an integer.
:::
### Set Channel Name
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Set channel name for the PRIMARY channel"
meshtastic --ch-set name MyChannel --ch-index 0
```
```bash title="Set channel name for the PRIMARY channel with spaces"
meshtastic --ch-set name "My Channel" --ch-index 0
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
:::note
A channel `id` must be set in order to name a channel.
:::
### Set Encryption
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Set psk"
meshtastic --ch-set psk default --ch-index 0
```
<!--- TODO random and none --->
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
:::note
See [`psk`](#psk) for details.
:::
### Set Modem
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Set Modem - LongSlow"
meshtastic --ch-set modem_config Bw125Cr48Sf4096 --ch-index 0
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
:::note
See [`modem_config`](#modem_config) for details. For advanced modem configuration, see [Channel Settings - Advanced](channel-advanced).
:::
### Set Region
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Set Region"
```bash title="Unset Region"
meshtastic --set region Unset
```
```bash title="Set Region"
meshtastic --set region US
```
</TabItem>
<TabItem value="android">
TODO
:::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>
<!--- TODO add downlink_enabled & uplink_enabled examples --->

View file

@ -6,61 +6,321 @@ sidebar_label: Environmental Measurement Plugin
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<!--- TODO add link to hardware setup to admonition--->
:::note
This plugin requires attaching a peripheral accessory to your device. It will not work without one.
:::
## Overview
The Environmental Measurement Plugin will allow you to connect environment sensors to report conditions to your mesh. Examples are temperature, humidity and gas pressure.
The Environment Measurement Plugin will allow nodes to send a specific message with information from connected environmental sensors. Currently supported sensors are BME280, BME680, DHT11, DHT12, DHT21, DHT22 and Dallas 1-wire DS18B20.
:::tip
Once plugin settings are changed, a **reset** is required for them to take effect.
:::
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| environmental_measurement_plugin_measurement_enabled | `true`, `false` | `false` |
| environmental_measurement_plugin_display_farenheit | `true`, `false` | `false` |
| environmental_measurement_plugin_measurement_enabled | `true`, `false` | `false` |
| environmental_measurement_plugin_read_error_count_threshold | `integer` | `0` |
| environmental_measurement_plugin_recovery_interval | `integer` (seconds) | `0` |
| environmental_measurement_plugin_screen_enabled | `true`, `false` | `0` |
| environmental_measurement_plugin_sensor_pin | `integer` | `0` |
| environmental_measurement_plugin_sensor_type | `DHT11` | `0` |
| environmental_measurement_plugin_sensor_type | `0-6` | `0` |
| environmental_measurement_plugin_update_interval | `integer` (seconds) | `0` |
### environmental_measurement_plugin_measurement_enabled
Enables the plugin.
### environmental_measurement_plugin_display_farenheit
The sensor is always read in Celsius, but the user can opt to view the temperature display in Fahrenheit using this setting.
#### Display Farenheit/Celsius
<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">
```bash title="Display Farenheit"
meshtastic --set environmental_measurement_plugin_display_farenheit true
```
```bash title="Display Celsius"
meshtastic --set environmental_measurement_plugin_display_farenheit 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>
### environmental_measurement_plugin_measurement_enabled
Enables the plugin.
#### Enable/Disable the plugin
<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">
```bash title="Enable Plugin"
meshtastic --set environmental_measurement_plugin_measurement_enabled true
```
```bash title="Disable Plugin"
meshtastic --set environmental_measurement_plugin_measurement_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>
### environmental_measurement_plugin_read_error_count_threshold
Sometimes sensor reads can fail. If this happens, we will retry a configurable number of attempts. Each attempt will be delayed by the minimum required refresh rate for that sensor
#### Configure environmental_measurement_plugin_read_error_count_threshold
<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">
```bash title="Configure environmental_measurement_plugin_read_error_count_threshold to 3 tries"
meshtastic --set environmental_measurement_plugin_read_error_count_threshold 3
```
</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>
### environmental_measurement_plugin_recovery_interval
Sometimes we can end up with more than read_error_count_threshold failures. In this case, we will stop trying to read from the sensor for a while. Wait this long until trying to read from the sensor again.
#### Configure environmental_measurement_plugin_recovery_interval
<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">
```bash title="Configure environmental_measurement_plugin_recovery_interval to 120 seconds"
meshtastic --set environmental_measurement_plugin_recovery_interval 120
```
</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>
### environmental_measurement_plugin_screen_enabled
Enable/Disable the environmental measurement plugin on-device display.
#### Enable/Disable the plugin on device screen
<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">
```bash title="Enable on device screen"
meshtastic --set environmental_measurement_plugin_screen_enabled true
```
```bash title="Disable on device screen"
meshtastic --set environmental_measurement_plugin_screen_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>
### environmental_measurement_plugin_sensor_pin
:::note
The preferred setup is using I2C, so the `environmental_measurement_plugin_sensor_pin` may not be needed.
:::
Specify the preferred GPIO Pin for sensor readings. May not be needed if using I2C.
#### Set plugin sensor pin
<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">
```bash title="Set plugin sensor pin"
meshtastic --set environmental_measurement_plugin_sensor_pin PINNUMBER
```
</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>
### environmental_measurement_plugin_sensor_type
Specify the sensor type.
### environmental_measurement_plugin_update_interval
| Value | Description | Sensor Features |
| :---: | :---------: | :-------------: |
| `0` | DHT11 | Temperature, Humidity |
| `1` | DS18B20 (Dallas 1-wire) | Temperature |
| `2` | DHT12 | Temperature, Humidity |
| `3` | DHT21 | Temperature, Humidity |
| `4` | DHT22 | Temperature, Humidity |
| `5` | BME280 | Temperature, Humidity, Pressure |
| `6` | BME680 | Temperature, Humidity, Pressure, VOC Gas |
| `7` | MCP9808 | Precision Temperature |
Interval in seconds of how often we should try to send our measurements to the mesh.
## Details
<!--- TODO --->
## Examples
#### Set sensor type
<Tabs
groupId="settings"
@ -69,33 +329,95 @@ Interval in seconds of how often we should try to send our measurements to the m
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'web', value: 'web'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
:::note
The CLI is able to take the `value` or the `name` of the sensor from the table above.
:::
```bash title="Set sensor type to DS18B20"
meshtastic --set environmental_measurement_plugin_sensor_type 1
```
meshtastic --set environmental_measurement_plugin_measurement_enabled true
meshtastic --set environmental_measurement_plugin_screen_enabled true
meshtastic --set environmental_measurement_plugin_update_interval 15
meshtastic --set environmental_measurement_plugin_display_farenheit true
meshtastic --set environmental_measurement_plugin_sensor_type 5
meshtastic --set environmental_measurement_plugin_sensor_type BME280
```bash title="Set sensor type to DS18B20"
meshtastic --set environmental_measurement_plugin_sensor_type DS18B20
```
</TabItem>
<TabItem value="android">
TODO
:::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">
TODO
:::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">
TODO
:::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>
### environmental_measurement_plugin_update_interval
Interval in seconds of how often we should try to send our measurements to the mesh.
#### Set plugin update interval
<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">
```bash title="Set plugin update interval to 15 seconds"
meshtastic --set environmental_measurement_plugin_update_interval 15
```
</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
### Hardware
The sensors can be wired differently, here's [one example](https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide) for sensor DS18B20.
### Known Problems
* No default configuration values are currently set, so this must be done when enabling the plugin.

View file

@ -6,67 +6,303 @@ sidebar_label: External Notification Plugin
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<!--- TODO add link to hardware setup to admonition--->
:::note
This plugin requires attaching a peripheral accessory to your device. It will not work without one.
:::
## Overview
The External Notification Plugin will allow you to connect a speaker, LED, or other device to notify you when a message has been received from the mesh network.
:::tip
Once plugin settings are changed, a **reset** is required for them to take effect.
:::
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| ext_notification_plugin_enabled | `true`, `false` | `false` |
| ext_notification_plugin_active | `true`, `false` | `false` |
| ext_notification_plugin_alert_bell | `true`, `false` | `false` |
| ext_notification_plugin_alert_message | `true`, `false` | `false` |
| ext_notification_plugin_enabled | `true`, `false` | `false` |
| ext_notification_plugin_output | `integer` | `0` |
| ext_notification_plugin_output_ms | `integer` | `0` |
### ext_notification_plugin_enabled
Enables the plugin.
| ext_notification_plugin_output_ms | `integer` (milliseconds) | `0` |
### ext_notification_plugin_active
<!--- TODO --->
### ext_notification_plugin_alert_bell
<!--- TODO --->
### ext_notification_plugin_alert_message
<!--- TODO --->
### ext_notification_plugin_output
<!--- TODO --->
### ext_notification_plugin_output_ms
<!--- TODO --->
## Details
<!--- TODO --->
## Examples
Specifies whether the external circuit is triggered when the device's GPIO is low or high.
#### Specify High/Low GPIO triggers circuit
<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">
TODO
```bash title="GPIO active high"
meshtastic --set ext_notification_plugin_active true
```
```bash title="GPIO active low (default)"
meshtastic --set ext_notification_plugin_active false
```
</TabItem>
<TabItem value="android">
TODO
:::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>
### ext_notification_plugin_alert_bell
Specifies if an alert should be sent when receiving an incoming bell.
#### Enable/Disable alert on incoming bell
<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">
```bash title="Enable alert on incoming bell"
meshtastic --set ext_notification_plugin_alert_bell true
```
```bash title="Disable alert on incoming bell"
meshtastic --set ext_notification_plugin_alert_bell 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>
### ext_notification_plugin_alert_message
Specifies if an alert should be sent when receiving an incoming message.
#### Enable/Disable Alert on incoming message
<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">
```bash title="Enable alert on incoming message"
meshtastic --set ext_notification_plugin_alert_message true
```
```bash title="Disable alert on incoming message"
meshtastic --set ext_notification_plugin_alert_message 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>
### ext_notification_plugin_enabled
Enables the plugin.
#### Enable/Disable the plugin
<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">
```bash title="Enable Plugin"
meshtastic --set ext_notification_plugin_enabled true
```
```bash title="Disable Plugin"
meshtastic --set ext_notification_plugin_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>
### ext_notification_plugin_output
Specifies the GPIO that your external circuit is attached to on the device.
#### Specify GPIO for circuit to monitor
<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">
:::note
Replace `GPIO` in the below command with the GPIO number your circuit is attached to.
:::
```bash title="Specify GPIO that circuit is connected to"
meshtastic --set ext_notification_plugin_output GPIO
```
</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>
### ext_notification_plugin_output_ms
Specifies how long in milliseconds you would like your external circuit triggered. Default is `1000`. (Because of the way that defaults are handled in the protobufs `0` is interpreted as `1000`)
#### Specify how many milliseconds to trigger circuit
<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">
```bash title="Set to default (1000ms)"
meshtastic --set ext_notification_plugin_output_ms 0
```
```bash title="Set to other value"
meshtastic --set ext_notification_plugin_output_ms 1500
```
</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>

View file

@ -19,12 +19,16 @@ GPS is provided by either the device or your paired phone. More than likely, you
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| fixed_position | `true`, `false` | `false` |
| gps_accept_2d | `true`, `false` | `false` |
| gps_attempt_time | `integer` (seconds) | `0` (see note) |
| gps_format | `GpsFormatDec`, `GpsFormatDMS`, `GpsFormatUTM`, `GpsFormatMGRS`, `GpsFormatOLC`, `GpsFormatOSGR` | `GpsFormatDec` |
| gps_max_dop | `integer` | `0` |
| gps_operation | `GpsOpUnset`, ~~`GpsOpStationary`~~, `GpsOpMobile`, `GpsOpTimeOnly`, `GpsOpDisabled` | `GpsOpUnset` |
| gps_update_interval | `integer` (seconds) | `0` (see note) |
| location_share | `LocUnset`, `LocEnabled`, `LocDisabled` | `LocUnset` |
| position_broadcast_secs | `integer` (seconds) | `0` (see note) |
| position_broadcast_smart | `true`, `false` | `false` |
| position_flags | `POS_UNDEFINED`, `POS_ALTITUDE`, `POS_ALT_MSL`, `POS_GEO_SEP`, `POS_DOP`, `POS_HVDOP`, `PDOP`, `POS_BATTERY`, `POS_SATINVIEW`, `POS_SEQ_NOS`, `POS_TIMESTAMP` | `POS_UNDEFINED` |
:::note
On `gps_attempt_time`, `gps_update_interval`, & `position_broadcast_secs` when you set these to `0` you are not disabling these features.
@ -38,10 +42,294 @@ If you wish to disable any GPS features, see below for more information.
If set, this node is at a fixed position. The device will generate GPS updates at the regular `gps_update_interval`, but use whatever the last lat/lon/alt it saved for the node. The lat/lon/alt can be set by an internal GPS or with the help of the mobile device's GPS.
#### Set/Unset Fixed Position
<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">
```bash title="Set Fixed Position - Current Location"
meshtastic --set fixed_position true
```
:::note
The device will continue to acquire GPS coordinates according to the `gps_update_interval`, but will use the last saved coordinates as its fixed point.
:::
```bash title="Set Fixed Position - User Defined"
meshtastic --setlat 37.8651 --setlon -119.5383
```
```bash title="Unset Fixed Position"
meshtastic --set fixed_position false
```
:::note
It may take some time to see that the change has taken effect. The GPS location is updated according to the value specified on `gps_update_interval` and the mesh will be notified of the new position in relation to the `position_broadcast_secs` value.
:::
</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>
### gps_accept_2d
Determines whether the device should accept 2D GPS fixes. By default, only 3D fixes are accepted (during a 2D fix, altitude values are unreliable and will be excluded).
#### Enable/Disable 2D GPS Fixes
<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">
```bash title="Enable 2D GPS Fixes"
meshtastic --set gps_accept_2d true
```
```bash title="Disable 2D GPS Fixes"
meshtastic --set gps_accept_2d 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>
### gps_attempt_time
Determines the amount of time that a GPS fix should be allowed to take. The default is every 30 seconds. If you increase this value, it will allow the device that amount of time in seconds to acquire coordinates. If the device is unable to get a fix, it will turn off until the next interval. GPS coordinates are updated every [`gps_update_interval`](#gps_update_interval) seconds.
#### Change GPS attempt time frequency
<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">
```bash title="Set GPS attempt time to default (30 seconds)"
meshtastic --set gps_attempt_time 0
```
```bash title="Set GPS attempt time to 45 seconds"
meshtastic --set gps_attempt_time 45
```
</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>
### gps_format
Determines how the GPS coordinates are displayed on the OLED screen.
| Value | Description |
| :---: | :---------: |
| GpsFormatDec | GPS coordinates are displayed in the normal decimal degrees format: DD.DDDDDD DDD.DDDDDD |
| GpsFormatDMS | GPS coordinates are displayed in the degrees minutes seconds format: DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant |
| GpsFormatUTM | GPS coordinates are displayed in Universal Transverse Mercator format: ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing |
| GpsFormatMGRS | GPS coordinates are displayed in Military Grid Reference System format: ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square, E is easting, N is northing |
| GpsFormatOLC | GPS coordinates are displayed in Open Location Code (aka Plus Codes) |
| GpsFormatOSGR | GPS coordinates are displayed in Ordnance Survey Grid Reference (the National Grid System of the UK). Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square, E is the easting, N is the northing |
#### Specify GPS Screen Display
<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">
```bash title="Specify GPS format on device screen"
meshtastic --set gps_format GpsFormatUTM
```
</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>
### gps_max_dop
Determines GPS maximum DOP accepted (dilution of precision) Set a rejection threshold for GPS readings based on their precision, relative to the GPS rated accuracy (which is typically ~3m) Solutions above this value will be treated as retryable errors! Useful range is between 1 - 64 (3m - <~200m) By default (if zero), accept all GPS readings
#### Change maximum GPS dilution of precision
<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">
```bash title="Set GPS max DOP to default (accept all GPS readings)"
meshtastic --set gps_max_dop 0
```
```bash title="Set GPS max DOP to 3m"
meshtastic --set gps_max_dop 1
```
```bash title="Set GPS max DOP to < ~200m"
meshtastic --set gps_max_dop 64
```
</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>
#### Specify GPS Screen Display
<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">
```bash title="Specify GPS format on device screen"
meshtastic --set gps_format GpsFormatUTM
```
</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>
### gps_operation
How the GPS hardware in the device is operated.
@ -58,10 +346,103 @@ This is independent of how our location is shared with other devices. For that s
| GpsOpTimeOnly | We should only use the GPS to get time (no location data should be acquired/stored) Once we have the time we treat `gps_update_interval` as MAXINT (i.e. sleep forever) |
| GpsOpDisabled | GPS is always turned off - this mode is not recommended - use `GpsOpTimeOnly` instead. |
#### Enable/Disable GPS
<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">
```bash title="Set GPS to default settings"
meshtastic --set gps_operation GpsOpUnset
```
```bash title="Set GPS to only be used for time"
meshtastic --set gps_operation GpsOpTimeOnly
```
```bash title="Disable GPS Completely"
meshtastic --set gps_operation GpsOpDisabled
```
</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>
:::note
`gps_operation GpsOpTimeOnly` is preferred to `gps_operation GpsOPDisabled` because it allows the device to get a hi-res time.
:::
### gps_update_interval
Determines how often should the device should attempt to acquire a GPS position (in seconds). The length of time the device is allowed to attempt to acquire GPS coordinates each interval is set using [`gps_attempt_time`](#gps_attempt_time). The default is every 30 seconds.
#### Specify GPS update interval
<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">
```bash title="Set GPS update interval to default settings (every 30 seconds)"
meshtastic --set gps_update_interval 0
```
```bash title="Set GPS update interval to every 45 seconds"
meshtastic --set gps_update_interval 45
```
</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>
### location_share
Determines whether location is shared with other nodes. See more details.
@ -72,12 +453,99 @@ Determines whether location is shared with other nodes. See more details.
| LocEnabled | The device is sharing its location (or the paired phone's location) |
| LocDisabled | The device is not sharing its location (if the unit has a GPS it will default to only get time - i.e. [`GpsOpTimeOnly`](#gps_operation)) |
#### Disable Location Sharing
<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">
```bash title="Disable Location Sharing"
meshtastic --set location_share LocDisabled
```
</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>
:::note
Disabling location sharing does not disable the GPS functionality, only the location sharing via the mesh.
:::
### position_broadcast_secs
How often our position is sent to the mesh (but only if it has changed significantly).
The GPS updates will be sent out every `position_broadcast_secs`, with either the actual GPS location, or an empty location if no GPS fix was achieved. This defaults to broadcast every 15 minutes.
#### Specify GPS position broadcast frequency
<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">
```bash title="Set GPS update interval to default settings (every 15 minutes)"
meshtastic --set position_broadcast_secs 0
```
```bash title="Set GPS update interval to every 60 seconds"
meshtastic --set position_broadcast_secs 60
```
</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>
### position_broadcast_smart
`position_broadcast_smart` will send out your position at an increased frequency only if your location has changed enough for a position update to be useful.
@ -99,132 +567,113 @@ The table below is a summary computed values from the algorithm.
| Short Range / Slow | 30 | 30 |
| Short Range / Fast | 30 | 30 |
Note: A person walking in a straight line will take about 90 seconds to travel 150 meters. That walking speed estimate was used as the baseline for the formula used.
## Examples
### Disable GPS Completely
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Disable GPS Completely"
meshtastic --set gps_operation GpsOpDisabled
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
:::note
`gps_operation GpsOpTimeOnly` is preferred to `gps_operation GpsOPDisabled` because it allows the device to get a hi-res time.
:::tip
A person walking in a straight line will take about 90 seconds to travel 150 meters. That walking speed estimate was used as the baseline for the formula used.
:::
### Disable Location Sharing
#### Enable/Disable Smart Position Broadcast
<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">
```bash title="Disable Location Sharing"
meshtastic --set location_share LocDisabled
```bash title="Enable smart position broadcast"
meshtastic --set position_broadcast_smart true
```
```bash title="Disable smart position broadcast"
meshtastic --set position_broadcast_smart false
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
:::note
Disabling location sharing does not disable the GPS functionality, only the location sharing via the mesh.
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
### Set Fixed Position Current Lat/Lon
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Set Fixed Position"
meshtastic --set fixed_position true
```
</TabItem>
<TabItem value="android">
<TabItem value="iOS">
TODO
</TabItem>
</Tabs>
:::note
The device will continue to acquire GPS coordinates according to the `gps_update_interval`, but will use the last saved coordinates as its fixed point.
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
### Set Fixed Position Specify Lat/Lon
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Set Fixed Position"
meshtastic --setlat 37.8651 --setlon -119.5383
```
</TabItem>
<TabItem value="android">
<TabItem value="web">
TODO
</TabItem>
</Tabs>
### Unset Fixed Position
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Unset Fixed Position"
meshtastic --set fixed_position false
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
:::note
It may take some time to see that the change has taken effect. The GPS location is updated according to the value specified on `gps_update_interval` and the mesh will be notified of the new position in relation to the `position_broadcast_secs` value.
:::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>
### position_flags
Bit field of boolean configuration options for POSITION messages (bitwise OR of PositionFlags)
| Value | Description |
| :---: | :---------: |
| POS_UNDEFINED | Required for compilation |
| POS_ALTITUDE | Include an altitude value (if available) |
| POS_ALT_MSL | Altitude value is MSL |
| POS_GEO_SEP | Include geoidal separation |
| POS_DOP | Include the DOP value ; PDOP used by default, see below |
| POS_HVDOP | If POS_DOP set, send separate HDOP / VDOP values instead of | PDOP
| POS_BATTERY | Include battery level |
| POS_SATINVIEW | Include number of "satellites in view" |
| POS_SEQ_NOS | Include a sequence number incremented per packet |
| POS_TIMESTAMP | Include positional timestamp (from GPS solution) |
#### Set/Unset Position Flags
<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">
:::tip
Include each flag desired from the table above separated by a single space.
:::
```bash title="Set Position Flags"
meshtastic --pos-fields POS_ALTITUDE POS_ALT_MSL
```
```bash title="Unset Position Flags"
meshtastic --pos-fields POS_UNDEFINED
```
</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>

View file

@ -0,0 +1,88 @@
---
id: ham
title: Licensed (HAM) Operation
sidebar_label: Licensed (HAM) Operation
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
:::warning
By changing these settings, you are self certifying that you are licensed to operate in the mode you have chosen. Failure to comply with your local regulations may result in fines.
:::
## Overview
:::note
This written US only, may or may not be applicable elsewhere.
:::
Meshtastic can be used by both unlicensed people and licensed operators. If you use Meshtastic with your ham radio license, there are additional privileges and restrictions to consider.
| Privileges | Restrictions |
|:----------:|:------------:|
| <ul><li>Additional Power</li><li>Higher gain antennas</li></ul> | <ul><li>Unencrypted</li><li>Identified with your ID</li></ul> |
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| set-ham | `string`| `""`|
### set-ham
If you are a licensed HAM operator, you can set this variable to be your ID.
:::warning
By changing these settings, you are self certifying that you are licensed to operate in the mode you have chosen. Failure to comply with your local regulations may result in fines.
:::
#### Set HAM ID
<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">
```bash title="Set HAM ID"
meshtastic --set-ham KI1345
```
</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
Toggling `set-ham` changes your device settings in the following ways.
| Setting | `set-ham` Default | Normal Default |
| :-----: | :-----------------: | :------------: |
| `is_licensed` (Protobuf) | `true` | `false` |
| `long_name` (Protobuf) | `id` | User Defined |
| `psk` (Protobuf) | `""` | See [Channel Settings - psk](channel#psk) |
| `short_name` (Protobuf) | TODO | User Defined |

View file

@ -15,91 +15,115 @@ import TabItem from '@theme/TabItem';
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| auto_screen_carousel_secs | `integer` (seconds) | `0` |
| debug_log_enabled | `true`, `false` | `false` |
| factory_reset | `true`, `false` | `false` |
| frequency_offset | real numbers | `0` |
| ignore_incoming | `string` list of node nums to ignore | `0` |
| hop_limit | `0`-`7` | `0` |
| serial_disabled | `true`, `false` | `false` |
| hop_limit | real numbers | 0|
### auto_screen_carousel_secs
Automatically toggles to the next page on the screen like a carousel, based the specified interval in seconds. Potentially useful for devices without user buttons.
#### Configure auto_screen_carousel_secs
<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">
```bash title="Set auto_screen_carousel_secs to default"
meshtastic --set auto_screen_carousel_secs 0
```
```bash title="Set auto_screen_carousel_secs to 120 seconds"
meshtastic --set auto_screen_carousel_secs 120
```
</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>
### debug_log_enabled
By default we turn off logging as soon as an API client connects (to keep shared serial link quiet and save bandwidth). Set this to true to leave the debug log outputting even when API is active.
#### Enable/Disable Debug Log
<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">
```bash title="Enable debug log"
meshtastic --set debug_log_enabled true
```
```bash title="Disable debug log"
meshtastic --set debug_log_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>
### factory_reset
This setting is never saved to disk, but if set, all device settings will be returned to factory defaults. (Region, serial number etc... will be preserved)
### frequency_offset
This parameter is for advanced users with advanced test equipment, we do not recommend most users use it. A frequency offset that is added to to the calculated band center frequency. Used to correct for crystal calibration errors.
### ignore_incoming
If true, radio should not try to be smart about what packets to queue to the phone bool keep_all_packets = 101; If true, we will try to capture all the packets sent on the mesh, not just the ones destined to our node. bool promiscuous_mode = 102; For testing it is useful sometimes to force a node to never listen to particular other nodes (simulating radio out of range). All nodenums listed in ignore_incoming will have packets they send dropped on receive (by router.cpp)
### serial_disabled
If set, this will disable the SerialConsole by not initializing the StreamAPI.
### hop_limit
Overrides the default number of hops a message will be passed. If not set, will default to 3 hops.
Meshtastic allows a maximum of 7 hops (this is a limit of the protocol). Setting a hop_limit of greater than 7 will be replaced with 7 on the device.
## Examples
### Debug Log - Disable
:::note
`debug_log_enabled` set to `false` is the default behavior.
:::
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Example - Disable debug log"
meshtastic --set debug_log_enabled false
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
### Debug Log - Enable
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Example - Enable debug log"
meshtastic --set debug_log_enabled true
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
### Factory reset
#### Factory reset
<Tabs
groupId="settings"
@ -107,6 +131,8 @@ Meshtastic allows a maximum of 7 hops (this is a limit of the protocol). Setting
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -117,101 +143,171 @@ Meshtastic allows a maximum of 7 hops (this is a limit of the protocol). Setting
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
### Frequency Offset
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
TODO
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
### Ignore Incoming
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
TODO
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
### Serial - Disable
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Example - Disable serial"
meshtastic --set disable_serial true
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>
### Serial - Enable
:::note
`disable_serial` set to `false` is the default behavior.
:::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>
### ignore_incoming
If true, radio should not try to be smart about what packets to queue to the phone bool keep_all_packets = 101; If true, we will try to capture all the packets sent on the mesh, not just the ones destined to our node. bool promiscuous_mode = 102; For testing it is useful sometimes to force a node to never listen to particular other nodes (simulating radio out of range). All nodenums listed in ignore_incoming will have packets they send dropped on receive (by router.cpp)
#### Enable/Disable ignore_incoming
<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">
```bash title="Example - Enable serial"
meshtastic --set disable_serial false
```bash title="Enable ignore_incoming"
meshtastic --set ignore_incoming true
```
```bash title="Disable ignore_incoming"
meshtastic --set ignore_incoming false
```
</TabItem>
<TabItem value="android">
TODO
:::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>
### serial_disabled
If set, this will disable the SerialConsole by not initializing the StreamAPI.
#### Enable/Disable Serial
<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">
```bash title="Enable serial"
meshtastic --set serial_disabled false
```
```bash title="Disable serial"
meshtastic --set serial_disabled true
```
</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>
### hop_limit
Overrides the default number of hops a message will be passed. If not set, will default to 3 hops.
:::note
Meshtastic allows a maximum of 7 hops (this is a limit of the protocol). Setting a hop_limit of greater than 7 will be replaced with 7 on the device.
:::
#### Configure hop_limit
<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">
```bash title="Set hop_limit to default (3 hops)"
meshtastic --set hop_limit 0
```
```bash title="Set hop_limit to max (7 hops)"
meshtastic --set hop_limit 7
```
</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>

View file

@ -24,27 +24,372 @@ Be sure to checkout this [MQTT](https://meshtastic.org/docs/software/other/mqtt)
## Settings
| Setting | Acceptable Values | Default |
| :-----------------: | :---------------: | :-----: |
| :-----: | :---------------: | :-----: |
| downlink_enabled | `true`, `false` | `false` |
| mqtt_disabled | `true`, `false` | `false` |
| mqtt_encryption_enabled | `true`, `false` | `false` |
| mqtt_password | `string` | `""` |
| mqtt_server | `string` | `""` |
| is_uplink_enabled | `true`, `false` | `false` |
| is_downlink_enabled | `true`, `false` | `false` |
| mqtt_username | `string` | `""` |
| uplink_enabled | `true`, `false` | `false` |
### downlink_enabled
This is a channel specific setting. If your channel has this set to `true` and you are connected to WiFi, the device will forward along messages from the MQTT server specified [here](#mqtt_server) to the mesh from this device.
#### Enable/Disable downlink_enabled
<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">
```bash title="Enable downlink_enabled on PRIMARY channel"
meshtastic --ch-set downlink_enabled true --ch-index 0
```
```bash title="Disable downlink_enabled on PRIMARY channel"
meshtastic --ch-set downlink_enabled false --ch-index 0
```
```bash title="Enable downlink_enabled on OTHER channel"
meshtastic --ch-set downlink_enabled true --ch-index 1
```
```bash title="Disable downlink_enabled on OTHER channel"
meshtastic --ch-set downlink_enabled false --ch-index 1
```
</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>
### mqtt_disabled
If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as `is_uplink_enabled` or `is_downlink_enabled`. But if this flag is set, all MQTT features will be disabled and no servers will be contacted.
If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as `uplink_enabled` or `downlink_enabled`. But if this flag is set, all MQTT features will be disabled and no servers will be contacted.
#### Enable/Disable MQTT
<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">
```bash title="Enable MQTT (Default)"
meshtastic --set mqtt_disabled false
```
```bash title="Disable MQTT"
meshtastic --set mqtt_disabled true
```
</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>
### mqtt_encryption_enabled
Determines whether or not the device sends the packets encrypted to/from your MQTT server.
:::tip
If you are using the default Meshtastic MQTT server, this setting will take no effect. All packets will continue to be encrypted regardless of this setting. Only custom servers will honor this setting.
:::
#### Enable/Disable MQTT Encryption
<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">
```bash title="Enable MQTT Encryption (Default)"
meshtastic --set mqtt_encryption_enabled false
```
```bash title="Disable MQTT Encryption"
meshtastic --set mqtt_encryption_enabled true
```
</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>
### mqtt_password
MQTT password to use (most useful for a custom MQTT server). If using a custom server, this will be honoured even if empty. If using the default server, this will only be honoured if set, otherwise the device will use the default password `large4cats`.
#### Configure mqtt_password
<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">
```bash title="Set mqtt_password"
meshtastic --set mqtt_password mypassword
```
```bash title="Set mqtt_password (with spaces)"
meshtastic --set mqtt_password "my password"
```
```bash title="Unset mqtt_password (Default)"
meshtastic --set mqtt_password ""
```
</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>
### mqtt_server
The server to use for our MQTT global message gateway feature. If not set, the default server will be used
### is_uplink_enabled
#### Enable/Disable MQTT Server
<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">
This is a channel specific setting. If your channel has this set to `true` and you are connected to WiFi, the device will forward along messages to whatever MQTT server is specified in `mqtt_server`.
:::tip
When the mqtt_server is set to `""`, it will default to `mqtt.meshtastic.org`
:::
### is_downlink_enabled
```bash title="Enable MQTT Server - Public Meshtastic MQTT Server (Default)"
meshtastic --set mqtt_server ""
```
```bash title="Enable MQTT Server - Personal MQTT Server (by IP)"
meshtastic --set mqtt_server 198.168.0.2
```
```bash title="Enable MQTT Server - Personal MQTT Server (by URL)"
meshtastic --set mqtt_server mqtt.mydomain.com
```
This is a channel specific setting. If your channel has this set to `true` and you are connected to WiFi, the device will forward along messages from the MQTT server to the mesh from this device.
</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>
### mqtt_username
MQTT username to use (most useful for a custom MQTT server). If using a custom server, this will be honoured even if empty. If using the default server, this will only be honoured if set, otherwise the device will use the default username `meshdev`.
#### Configure mqtt_username
<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">
```bash title="Set mqtt_username"
meshtastic --set mqtt_username myusername
```
```bash title="Set mqtt_username (with spaces)"
meshtastic --set mqtt_username "my username"
```
```bash title="Unset mqtt_username (Default)"
meshtastic --set mqtt_username ""
```
</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>
### uplink_enabled
This is a channel specific setting. If your channel has this set to `true` and you are connected to WiFi, the device will forward along messages to whatever MQTT server is specified in [mqtt_server](#mqtt_server).
#### Enable/Disable uplink_enabled
<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">
```bash title="Enable uplink_enabled on PRIMARY channel"
meshtastic --ch-set uplink_enabled true --ch-index 0
```
```bash title="Disable uplink_enabled on PRIMARY channel"
meshtastic --ch-set uplink_enabled false --ch-index 0
```
```bash title="Enable uplink_enabled on OTHER channel"
meshtastic --ch-set uplink_enabled true --ch-index 1
```
```bash title="Disable uplink_enabled on OTHER channel"
meshtastic --ch-set uplink_enabled false --ch-index 1
```
</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
@ -58,6 +403,8 @@ defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -79,7 +426,23 @@ FIXME some documentation says msh/# , some says mesh/# . As of 1.2.39 the messag
</TabItem>
<TabItem value="android">
TODO
:::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>

View file

@ -39,6 +39,8 @@ At the bottom of each setting page, examples will be available displaying how to
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -53,7 +55,23 @@ The CLI examples will require you to utilize the Command line Interface that is
</TabItem>
<TabItem value="android">
TODO
:::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>

View file

@ -11,29 +11,21 @@ import TabItem from '@theme/TabItem';
Power settings on a Meshtastic device can be set like other user-define settings with the `--set` command see ([see Meshtastic-python](/docs/software/python/python-cli)). Some of these options are implicit in other commands. For example, when you set the device to router mode using `is_router true`, it is implied that deep sleep is disabled and we want to constantly listen for messages. Below is a list of all user-definable settings and the acceptable values that these settings can use.
For example, if we wanted to disable sleep mode, like when we put the device into router mode, we could use the command:
```bash
meshtastic --set mesh_sds_timeout_secs 4294967295
```
:::note
See MAXUINT from `mesh_sds_timeout_secs` below:
:::
For a description and more information on what exactly all of these mean, please refer to [Power Management State Machine](/docs/software/other/power)
## Settings
| Setting | Acceptable Values | Default |
| :-------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| :-----: | :---------------: | :-----: |
| charge_current | `MAUnset`, `MA100`, `MA190`, `MA280`, `MA360`, `MA450`, `MA550`, `MA630`, `MA700`, `MA780`, `MA880`, `MA960`, `MA1000`, `MA1080`, `MA1160`, `MA1240`, `MA1320`: | `MAUnset` |
| is_low_power | `true`, `false` | `false` | If set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in we should try to minimize power consumption as much as possible. YOU DO NOT NEED TO SET THIS IF YOU'VE set is_router (it is implied in that case). |
| is_always_powered | `true`, `false` | `false` |
| is_low_power | `true`, `false` | `false` |
| is_router | `true`, `false` | `false` |
| ls_secs | `integer` (seconds) | `0` (see note) |
| ls_secs | `integer` (seconds) | `0` |
| mesh_sds_timeout_secs | `integer` (seconds) | `0` |
| min_wake_secs | `integer` (seconds) | `0` |
| phone_sds_timeout_sec | `integer` (seconds) | `0` | Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of two hours, use the value of MAXUINT or 4294967295 to disable |
| on_battery_shutdown_after_secs | `integer` (seconds) | `0` |
| phone_sds_timeout_sec | `integer` (seconds) | `0` |
| phone_timeout_secs | `integer` (seconds) | `0` |
| screen_on_secs | `integer` (seconds) | `0` |
| sds_secs | `integer` (seconds) | `0` |
@ -41,7 +33,7 @@ For a description and more information on what exactly all of these mean, please
| wait_bluetooth_secs | `integer` (seconds) | `0` |
:::note
When you the following settings to `0` they assume the following defaults:
When you change the following settings to `0` they assume the following defaults:
- `ls_secs`: 1 hour
- `mesh_sds_timeout_secs`: 2 hours
@ -55,59 +47,9 @@ When you the following settings to `0` they assume the following defaults:
### charge_current
Sets the current of the battery charger
Sets the current of the battery charger.
### is_low_power
If set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in we should try to minimize power consumption as much as possible. YOU DO NOT NEED TO SET THIS IF YOU'VE set is_router (it is implied in that case).
### is_router
Are we operating as a router. Changes behavior in the following ways: The device will only sleep for critically low battery level (i.e. always tries to stay alive for the mesh) In the future routing decisions will preferentially route packets through nodes with this attribute (because assumed good line of sight)
### ls_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of 3600
### mesh_sds_timeout_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable
### min_wake_secs
Power management state machine option. See the [power page](/docs/software/other/power)for details. 0 for default of 10 seconds
### phone_sds_timeout_sec
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable
### phone_timeout_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of 15 minutes
### screen_on_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of one minute.
### sds_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of one year
### send_owner_interval
This sets how often to send the database of node owner information with other nodes in the mesh (per mesh network ping).
For instance the default interval of 4 will send the node owner information for every 4 mesh network pings. This information is also transmitted after the node first boots up.
### wait_bluetooth_secs
Wait number of seconds for Bluetooth - Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of 1 minute
### is_always_powered
If the device is plugged into the wall (not from battery), you may consider using this setting to always keep the device from sleeping. This is a useful setting if you are on ESP32 and using the Wifi options.
## Examples
#### Specify charge_current
<Tabs
groupId="settings"
@ -115,27 +57,667 @@ defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
```bash
meshtastic --set mesh_sds_timeout_secs 0
```bash title="Unset charge current"
meshtastic --set charge_current MAUnset
```
Note: Probably only want to set the wait_bluetooth_secs this high during testing:
```bash
meshtastic --set wait_bluetooth_secs 28800
```
```bash
meshtastic --set is_always_powered true
```bash title="Set charge current"
meshtastic --set charge_current MA100
```
</TabItem>
<TabItem value="android">
TODO
:::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>
### is_always_powered
Circumvents the logic block for determining whether the device is powered or not. Useful for devices with finicky ADC issues on the battery sense pins.
#### Enable/Disable is_always_powered
<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">
```bash title="Enable is_always_powered"
meshtastic --set is_always_powered true
```
```bash title="Disable is_always_powered"
meshtastic --set is_always_powered 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>
### is_low_power
If set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in we should try to minimize power consumption as much as possible.
:::note
You do **not** need to set this if you've set `is_router` (it is implied in that case).
:::
#### Enable/Disable is_low_power
<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">
```bash title="Enable is_low_power"
meshtastic --set is_low_power true
```
```bash title="Disable is_low_power"
meshtastic --set is_low_power 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>
### is_router
Are we operating as a router. Changes behavior in the following ways: The device will only sleep for critically low battery level (i.e. always tries to stay alive for the mesh) In the future routing decisions will preferentially route packets through nodes with this attribute (because assumed good line of sight).
#### Enable/Disable is_router
<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">
```bash title="Enable is_router"
meshtastic --set is_router true
```
```bash title="Disable is_router"
meshtastic --set is_router 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>
### ls_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of 3600.
#### Configure ls_secs
<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">
```bash title="Set ls_secs to default (1 hour/3600 seconds)"
meshtastic --set ls_secs 0
```
```bash title="Set ls_secs to 120 seconds"
meshtastic --set ls_secs 120
```
</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>
### mesh_sds_timeout_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable.
#### Configure mesh_sds_timeout_secs
<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">
```bash title="Set mesh_sds_timeout_secs to default (2 hour/7200 seconds)"
meshtastic --set mesh_sds_timeout_secs 0
```
```bash title="Set mesh_sds_timeout_secs to 120 seconds"
meshtastic --set mesh_sds_timeout_secs 120
```
```bash title="Disable mesh_sds_timeout_secs (using MAXUINT)"
meshtastic --set mesh_sds_timeout_secs 4294967295
```
</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>
### min_wake_secs
Power management state machine option. See the [power page](/docs/software/other/power)for details. 0 for default of 10 seconds.
#### Configure min_wake_secs
<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">
```bash title="Set min_wake_secs to default (10 seconds)"
meshtastic --set min_wake_secs 0
```
```bash title="Set min_wake_secs to 120 seconds"
meshtastic --set min_wake_secs 120
```
</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>
### on_battery_shutdown_after_secs
If non-zero, the device will fully power off this many seconds after external power is removed.
#### Enable/Disable on_battery_shutdown_after_secs
<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">
```bash title="Disable on_battery_shutdown_after_secs"
meshtastic --set on_battery_shutdown_after_secs 0
```
```bash title="Set device to shutdown after 120 seconds on battery"
meshtastic --set on_battery_shutdown_after_secs 120
```
</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>
### phone_sds_timeout_sec
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable.
#### Enable/Disable phone_sds_timeout_sec
<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">
```bash title="Set phone_sds_timeout_sec to default (2 hours)"
meshtastic --set phone_sds_timeout_sec 0
```
```bash title="Disable phone_sds_timeout_sec"
meshtastic --set phone_sds_timeout_sec 4294967295
```
```bash title="Set phone_sds_timeout_sec to 120 seconds"
meshtastic --set phone_sds_timeout_sec 120
```
</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>
### phone_timeout_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of 15 minutes.
#### Configure phone_timeout_secs
<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">
```bash title="Set phone_timeout_secs to default (15 minutes)"
meshtastic --set phone_timeout_secs 0
```
```bash title="Set phone_timeout_secs to 120 seconds"
meshtastic --set phone_timeout_secs 120
```
</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>
### screen_on_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of one minute.
#### Configure screen_on_secs
<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">
```bash title="Set screen_on_secs to default (1 minute)"
meshtastic --set screen_on_secs 0
```
```bash title="Set screen_on_secs to 120 seconds"
meshtastic --set screen_on_secs 120
```
</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>
### sds_secs
Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of one year.
#### Configure sds_secs
<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">
```bash title="Set sds_secs to default (1 year)"
meshtastic --set sds_secs 0
```
```bash title="Set sds_secs to 120 seconds"
meshtastic --set sds_secs 120
```
</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>
### send_owner_interval
This sets how often to send the database of node owner information with other nodes in the mesh (per mesh network ping).
#### Configure send_owner_interval
<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">
```bash title="Set send_owner_interval to default (every 4 network pings)"
meshtastic --set send_owner_interval 0
```
```bash title="Set send_owner_interval to every 10 network pings"
meshtastic --set send_owner_interval 10
```
</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>
For instance the default interval of 4 will send the node owner information for every 4 mesh network pings. This information is also transmitted after the node first boots up.
### wait_bluetooth_secs
Wait number of seconds for Bluetooth - Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of 1 minute.
#### Configure wait_bluetooth_secs
<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">
```bash title="Set wait_bluetooth_secs to default (60 seconds)"
meshtastic --set wait_bluetooth_secs 0
```
```bash title="Set wait_bluetooth_secs to 120 seconds"
meshtastic --set wait_bluetooth_secs 120
```
</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>

View file

@ -11,14 +11,14 @@ import TabItem from '@theme/TabItem';
This plugin allows you to test the range of your Meshtastic nodes. It requires at least two nodes, a sender and a receiver. The receiving node then saves the messages along with the GPS coordinates at which they were received into a .csv file. This .csv file can then be integrated into [Google Earth](https://earth.google.com), [Google Maps - My Maps](https://mymaps.google.com), or any other program capable of processing .csv files. This can enable you to visualize your mesh.
:::note
Once settings are changed, a **reset** is required for them to take effect.
:::tip
Once plugin settings are changed, a **reset** is required for them to take effect.
:::
## Settings
| Setting | Acceptable Values | Default |
| :-----------------------: | :-----------------: | :-----: |
| :-----: | :---------------: | :-----: |
| range_test_plugin_enabled | `true`, `false` | `false` |
| range_test_plugin_save | `true`, `false` | `false` |
| range_test_plugin_sender | `integer` (Seconds) | `0` |
@ -27,14 +27,143 @@ Once settings are changed, a **reset** is required for them to take effect.
Enables the plugin.
#### Enable/Disable the plugin
<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">
```bash title="Enable the plugin"
meshtastic --set range_test_plugin_enabled true
```
```bash title="Disable the plugin"
meshtastic --set range_test_plugin_enabled true
```
</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>
### range_test_plugin_save
If enabled, we will save a log of all received messages to `/static/rangetest.csv` which you can access from the web server. We will abort writing if there is less than 50k of space on the filesystem to prevent filling up the storage.
#### Enable/Disable range test save `csv`
<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">
```bash title="Enable range test save"
meshtastic --set range_test_plugin_save true
```
```bash title="Disable range test save"
meshtastic --set range_test_plugin_save 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>
### range_test_plugin_sender
Number of seconds to wait between sending packets. Using the long_slow channel configuration, it's best not to go more frequent than once every 60 seconds. You can be more aggressive with faster settings. `0` is default which disables sending messages.
#### Enable/Disable range test sender
<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">
```bash title="Enable range test sender (send every 60 seconds)"
meshtastic --set range_test_plugin_sender 60
```
```bash title="Disable range test sender"
meshtastic --set range_test_plugin_sender 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>
## Details
While a minimum of two radios is required, more can be used. You can have any number of receivers and senders that your mesh is able to handle. You can test having a single sender with multiple receivers or a single receiver with multiple senders. Let us know on the [forum thread](https://meshtastic.discourse.group/t/new-plugin-rangetestplugin/2591/) the results of your configuration.
@ -75,6 +204,8 @@ defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -86,7 +217,23 @@ meshtastic --set range_test_plugin_sender 60
</TabItem>
<TabItem value="android">
TODO
:::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>
@ -99,6 +246,8 @@ defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -110,7 +259,23 @@ meshtastic --set range_test_plugin_save true
</TabItem>
<TabItem value="android">
TODO
:::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>

View file

@ -0,0 +1,404 @@
---
id: rotary-encoder-plugin
title: Rotary Encoder
sidebar_label: Rotary Encoder
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<!--- TODO add link to hardware setup to admonition--->
:::note
This plugin requires attaching a peripheral accessory to your device. It will not work without one.
:::
## Overview
Meshtastic supports hardwired rotary encoders as input devices.
Currently, one rotary encoder (`rotary1`) is defined, but later more rotary encoders
can be added (if needed) the same way.
:::tip
Once plugin settings are changed, a **reset** is required for them to take effect.
:::
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| rotary1_enabled | `true`, `false` | `false` |
| rotary1_event_cw | `InputEventChar` | (not defined) |
| rotary1_event_ccw | `InputEventChar` | (not defined) |
| rotary1_event_press | `InputEventChar` | (not defined) |
| rotary1_pin_a | `integer` | (not defined) |
| rotary1_pin_b | `integer` | (not defined) |
| rotary1_pin_press | `integer` | (not defined) |
### rotary1_enabled
Enable the rotary encoder #1
#### Enable/Disable rotary1
<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">
```bash title="Enable rotary1"
meshtastic --set rotary1_enabled true
```
```bash title="Disable rotary1"
meshtastic --set rotary1_enabled true
```
</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>
### rotary1_event_cw
Generate input event on CW of this kind.
:::tip
For using with CannedMessagePlugin you must choose value `KEY_UP` here.
:::
#### Specify rotary1 event cw
<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">
```bash title="Set rotary1 event cw to 'KEY_UP'"
meshtastic --set rotary1_event_press KEY_UP
```
```bash title="Unset rotary1 event cw"
meshtastic --set rotary1_event_press ""
```
</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>
### rotary1_event_ccw
Generate input event on CCW of this kind.
:::tip
For using with CannedMessagePlugin you must choose value `KEY_DOWN` here.
:::
#### Specify rotary1 event ccw
<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">
```bash title="Set rotary1 event ccw to 'KEY_DOWN'"
meshtastic --set rotary1_event_ccw KEY_DOWN
```
```bash title="Unset rotary1 event ccw"
meshtastic --set rotary1_event_ccw ""
```
</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>
### rotary1_event_press
Generate input event on Press of this kind.
:::tip
For using with CannedMessagePlugin you must choose value `KEY_SELECT` here.
:::
#### Specify rotary1 event press
<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">
```bash title="Set rotary1 event press to 'KEY_SELECT'"
meshtastic --set rotary1_event_press KEY_SELECT
```
```bash title="Unset rotary1 event press"
meshtastic --set rotary1_event_press ""
```
</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>
### rotary1_pin_a
GPIO pin for rotary encoder A port.
#### Specify rotary1 pin a
<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">
:::note
Replace `GPIO` below with the GPIO number from hardware setup.
:::
```bash title="Specify rotary1 pin a"
meshtastic --set rotary1_pin_a GPIO
```
</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>
### rotary1_pin_b
GPIO pin for rotary encoder B port.
#### Specify rotary1 pin b
<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">
:::note
Replace `GPIO` below with the GPIO number from hardware setup.
:::
```bash title="Specify rotary1 pin b"
meshtastic --set rotary1_pin_b GPIO
```
</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>
### rotary1_pin_press
GPIO pin for rotary encoder Press port.
#### Specify rotary1 pin press
<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">
:::note
Replace `GPIO` below with the GPIO number from hardware setup.
:::
```bash title="Specify rotary1 pin press"
meshtastic --set rotary1_pin_press GPIO
```
</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
<!--- TODO add link to hardware page --->
Configuring the rotary encoder plugin require attaching the compatible hardware.
## Examples
### Configure rotary encoder for Canned Message Plugin
<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">
:::note
Replace each `GPIO` (x3) below with the GPIO numbers from hardware setup.
:::
```bash title="Canned Message Plugin - Required Rotary Encoder Plugin Settings"
meshtastic --set rotary1_pin_a GPIO
meshtastic --set rotary1_pin_b GPIO
meshtastic --set rotary1_pin_press GPIO
meshtastic --set rotary1_event_cw KEY_UP
meshtastic --set rotary1_event_ccw KEY_DOWN
meshtastic --set rotary1_event_press KEY_SELECT
meshtastic --set rotary1_enabled True
```
</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>

View file

@ -1,58 +0,0 @@
---
id: rotary-encoder-settings
title: Rotary Encoder
sidebar_label: Rotary Encoder
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Overview
Meshtastic supports hardwired rotary encoders as input devices.
Currently, one rotary encoder (`rotary1`) is defined, but later more rotary encoders
can be added (if needed) the same way.
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| rotary1_enabled | `true`, `false` | `false` |
| rotary1_pin_a | `integer` | (not defined) |
| rotary1_pin_b | `integer` | (not defined) |
| rotary1_pin_press | `integer` | (not defined) |
| rotary1_event_cw | `InputEventChar` | (not defined) |
| rotary1_event_ccw | `InputEventChar` | (not defined) |
| rotary1_event_press | `InputEventChar` | (not defined) |
### rotary1_enabled
Enable the rotary encoder #1
### rotary1_pin_a
GPIO pin for rotary encoder A port.
### rotary1_pin_b
GPIO pin for rotary encoder B port.
### rotary1_pin_press
GPIO pin for rotary encoder Press port.
### rotary1_event_cw
Generate input event on CW of this kind.
(For using with CannedMessagePlugin you must choose value "UP" here.)
### rotary1_event_ccw
Generate input event on CCW of this kind.
(For using with CannedMessagePlugin you must choose value "DOWN" here.)
### rotary1_event_press
Generate input event on Press of this kind.
(For using with CannedMessagePlugin you must choose value "SELECT" here.)
## Details
See "Software / Plugins / Canned messages" for details!
## Examples
See "Software / Plugins / Canned messages" for examples!

View file

@ -21,6 +21,50 @@ import TabItem from '@theme/TabItem';
Are we operating as a router. Changes behavior in the following ways: The device will only sleep for critically low battery level (i.e. always tries to stay alive for the mesh) In the future routing decisions will preferentially route packets through nodes with this attribute (because assumed good line of sight)
#### Enable/Disable router mode
<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">
```bash title="Enable router mode"
meshtastic --set is_router true
```
```bash title="Disable router mode"
meshtastic --set is_router 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>
## Details
Toggling `is_router` changes your device settings in the following ways.
@ -37,27 +81,3 @@ Toggling `is_router` changes your device settings in the following ways.
### Altered Behaviors
#### Screen Wake
#### Bluetooth
## Examples
### Set Router
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
]}>
<TabItem value="cli">
```bash title="Set Router"
meshtastic --set is_router true
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
</Tabs>

View file

@ -11,6 +11,10 @@ import TabItem from '@theme/TabItem';
This is a simple interface to send messages over the mesh network by sending strings over a serial port.
:::tip
Once plugin settings are changed, a **reset** is required for them to take effect.
:::
## Settings
| Setting | Acceptable Values | Default |
@ -18,53 +22,278 @@ This is a simple interface to send messages over the mesh network by sending str
| serialplugin_enabled | `true`, `false` | `false` |
| serialplugin_echo | `true`, `false` | `false` |
| serialplugin_mode | `integer` | `0` |
| serialplugin_rxd | `integer` | `0` |
| serialplugin_rxd | `integer` (GPIO) | `0` |
| serialplugin_timeout | `integer` (seconds) | `0` |
| serialplugin_txd | `integer` | `0` |
| serialplugin_txd | `integer` (GPIO) | `0` |
### serialplugin_enabled
Enables the plugin.
### serialplugin_echo
<!--- TODO --->
### serialplugin_mode
<!--- TODO --->
### serialplugin_rxd
<!--- TODO --->
### serialplugin_timeout
<!--- TODO --->
### serialplugin_txd
<!--- TODO --->
## Details
## Examples
<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">
TODO
```bash title="Enable plugin"
meshtastic --set serialplugin_enabled true
```
```bash title="Disable plugin"
meshtastic --set serialplugin_enabled false
```
</TabItem>
<TabItem value="android">
TODO
:::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>
### serialplugin_echo
If set, any packets you send will be echoed back to your 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">
```bash title="Enable serialplugin_echo"
meshtastic --set serialplugin_echo true
```
```bash title="Disable serialplugin_echo"
meshtastic --set serialplugin_echo 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>
### serialplugin_mode
<!--- TODO --->
<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">
:::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="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>
### serialplugin_rxd
Set the GPIO pin to the RXD pin you have set up.
<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">
:::note
Replace `GPIO` in the below command with the GPIO number your circuit is attached to.
:::
```bash title="Set RXD to GPIO pin number"
meshtastic --set serialplugin_rxd GPIO
```
</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>
### serialplugin_timeout
The amount of time to wait before we consider your packet as "done".
<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">
```bash title="Set serialplugin_timeout to 15 seconds"
meshtastic --set serialplugin_timeout 15
```
</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>
### serialplugin_txd
Set the GPIO pin to the TXD pin you have set up.
<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">
:::note
Replace `GPIO` in the below command with the GPIO number your circuit is attached to.
:::
```bash title="Set TXD to GPIO pin number"
meshtastic --set serialplugin_txd GPIO
```
</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>

View file

@ -6,51 +6,330 @@ sidebar_label: Store and 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.
**Don't enable Store and Forward Plugin on multiple [routers](router).**
:::
## Overview
:::caution
This is a work in progress and is not yet available.
This is a work in progress and is partially available. Stability is not guaranteed.
:::
The Store Forward Plugin 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 nor is it advised to use this for SF12 (Long Range / Slow).
:::tip
Once plugin settings are changed, a **reset** is required for them to take effect.
:::
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| store_forward_plugin_enabled | `true`, `false` | `false` |
| store_forward_plugin_records | integer | `0` |
| store_forward_plugin_heartbeat | `true`, `false` | `false` |
| store_forward_plugin_history_return_max | `integer` | `0` |
| store_forward_plugin_history_return_window | `integer` | `0` |
| store_forward_plugin_records | `integer` | `0` |
### store_forward_plugin_enabled
Enables the plugin.
### store_forward_plugin_records
<!--- TODO --->
## Details
## Examples
<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">
TODO
```bash title="Enable the plugin"
meshtastic --set store_forward_plugin_enabled true
```
```bash title="Disable the plugin"
meshtastic --set store_forward_plugin_enabled false
```
</TabItem>
<TabItem value="android">
TODO
:::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>
### store_forward_plugin_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">
```bash title="Set store_forward_plugin_heartbeat to default"
meshtastic --set store_forward_plugin_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>
### store_forward_plugin_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">
```bash title="Set store_forward_plugin_history_return_max to default"
meshtastic --set store_forward_plugin_history_return_max 0
```
```bash title="Set store_forward_plugin_history_return_max to 100 messages"
meshtastic --set store_forward_plugin_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>
### store_forward_plugin_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">
```bash title="Set store_forward_plugin_history_return_window to default"
meshtastic --set store_forward_plugin_history_return_window 0
```
```bash title="Set store_forward_plugin_history_return_window to 1 day (1440 minutes)"
meshtastic --set store_forward_plugin_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>
### store_forward_plugin_records
Set this to the maximum number of records to save. Best to leave this at the default (`0`) where the plugin 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">
```bash title="Set store_forward_plugin_records to default (≈11,000 records)"
meshtastic --set store_forward_plugin_records 0
```
```bash title="Set store_forward_plugin_records to 100 records"
meshtastic --set store_forward_plugin_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/plugins/store_and_forward/store_and_forward-overview.png)
### Requirements
Initial Requirements:
* Must be installed on a router node.
* This is an artificial limitation, but is in place to enforce best practices.
* Router nodes are intended to be always online. If this plugin misses any messages, the reliability of the stored messages will be reduced.
* Esp32 Processor based device with external PSRAM. (tbeam v1.0 and tbeamv1.1, and maybe others)
### Usage Overview
* To use / test this you will want at least 3 devices
* One device will (currently) need be a tbeam v1.0 and tbeamv1.1 configured as a Meshtastic router. Other devices with built in PSRAM will be supported at some point.
* Two others will be regular clients. Nothing special required.
### Meshtastic channel configuration
Don't use this on the "Long Range / Slow" or "Long Range / Fast" channel settings. You're welcome to try and report back, but those channels have a [very low bitrate](/docs/developers/device/radio-settings#pre-defined).
Either use a custom channel configuration with at an at least 1kbit data rate or use "Medium Range / Fast".
Recommended channel setting is for 1.343kbps:
```bash title="Recommended channel setting for S&F plugin"
meshtastic --setchan spread_factor 11 --setchan coding_rate 4 --setchan bandwidth 500
```
With an aftermarket coaxial antenna or moxon antenna, that will give you roughly the same range as "Long Range / Slow" and 5x the bitrate.
### Router setup
:::warning
Don't enable the Store and Forward plugin on multiple routers!
:::
* Configure your device as a [meshtastic router](router).
* Name your router node something that makes it easily identifiable, aka "Router".
* Configure the Store and Forward plugin
```bash title="Required - Enable the plugin"
meshtastic --set store_forward_plugin_enabled true
```
```bash title="Optional - Set maximum number of records to save to device"
meshtastic --set store_forward_plugin_records 100
```
:::tip
Best to leave `store_forward_plugin_records` at the default (`0`) where the plugin 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 few messages I may have missed |
| SFm | Send a 240 byte payload (Used for testing) |
The Store and Forward plugin 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

@ -14,7 +14,7 @@ The ESP32 based devices have the ability to connect to WiFi as a client and also
The device can be either a WiFi client or a software access point. It **cannot** operate as both at the same time.
:::
:::note
:::info
The first time your device restarts after enabling the WiFi access point, it will take an additional 20-30 seconds to boot. This is to generate self-signed SSL keys. The keys will be saved for future reuse.
:::
@ -34,14 +34,140 @@ The first time your device restarts after enabling the WiFi access point, it wil
A boolean value that toggles the [Software Access Point](#software-access-point)
#### Enable/Disable Software Access Point
<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">
```bash title="Enable SoftAP"
meshtastic --set wifi_ap_mode true
```
```bash title="Disable SoftAP"
meshtastic --set wifi_ap_mode 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>
### wifi_password
In [SoftAP](#software-access-point) mode, this is the password to access your device's WiFi. In [Client](#wifi-client) mode, this is your WiFi Networks password. This string is case sensitive.
<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">
```bash title="Set WiFi password"
meshtastic --set wifi_password mypassword
```
```bash title="Set WiFi password (with spaces)"
meshtastic --set wifi_password "my password"
```
</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>
### wifi_ssid
In [SoftAP](#software-access-point) mode, this is the SSID broadcast to access your device's WiFi. In [Client](#wifi-client) mode, this is your WiFi Networks SSID. This string is case sensitive.
<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">
```bash title="Set WiFi network"
meshtastic --set wifi_ssid mynetwork
```
```bash title="Set WiFi network (with spaces)"
meshtastic --set wifi_ssid "my network"
```
</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
### Software Access Point
@ -74,6 +200,8 @@ To disable WiFi completely, set `wifi_ap_mode` to `false`, and both `wifi_ssid`
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -90,7 +218,23 @@ meshtastic --set wifi_ssid "my wifi ssid" --set wifi_password "my wifi password"
</TabItem>
<TabItem value="android">
TODO
:::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>
@ -104,6 +248,8 @@ In the above example, the device will join a network with the SSID `mywifissid`
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -123,7 +269,23 @@ meshtastic --set wifi_ssid "my wifi ssid" --set wifi_password "my wifi password"
</TabItem>
<TabItem value="android">
TODO
:::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>
@ -137,6 +299,8 @@ In the above example, the device will broadcast a network with the SSID `mywifis
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
@ -148,7 +312,23 @@ In the above example, the device will broadcast a network with the SSID `mywifis
</TabItem>
<TabItem value="android">
TODO
:::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>

View file

@ -3,6 +3,11 @@ id: web-partitions-software
title: Managing ESP32 partitions
sidebar_label: ESP32 partitions
---
:::caution
It has been reported that some of this information is out of date.
FIXME - Investigate and rewrite document to reflect the current ESP32 Partition mitigation.
:::
## Insufficient space to upload web interface files

View file

@ -3,6 +3,11 @@ id: web-usage-software
title: Using the web interface
sidebar_label: Usage
---
:::caution
It has been reported that some of this information is out of date.
FIXME - Investigate and rewrite document to reflect the current web usage solution.
:::
Assuming your device is connected to a wireless network, push the User Button (that's the middle button on the T-Beam) until you get to the Network settings screen.

View file

@ -17,14 +17,6 @@ const config = {
colorMode: {
respectPrefersColorScheme: true,
},
announcementBar: {
id: "play_store_workaround",
content:
'Android app unavailable in the Google Play Store store. Install by <a href="/docs/software/android/android-installation">side-loading</a> from <a href="https://github.com/meshtastic/Meshtastic-Android/releases">GitHub</a> or <a href="https://www.amazon.com/Geeksville-Industries-Meshtastic/dp/B08CY9394Q">Amazon</a>.',
backgroundColor: "#ff9999",
textColor: "#091E42",
isCloseable: true,
},
navbar: {
title: "Meshtastic",
hideOnScroll: true,
@ -46,7 +38,7 @@ const config = {
label: "Documentation",
items: [
{
label: "About Meshtastic",
label: "Meshtastic Software",
to: "docs/software",
},
{
@ -65,13 +57,10 @@ const config = {
label: "Contribute to Meshtastic",
to: "docs/developers",
},
/*
TODO add Docusaurus and Vercel instructions for how to manage the docs
{
label: "About this Documentation",
to: "docs/about-documentation",
},
*/
{
label: "Legal",
to: "docs/legal",
@ -80,9 +69,9 @@ const config = {
],
},
{
label: "Firmware",
to: "firmware",
activeBasePath: "firmware",
label: "Downloads",
to: "downloads",
activeBasePath: "downloads",
},
{
label: "Showcase",
@ -103,7 +92,73 @@ const config = {
],
},
footer: {
copyright: `<a href="https://vercel.com/?utm_source=meshtastic&utm_campaign=oss" style="color: white">Powered by ▲ Vercel</a> | Meshtastic® is a registered trademark of Geeksville Industries LLC`,
copyright: `<a href="https://vercel.com/?utm_source=meshtastic&utm_campaign=oss" style="color: var(--ifm-footer-color)">Powered by ▲ Vercel</a> | Meshtastic® is a registered trademark of Geeksville Industries LLC`,
links: [
{
title: 'Learn',
items: [
{
label: 'Getting Started',
to: 'docs/getting-started',
},
{
label: 'About',
to: 'docs/about-documentation',
},
{
label: 'Hardware',
to: 'docs/hardware',
},
{
label: 'Settings',
to: 'docs/settings',
},
],
},
{
title: 'Community',
items: [
{
label: 'YouTube',
to: 'https://www.youtube.com/meshtastic',
},
{
label: 'Discord',
to: 'https://discord.com/invite/UQJ5QuM7vq',
},
{
label: 'Forum',
to: 'https://meshtastic.discourse.group',
},
],
},
{
title: 'Legal',
items: [
{
label: 'Privacy',
to: 'docs/legal/privacy',
},
{
label: 'Licensing',
to: 'docs/legal/licensing',
},
{
label: 'Trademark',
to: 'docs/legal/trademark',
},
],
},
{
title: 'Resources',
items: [
{
label: 'GitHub',
to: 'https://github.com/meshtastic',
},
],
},
],
},
algolia: {
apiKey: "01ad7e13d3fe392d2ad26da3c69dbc21",

@ -1 +1 @@
Subproject commit 6c39b5bf472677122b3ebf77b434af09038ff0dc
Subproject commit c703d579b20e184278546497246ce54b3bdd4118

View file

@ -102,6 +102,7 @@ module.exports = {
"getting-started/faq",
{
"Flashing firmware": [
"getting-started/meshtastic-flasher",
"getting-started/flashing-esp32",
"getting-started/flashing-nrf52",
],
@ -114,19 +115,20 @@ module.exports = {
"software/settings/overview",
"software/settings/channel",
"software/settings/gps",
"software/settings/ham",
"software/settings/mqtt",
"software/settings/power",
"software/settings/router",
"software/settings/wifi",
{
Plugins: [
"software/settings/canned-message-plugin",
"software/settings/environmental-measurement-plugin",
"software/settings/external-notification-plugin",
"software/settings/canned-message-plugin-settings",
"software/settings/range-test-plugin",
"software/settings/rotary-encoder-plugin",
"software/settings/serial-plugin",
"software/settings/store-and-forward-plugin",
"software/settings/rotary-encoder-settings",
],
Advanced: [
"software/settings/channel-advanced",
@ -191,6 +193,28 @@ module.exports = {
},
],
},
Documentation: {
"About Documentation": [
"about-documentation/overview",
{
Dependencies: [
"about-documentation/docusaurus",
"about-documentation/github",
"about-documentation/vercel",
],
},
{
Examples: [
"about-documentation/serve-docs-locally",
],
},
{
"Style Guides": [
"about-documentation/style-guides/style-guide-settings",
],
},
],
},
Legal: {
Legal: [
"legal/overview",

View file

@ -0,0 +1,141 @@
import React from 'react';
export interface downloadCardProps {
client: string;
imgUrl: string;
url: string;
notes: string;
buttonText: string;
}
export const DownloadCard = ({
client,
imgUrl,
url,
notes,
buttonText,
}: downloadCardProps): JSX.Element => {
return (
<div className="card">
<div
className="card__header"
style={{ display: "flex", justifyContent: "space-between" }}
>
<h3>{client}</h3>
</div>
<div
className="card__body"
style={{ display: "flex", justifyContent: "center"}}
>
{
buttonText
?
<a href={url} className="button button--secondary button--block">
{buttonText}
</a>
:
<a href={url}>
<img style={{height: '4rem'}} src={imgUrl}></img>
</a>
}
</div>
<div className="card__footer">
{notes ? notes : null}
</div>
</div>
);
};
export const PlaceholderCard = (): JSX.Element => {
return (
<div
className="card"
style={{
width: "100%",
animation: "pulse 2s infinite",
transform: "scale(1)",
display: "flex",
gap: "1rem",
padding: "1rem",
}}
>
<div
style={{
display: "flex",
justifyContent: "space-between",
marginBottom: "1rem",
}}
>
<div
style={{
borderRadius: "0.4rem",
backgroundColor: "gray",
height: "2rem",
width: "8rem",
}}
/>
<div
style={{
borderRadius: "0.4rem",
backgroundColor: "gray",
marginTop: "1rem",
height: "1rem",
width: "8rem",
}}
/>
</div>
<div
className="card__body"
style={{
borderRadius: "0.4rem",
backgroundColor: "gray",
height: "3rem",
display: "flex",
jusifyContent: "center",
alignItems: "center",
}}
/>
<a className="button disabled button--primary button--block">&nbsp;</a>
<div
style={{
borderRadius: "0.4rem",
backgroundColor: "gray",
width: "8rem",
height: "2rem",
}}
/>
<div
style={{
borderRadius: "0.4rem",
backgroundColor: "gray",
width: "11rem",
height: "1rem",
}}
/>
<div
style={{
borderRadius: "0.4rem",
backgroundColor: "gray",
width: "9rem",
height: "1rem",
}}
/>
<div
style={{
borderRadius: "0.4rem",
backgroundColor: "gray",
width: "13rem",
height: "1rem",
}}
/>
<div
style={{
borderRadius: "0.4rem",
backgroundColor: "gray",
width: "11rem",
height: "1rem",
}}
/>
</div>
);
};

View file

@ -20,7 +20,7 @@ export const FirmwareCard = ({
style={{ display: "flex", justifyContent: "space-between" }}
>
<h3>{variant}</h3>
{release?.length && <a href={release[0].html_url}>{release[0].name}</a>}
{release?.length && <a href={release[0].html_url}>{release[0].tag_name}</a>}
</div>
<div className="card__body">
<p>{description}</p>
@ -40,7 +40,7 @@ export const FirmwareCard = ({
return (
<div key={release.id}>
<a href={release.assets[1]?.browser_download_url}>
{release.name}
{release.tag_name}
</a>
</div>
);

View file

@ -0,0 +1,14 @@
import React from 'react';
export const HeaderText = ({type, text, link}): JSX.Element => {
const Header = type;
return (
<Header className="anchor anchorWithHideOnScrollNavbar_node_modules-@docusaurus-theme-classic-lib-next-theme-Heading-styles-module">
{text}
{link && <a className="hash-link" href={`#${link}`} title="Direct link to heading"/>}
</Header>
);
};

View file

@ -0,0 +1,147 @@
import React from 'react';
import useSWR from 'swr';
// import { Endpoints } from '@octokit/types';
import Layout from '@theme/Layout';
import { Release } from '../../utils/github';
import { fetcher } from '../../utils/swr';
import {
FirmwareCard,
PlaceholderFirmwareCard,
} from './_components/FirmwareCard';
import { HeaderText } from './_components/HeaderText'
import { DownloadCard } from './_components/DownloadCard'
const Firmware = (): JSX.Element => {
const { data, error } = useSWR<Release[]>(
"https://api.github.com/repos/meshtastic/meshtastic-device/releases",
fetcher
);
const beta = data?.filter((release) => release.prerelease === false);
const alpha = data?.filter((release) => release.prerelease === true);
return (
<Layout
title="Downloads"
description="Downloads for the Meshtastic project"
>
<main className="margin-vert--xl">
<div className="container">
<HeaderText
type="h1"
text="Downloads"
/>
</div>
<div className="container">
<HeaderText
type="h2"
text="Install Meshtastic"
link="install-meshtastic"
/>
<DownloadCard
client="Meshtastic Flasher"
buttonText="Download Meshtastic Flasher"
url="https://github.com/meshtastic/Meshtastic-gui-installer/releases/latest"
notes={[
"To download using ", <code>pip</code>, " follow ",<a href="https://meshtastic.org/docs/getting-started/meshtastic-flasher#install-using-pip">these instructions</a>,"."
]}
/>
</div>
<div className="container">
<HeaderText
type="h2"
text="Mobile Downloads"
link="mobile-downloads"
/>
<ul
style={{
position: "relative",
display: "grid",
gap: "1.5rem",
gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
paddingLeft: "0",
}}
>
<DownloadCard
client="Android"
imgUrl="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png"
url="https://play.google.com/store/apps/details?id=com.geeksville.mesh&referrer=utm_source=downloads-page"
notes={["To sideload, ",<a href="https://github.com/meshtastic/Meshtastic-Android/releases/latest" rel="noreferrer" target="_blank">download the latest .apk</a>," from Github", ]}
/>
<DownloadCard
client="iOS"
url="https://testflight.apple.com/join/c8nNl8q1"
buttonText="Download on TestFlight"
notes="Currently only available in TestFlight"
/>
</ul>
</div>
<div className="container">
<HeaderText
type="h2"
text="Firmware Downloads"
link="firmware-downloads"
/>
<ul
style={{
position: "relative",
display: "grid",
gap: "1.5rem",
gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
paddingLeft: "0",
}}
>
{data && !error ? (
<>
<FirmwareCard
variant="Beta"
description="Tested feature set. For those who want stability."
release={beta}
/>
<FirmwareCard
variant="Alpha"
description="Upcoming changes for testing. For those who want new features."
release={alpha}
/>
<div className="card">
<div className="card__header">
<h3>Bleeding</h3>
</div>
<div className="card__body">
<p>
Latest successful CI build. For those who want to break
things.
</p>
</div>
<div className="card__footer" style={{ marginTop: "1rem" }}>
<a
href="https://nightly.link/meshtastic/meshtastic-device/workflows/main/master/built.zip"
className="button button--secondary button--block"
>
Download
</a>
</div>
</div>
</>
) : (
<>
<PlaceholderFirmwareCard />
<PlaceholderFirmwareCard />
<PlaceholderFirmwareCard />
</>
)}
</ul>
Once downloaded, follow the flashing instructions for <a href="https://meshtastic.org/docs/getting-started/flashing-esp32" rel="noreferrer" target="_blank">ESP32 chipsets</a>, <a href="https://meshtastic.org/docs/getting-started/flashing-nrf52" rel="noreferrer" target="_blank">NRF52 chipsets</a>, or the <a href="https://meshtastic.org/docs/getting-started/meshtastic-flasher" rel="noreferrer" target="_blank">GUI instructions for Meshtastic Flasher</a>.
</div>
<div className="container">
<i>Google Play and the Google Play logo are trademarks of Google LLC.</i>
</div>
</main>
</Layout>
);
};
export default Firmware;

View file

@ -1,86 +0,0 @@
import React from 'react';
import useSWR from 'swr';
// import { Endpoints } from '@octokit/types';
import Layout from '@theme/Layout';
import { Release } from '../../utils/github';
import { fetcher } from '../../utils/swr';
import {
FirmwareCard,
PlaceholderFirmwareCard,
} from './_components/FirmwareCard';
const Firmware = (): JSX.Element => {
const { data, error } = useSWR<Release[]>(
"https://api.github.com/repos/meshtastic/meshtastic-device/releases",
fetcher
);
const beta = data?.filter((release) => release.prerelease === false);
const alpha = data?.filter((release) => release.prerelease === true);
return (
<Layout
title="Firmware"
description="Firmware download for the Meshtastic project"
>
<main className="margin-vert--xl">
<div className="container">
<ul
style={{
position: "relative",
display: "grid",
gap: "1.5rem",
gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
paddingLeft: "0",
}}
>
{data && !error ? (
<>
<FirmwareCard
variant="Beta"
description="Tested feature set. For those who want stability."
release={beta}
/>
<FirmwareCard
variant="Alpha"
description="Upcoming changes for testing. For those who want new features."
release={alpha}
/>
<div className="card">
<div className="card__header">
<h3>Bleeding</h3>
</div>
<div className="card__body">
<p>
Latest successful CI build. For those who want to break
things.
</p>
</div>
<div className="card__footer" style={{ marginTop: "1rem" }}>
<a
href="https://nightly.link/meshtastic/meshtastic-device/workflows/main/master/built.zip"
className="button button--secondary button--block"
>
Download
</a>
</div>
</div>
</>
) : (
<>
<PlaceholderFirmwareCard />
<PlaceholderFirmwareCard />
<PlaceholderFirmwareCard />
</>
)}
</ul>
</div>
</main>
</Layout>
);
};
export default Firmware;

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Some files were not shown because too many files have changed in this diff Show more