This commit is contained in:
Jm Casler 2022-01-22 19:59:33 -08:00
commit 4bf05ad88a
18 changed files with 542 additions and 472 deletions

View file

@ -75,7 +75,7 @@ Note: The link budget used by these calculations assumes a transmit power of 17d
You may want to select other channels for your usage. The other settings can be set by using the Python API.
```bash
meshtastic --setchan spread_factor 10 --setchan coding_rate 4 --setchan bandwidth 125
meshtastic --ch-set spread_factor 10 --ch-set coding_rate 4 --ch-set bandwidth 125 --ch-index 0
```
After applying the settings, you will need to restart the device. After your device is restarted, it will generate a new crypto key and you will need to share the newly generated QR Code or URL to all your other devices.

View file

@ -173,12 +173,27 @@ pip --version
### Confirm Communication With Chip
Connect the radio to your computer using a data USB cable. Confirm your device is talking to your computer using the following command:
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux"></TabItem>
<TabItem value="macos"></TabItem>
<TabItem value="windows">
:::important
On windows, you must explicitly declare esptools as a .py script. Use `esptools.py chip_id`.
On Windows, you must explicitly declare esptools as a .py script. Use `esptools.py chip_id`.
:::
</TabItem>
</Tabs>
Connect the radio to your computer using a data USB cable. Confirm your device is talking to your computer using the following command:
```bash title="Command"
esptool chip_id
```

View file

@ -162,11 +162,11 @@ Pressing the three vertical dots in the top right corner shows the configuration
#### Broadcast position period
This allows you to change the frequency with which your location is broadcast across the mesh. By default, this is set to 900 seconds (15 minutes). The minimum time this can be set to is 375 seconds, the reasons for which have been [discussed on the forum](https://meshtastic.discourse.group/t/lost-messages-while-testing/2455/19).
This allows you to change the frequency with which your location is broadcast across the mesh. By default, this is set to 900 seconds (15 minutes). The minimum time this can be set for the default channel is 375 seconds, the reasons for which have been [discussed on the forum](https://meshtastic.discourse.group/t/lost-messages-while-testing/2455/19).
#### Device sleep period
By default, ESP32 devices will enter sleep mode after 300 seconds of inactivity to save battery power. Unfortunately, this will also turn off the Bluetooth radio. They can be woken by either receiving a message over LoRa (the LoRa receiver never switches off), or by pressing a program button if there is one on the device. For example, to keep the Bluetooth link awake for eight hours (any usage of the Bluetooth protocol from your phone will reset this timer), set this to 28800 seconds.
ESP32 devices can enter sleep mode to save battery life. During sleep Bluetooth is turned off. This setting allows the length of the sleep mode to be changed from the default 300 seconds (5 minutes). After this time period, they awake to check the phone for any queued messages and then go back to sleep, alternating between sleep and awake states. Receiving a message over LoRa (the LoRa receiver never switches off) or pressing a program button (if there is one on the device) also awakes the device.
### Debug page

View file

@ -16,6 +16,7 @@ The following applications are available to support your Meshtastic network:
- Pre-installed device plugins for:
- [Range testing](/docs/software/plugins/range-test-plugin)
- [External notifications](/docs/software/plugins/ext-notif-plugin)
- [Canned messages](/docs/software/plugins/canned-message-plugin)
- [Serial communication](/docs/software/plugins/serial-plugin)
- [Store and forwarding messages](/docs/software/plugins/store-forward-plugin) (in development)
- [Environment measurement](/docs/software/plugins/environment-plugin) (in development)

View file

@ -0,0 +1,149 @@
---
id: canned-message-plugin
title: Canned messages
sidebar_label: Canned messages
---
## About
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.
## Hardware
To navigate through messages and select one, you will require some
hardware attached to your device.
Currently, the plugin is tested with a generic rotary encoder, but this is
not a limitation further input methods can be added in the future.
### Rotary encoder
Meshtastic supports hardwired rotary encoders as input devices.
(Technically CannedMessage plugin is independent of rotary
encoders. It is described here, because no other module utilizes rotary encoders just yet.)
You will need a generic rotary encoder. The types listed below has five legs
where two is dedicated to a "press" action,
but any other types will likely do the job. You can also use a
three-legged version, where the "press" action should be wired from
an independent switch.
* [Amazon link](https://www.amazon.com/Rotary-Encoder-Washers-Digital-Potentiometer/dp/B07Y619CZR/ref=sr_1_21?keywords=rotary+encoder&qid=1642317807&sprefix=rotary+enco%2Caps%2C186&sr=8-21)
* [Amazon.DE link](https://www.amazon.de/-/en/sourcing-Degree-Rotary-Encoder-Digital/dp/B07RLZPX5K/ref=sr_1_12?keywords=rotary+encoder&qid=1642320025&sprefix=rotary%2Caps%2C105&sr=8-12)
* [Aliexpress link1](https://www.aliexpress.com/item/32992227812.html?spm=a2g0o.productlist.0.0.1afe21a50SLvi2&algo_pvid=a19c4182-08aa-406d-bfdf-132582ef5ebb&algo_exp_id=a19c4182-08aa-406d-bfdf-132582ef5ebb-23&pdp_ext_f=%7B%22sku_id%22%3A%2266940265509%22%7D&pdp_pi=-1%3B1.66%3B-1%3B-1%40salePrice%3BUSD%3Bsearch-mainSearch)
* [Aliexpress link2](https://www.aliexpress.com/item/32946444853.html?spm=a2g0o.productlist.0.0.1afe21a50SLvi2&algo_pvid=a19c4182-08aa-406d-bfdf-132582ef5ebb&aem_p4p_detail=2022011523263276283624312400022072680&algo_exp_id=a19c4182-08aa-406d-bfdf-132582ef5ebb-6&pdp_ext_f=%7B%22sku_id%22%3A%2266223434642%22%7D&pdp_pi=-1%3B1.91%3B-1%3B-1%40salePrice%3BUSD%3Bsearch-mainSearch)
* [Aliexpress link3](https://www.aliexpress.com/item/10000056483250.html?spm=a2g0o.productlist.0.0.1afe21a50SLvi2&algo_pvid=a19c4182-08aa-406d-bfdf-132582ef5ebb&algo_exp_id=a19c4182-08aa-406d-bfdf-132582ef5ebb-9&pdp_ext_f=%7B%22sku_id%22%3A%2220000000116682147%22%7D&pdp_pi=-1%3B2.51%3B-1%3B-1%40salePrice%3BUSD%3Bsearch-mainSearch)
Connect your rotary encoder as follows. The rotary encoder has two
rows of legs. One of the rows contains two legs, the other contains three
legs. Bottom side view:
B o --- o PRESS
GND o | |
A o --- o GND
The two legs is to sense the press action (or push). Connect
one of the two to GROUND and the other to a GPIO pin. (No matter which one
goes where.) Let's call this connected ports 'PRESS'.
The three legs is to sense the rotation action.
Connect the middle leg to GROUND and the ones on the side
to GPIO pins. Let's call these ports 'A' and 'B', according to
the scheme below.
A --||
GND --||]========
B --||
Recommended GPIO pins for connecting a rotary encoder.
* TTGO LoRa V1:
* A - GPIO-22
* B - GPIO-23
* PRESS - GPIO-21
There is a reference case 3D-design utilizing the rotary encoder for TTGO LoRa V1:
[Case for TTGO-ESP32-LORA-OLED-v1.0 with rotary encoder](https://www.thingiverse.com/thing:5178495)
### Configuration of the rotary encoder #1
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!
The rotary encoder #1 will send input events under name "rotEnc1".
## Configuration of the plugin
Following configuration can be set for the plugin.
canned_message_plugin_enabled
Enable/disable CannedMessagePlugin.
canned_message_plugin_allow_input_source
Input event origin accepted by the canned message plugin.
Can be e.g. "rotEnc1" or keyword "_any"
canned_message_plugin_messages
Predefined messages for CannedMessagePlugin separated by '|' characters.
canned_message_plugin_send_bell
CannedMessagePlugin also sends a bell character with the messages.
ExternalNotificationPlugin can benefit from this feature.
## Usage Notes
For setting up the rotary encoder #1 using the Python CLI you will
need to execute a sequence like this:
meshtastic --set rotary1_pin_a 22
meshtastic --set rotary1_pin_b 23
meshtastic --set rotary1_pin_press 21
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
For setting up the plugin you will
need to execute a sequence like this:
meshtastic --set canned_message_plugin_allow_input_source "_any"
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"
meshtastic --set canned_message_plugin_send_bell False
meshtastic --set canned_message_plugin_enabled True
:::note
You can define up to 50 messages with a total length 200 bytes.
(We are working on a solution to extend total length.)
Use short texts as end of line will be truncated on the screen.
:::
:::note
The device must be restarted after the settings have been changed for the plugin to take effect.
:::
## Known Problems
* Rotary encoder input uses a technology called "interrupts". Using the
rotary encoder might cause unexpected software problems. This needs to be
tested.

View file

@ -5,7 +5,9 @@ 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 DHT11 and Dallas 1-wire DS18B20. This plugin does only work on ESP32 devices.
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 preferred setup is using I2C, so the `environmental_measurement_plugin_sensor_pin` may not be needed.
## Configuration
@ -49,6 +51,11 @@ These are the settings that can be configured.
0 = DHT11 (Default)
1 = Dallas 1-wire DS18B20
2 = DHT12
3 = DHT21
4 = DHT22
5 = BME280
6 = BME680
environmental_measurement_plugin_sensor_pin
Which pin is the sensor connected to?

View file

@ -9,6 +9,7 @@ There are a number of plugins that have been integrated into the device firmware
These plugins are currently integrated into the firmware:
* Range test - Allows automated testing of communication range of nodes
* External notifications - Allows a speaker, LED or other device to indicate when a message has been received
* Canned messages - Device can be used without the phone to send a message by choosing a predefined text
* Serial - Allows messages to be sent across the mesh by sending strings across a serial port
These plugins are currently in development:

View file

@ -1,396 +0,0 @@
---
id: python-commands
title: Meshtastic-python Commands
sidebar_label: Commands
---
# Python API Commands Guide
The python pip package installs a "meshtastic" command line executable, which displays packets sent over the network as JSON and lets you see serial debugging information from the meshtastic devices. This command is not run inside of python, you run it from your operating system shell prompt directly. If when you type "meshtastic" it doesn't find the command and you are using Windows: Check that the python "scripts" directory is in your path.
## Optional Arguments
### -h or --help
Shows a help message that describes the arguments.
**Usage**
```shell
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.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --info
meshtastic --port COM4 --info
```
### --host HOST
The hostname/ipaddr of the device to connect to (over TCP).
**Usage**
```shell
meshtastic --host HOST
```
### --seriallog SERIALLOG
Logs device serial output to either 'stdout', 'none' or a filename to append to.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --seriallog
```
### --info
Read and display the radio config information.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --info
```
### --nodes
Prints a node list in a pretty, formatted table.
**Usage**
```shell
meshtastic --nodes
```
### --qr
Displays the QR code that corresponds to the current channel.
**Usage**
```shell
meshtastic --qr
```
### --get GET
Gets a preferences field.
**Usage**
```shell
meshtastic --get modem_config
```
### --set SET SET
Sets a preferences field.
**Usage**
```shell
meshtastic --set region Unset
```
### --seturl SETURL
Set a channel URL.
**Usage**
```shell
meshtastic --seturl https://www.meshtastic.org/c/GAMiIE67C6zsNmlWQ-KE1tKt0fRKFciHka-DShI6G7ElvGOiKgZzaGFyZWQ=
```
### --ch-index CH_INDEX
Set the specified channel index
**Usage**
```shell
meshtastic --ch-index 1 --ch-disable
```
### --ch-add CH_ADD
Add a secondary channel, you must specify a channel name.
**Usage**
```shell
meshtastic --ch-add testing-channel
```
### --ch-del
Delete the ch-index channel.
**Usage**
```shell
meshtastic --ch-index 1 --ch-del
```
### --ch-enable
Enable the specified channel.
**Usage**
```shell
meshtastic --ch-index 1 --ch-enable
```
### --ch-disable
Disable the specified channel.
**Usage**
```shell
meshtastic --ch-index 1 --ch-disable
```
### --ch-set CH_SET CH_SET
Set a channel parameter.
**Usage**
```shell
meshtastic --ch-set id 1234
```
### --ch-longslow
Change to the standard long-range (but slow) channel.
**Usage**
```shell
meshtastic --ch-longslow
```
### --ch-shortfast
Change to the standard fast (but short range) channel.
**Usage**
```shell
meshtastic --ch-shortfast
```
### --set-owner SET_OWNER
Set device owner name.
**Usage**
```shell
meshtastic --dest \!28979058 --set-owner "MeshyJohn"
```
### --set-ham SET_HAM
Set licensed Ham ID and turn off encryption.
**Usage**
```shell
meshtastic --set-ham KI1345
```
### --dest DEST
The destination node id for any sent commands
**Usage**
```shell
meshtastic --dest \!28979058 --set-owner "MeshyJohn"
```
### --sendtext SENDTEXT
Send a text message.
**Usage**
```shell
meshtastic --sendtext "Hello Mesh!"
```
### --sendping
Send a ping message (which requests a reply).
**Usage**
```shell
meshtastic --sendping
```
### --reboot
Tell the destination node to reboot.
**Usage**
```shell
meshtastic --dest \!28979058 --reboot
```
### --reply
Reply to received messages.
**Usage**
```shell
meshtastic --reply
```
### --gpio-wrb GPIO_WRB GPIO_WRB
Set a particular GPIO # to 1 or 0.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --gpio-wrb 4 1 --dest \!28979058
```
### --gpio-rd GPIO_RD
Read from a GPIO mask.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --gpio-rd 0x10 --dest \!28979058
```
### --gpio-watch GPIO_WATCH
Start watching a GPIO mask for changes.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --gpio-watch 0x10 --dest \!28979058
```
### --no-time
Suppress sending the current time to the mesh.
**Usage**
```shell
meshtastic --port /dev/ttyUSB0 --no-time
```
### --setalt SETALT
Set device altitude (allows use without GPS).
**Usage**
```shell
meshtastic --setalt 120
```
### --setlat SETLAT
Set device latitude (allows use without GPS).
**Usage**
```shell
meshtastic --setlat 25.2
```
### --setlon SETLON
Set device longitude (allows use without GPS).
**Usage**
```shell
meshtastic --setlon -16.8
```
### --debug
Show API library debug log messages.
**Usage**
```shell
meshtastic --debug --info
```
### --test
Run stress test against all connected Meshtastic devices.
**Usage**
```shell
meshtastic --test
```
### --ble BLE
BLE mac address to connect to (BLE is not yet supported for this tool).
**Usage**
```shell
meshtastic --ble "83:38:92:32:37:48"
```
### --noproto
Don't start the API, just function as a dumb serial terminal.
**Usage**
```shell
meshtastic --noproto
```
### --version
Show program's version number and exit.
**Usage**
```shell
meshtastic --version
```
## Deprecated Arguments
### --setchan
Deprecated - use "--ch-set param value" instead.
### --set-router
Deprecated - use "--set is_router true" instead.
### --unset-router
Deprecated - use "--set is_router false" instead.

View file

@ -6,13 +6,15 @@ sidebar_label: Installation
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
This library provides a command line interface for Meshtastic nodes and provides an easy API for sending and receiving messages over mesh radios, in addition to changing user settings. Using the command line is currently the most powerful. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in.
This library provides a command line interface (CLI) for Meshtastic nodes and provides an easy API for sending and receiving messages over mesh radios, in addition to changing user settings. Using the command line is currently the most powerful. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in.
[Full documentation](https://meshtastic.org/docs/software/python/python-installation) for the library, including examples, is available.
The [Meshtastic-python repo](https://github.com/meshtastic/Meshtastic-python) and [API documentation](https://meshtastic-python.vercel.app/meshtastic/index.html) are excellent sources of information.
If you wish to view the code or contribute to development of the python library or the command line interface, please visit the Meshtastic python <a href="https://meshtastic.org/docs/software/python/python-installation">GitHub page</a>.
If you wish to view the code or contribute to development of the python library or the command line interface, please visit the Meshtastic python <a href="https://github.com/meshtastic/Meshtastic-python">GitHub page</a>.
Installation is easily done through the [Python package installer pip](https://pypi.org/project/meshtastic/):
There are standalone executables for Mac, Windows and Ubuntu if you do not want to install python and/or the python libraries required to run the mestastic CLI tool. See [Standalone](https://meshtastic.org/docs/software/python/python-standalone) for more information.
Installation can also be easily done through the [Python package installer pip](https://pypi.org/project/meshtastic/):
:::note
You must use pip version 20 or later. To upgrade to the latest pip, do: `pip install --upgrade pip`
:::

View file

@ -0,0 +1,110 @@
---
id: python-standalone
title: Meshtastic-python standalone executable
sidebar_label: Standalone
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
There are standalone executable files for Mac, Windows and Ubuntu. A single file is all you need to run the command line interface (CLI) Meshtastic tool. There is a zip file per operating system. To use, see the operating system specific notes below:
They can be found on the [Releases](https://github.com/meshtastic/Meshtastic-python/releases) page.
<Tabs
groupId="operating-system"
defaultValue="windows"
values={[
{label: 'Ubutnu', value: 'ubuntu'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="ubuntu">
* Download meshtastic_ubuntu.zip
* Unzip.
:::note
You may need to run `sudo apt-get install zip`
:::
* Run the following command to make the file executable:
```
chmod +x meshtastic
```
* To run the cli:
```
./meshtastic
```
:::tip
Copy (or move) this binary somewhere in your path.
:::
</TabItem>
<TabItem value="macos">
* Download meshtastic_mac.zip
* Unzip.
* Run the following command to make the file executable:
```
chmod +x meshtastic
```
* Try to run it:
```
./meshtastic
```
:::note
You may get a dialog that says:
"meshtastic" can't be opened because Apple cannot check it for malicious software.
:::
* To fix, go into "System Preferences", "Security & Privacy", "General" tab, and click on the "Allow Anyway" button.
* Try to run it again:
```
./meshtastic
```
:::note
You may get a dialog that says:
"meshtastic" can't be opened because Apple cannot check it for malicious software.
Click "Open".
:::
* Now when you want to run it, you can simply run:
```
./meshtastic
```
:::tip
Copy (or move) this binary somewhere in your path.
:::
</TabItem>
<TabItem value="windows">
* Download meshtastic_windows.zip
* Unzip.
* To run, double click on "meshtastic.exe" or from a command prompt run:
```
.\meshtastic.exe
```
</TabItem>
</Tabs>

View file

@ -0,0 +1,53 @@
---
id: canned-message-plugin-settings
title: Canned Message Plugin Settings
sidebar_label: Canned Message Plugin Settings
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## 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.
Please also follow settings of Rotary Encoder to configure input source!
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| 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_send_bell | `true`, `false` | `false` |
### canned_message_plugin_enabled
Enables the plugin.
### canned_message_plugin_allow_input_source
Input event origin accepted by the canned message plugin.
Can be e.g. "rotEnc1" or keyword "_any"
### canned_message_plugin_messages
Predefined messages for CannedMessagePlugin separated by '|' characters.
You can define up to 50 messages with a total length 1024 bytes.
### canned_message_plugin_send_bell
CannedMessagePlugin also sends a bell character with the messages.
ExternalNotificationPlugin can benefit from this feature.
## Details
See "Software / Plugins / Canned messages" for details!
## Examples
See "Software / Plugins / Canned messages" for examples!

View file

@ -57,7 +57,9 @@ TODO
]}>
<TabItem value="cli">
TODO
```bash
meshtastic --ch-set bandwidth 125 --ch-index 0
```
</TabItem>
<TabItem value="android">
@ -99,7 +101,9 @@ TODO
]}>
<TabItem value="cli">
TODO
```bash
meshtastic --ch-set coding_rate 8 --ch-index 0
```
</TabItem>
<TabItem value="android">
@ -120,7 +124,9 @@ TODO
]}>
<TabItem value="cli">
TODO
```bash
meshtastic --ch-set spread_factor 12 --ch-index 0
```
</TabItem>
<TabItem value="android">

View file

@ -20,7 +20,7 @@ Channel settings are an integral part of the way your devices communicate across
| id | `integer` | `0` |
| modem_config | `Bw125Cr45Sf128`, `Bw500Cr45Sf128`, `Bw31_25Cr48Sf512`, `Bw125Cr48Sf4096` | TODO |
| name | `string` | `""` |
| psk | `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` | `1` |
| 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` |
@ -57,6 +57,8 @@ This is in active development and not ready for casual users. Testing only.
<!--- 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 |
@ -70,8 +72,12 @@ This is in active development and not ready for casual users. Testing only.
| Setting | Behavior |
| :-----: | :------: |
| `none` | Disable Encryption |
| `default` | Default Encryption |
| `random` | TODO |
| `default` | Default Encryption (use the weak encryption key) |
| `random` | Generate a secure 256-bit encryption key. Use this setting for private communication. |
:::note
If you use Meshtastic for exchanging messages you don't want other people to see, `random` is the setting you should use.
:::
### region

View file

@ -9,11 +9,7 @@ import TabItem from '@theme/TabItem';
## Overview
:::caution
This is a work in progress and is not yet available.
:::
The Environmental Measurement Plugin will allow you to connect climate sensors to report local conditions to your mesh.
The Environmental Measurement Plugin will allow you to connect environment sensors to report conditions to your mesh. Examples are temperature, humidity and gas pressure.
## Settings
@ -50,7 +46,7 @@ Enable/Disable the environmental measurement plugin on-device display.
### environmental_measurement_plugin_sensor_pin
Specify the preferred GPIO Pin for sensor readings.
Specify the preferred GPIO Pin for sensor readings. May not be needed if using I2C.
### environmental_measurement_plugin_sensor_type
@ -72,15 +68,34 @@ Interval in seconds of how often we should try to send our measurements to the m
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'web', value: 'web'},
]}>
<TabItem value="cli">
TODO
```
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
```
</TabItem>
<TabItem value="android">
TODO
</TabItem>
<TabItem value="iOS">
TODO
</TabItem>
<TabItem value="web">
TODO
</TabItem>
</Tabs>

View file

@ -0,0 +1,58 @@
---
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

@ -42,6 +42,43 @@ const config = {
activeBasePath: "docs/academy",
},
*/
{
label: "Documentation",
items: [
{
label: "About Meshtastic",
to: "docs/software",
},
{
label: "Getting Started",
to: "docs/getting-started",
},
{
label: "Device Settings",
to: "docs/settings",
},
{
label: "Hardware Details",
to: "docs/hardware",
},
{
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",
},
],
},
{
label: "Firmware",
to: "firmware",
@ -52,11 +89,6 @@ const config = {
to: "showcase",
activeBasePath: "showcase",
},
{
label: "Docs",
to: "docs/getting-started",
activeBasePath: "docs/getting-started",
},
{
href: "https://meshtastic.discourse.group",
label: "Forum",

@ -1 +1 @@
Subproject commit 18fc4cdb522cb3740b3b547b3eac57781ca9c1f0
Subproject commit 60cf0545612bde3daf53f319db1b72d053f870d3

View file

@ -1,16 +1,5 @@
module.exports = {
Sidebar: {
"Getting Started": [
"getting-started/overview",
"getting-started/faq",
{
"Flashing firmware": [
"getting-started/flashing-esp32",
"getting-started/flashing-nrf52",
],
},
"getting-started/concepts",
],
About: {
Software: [
"software/overview",
{
@ -50,14 +39,14 @@ module.exports = {
{
"Meshtastic-python": [
"software/python/python-installation",
"software/python/python-standalone",
"software/python/python-cli",
"software/python/python-uses",
"software/python/python-commands",
"software/python/python-stream",
{
type: "link",
label: "API Docs",
href: "https://meshtastic-python.vercel.app/meshtastic/index.html",
href: "https://python.meshtastic.org/",
},
],
},
@ -66,6 +55,7 @@ module.exports = {
"software/plugins/plugins",
"software/plugins/range-test-plugin",
"software/plugins/ext-notif-plugin",
"software/plugins/canned-message-plugin",
"software/plugins/serial-plugin",
"software/plugins/store-forward-plugin",
"software/plugins/environment-plugin",
@ -103,7 +93,22 @@ module.exports = {
"software/other/ant",
],
},
],
},
GettingStarted: {
"Getting Started": [
"getting-started/overview",
"getting-started/faq",
{
"Flashing firmware": [
"getting-started/flashing-esp32",
"getting-started/flashing-nrf52",
],
},
"getting-started/concepts",
],
},
Settings: {
Settings: [
"software/settings/overview",
"software/settings/channel",
@ -116,9 +121,11 @@ module.exports = {
Plugins: [
"software/settings/environmental-measurement-plugin",
"software/settings/external-notification-plugin",
"software/settings/canned-message-plugin-settings",
"software/settings/range-test-plugin",
"software/settings/serial-plugin",
"software/settings/store-and-forward-plugin",
"software/settings/rotary-encoder-settings",
],
Advanced: [
"software/settings/channel-advanced",
@ -127,7 +134,7 @@ module.exports = {
},
],
},
],
Hardware: {
Hardware: [
"hardware/overview",
{
@ -152,6 +159,8 @@ module.exports = {
],
},
],
},
Contribute: {
Developers: [
"developers/overview",
{
@ -180,6 +189,8 @@ module.exports = {
],
},
],
},
Legal: {
Legal: [
"legal/overview",
"legal/licensing",