Merge branch 'master' into pr-doclogble

This commit is contained in:
Ben Meadors 2024-07-13 06:20:02 -05:00 committed by GitHub
commit 0ba9460a90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 499 additions and 155 deletions

View file

@ -89,7 +89,7 @@ us on [Discord](https://discord.com/invite/ktMAKGBnBs) to add your group.
## Türkiye
- [Meshtastic Türkiye Community - Telegram](https://t.me/trmesh)
- [Meshtastic Türkiye Community - Discord](https://discord.gg/ThcG4Arb)
- [Meshtastic Türkiye Community - Discord](https://discord.gg/7TGnZSSA)
- [Meshtastic Türkiye Community - Web](https://trmesh.org)
## Ukraine

View file

@ -13,7 +13,7 @@ import TabItem from "@theme/TabItem";
Using this module, a client device can ask a special Store & Forward Router to resend text messages after the client has been temporarily not in LoRa range of the mesh.
:::info
Only ESP32 based devices with onboard PSRAM like the T-Beam and T3S3 can be a Store & Forward Router. Requires the device to use at least firmware version 2.2.23 and to be set as a `ROUTER` or `ROUTER_CLIENT`.
Only ESP32 based devices with onboard PSRAM like the T-Beam and T3S3 can be a Store & Forward Router. Requires the device to use at least firmware version 2.2.23 and to be set as a `ROUTER`.
:::
When a client device requests the history from the Store & Forward Router, the router will resend the text messages over LoRa that it has received. The router will only return messages that are within the time window the client has requested up to the maximum number of messages configured for the router.
@ -33,7 +33,7 @@ Be mindful when requesting the history, as the router might send a lot of messag
Initial requirements for the Store and Forward Router:
- Must be installed on a `ROUTER` or `ROUTER_CLIENT` node.
- 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 module misses any messages, the reliability of the stored messages will be reduced.
- ESP32 Processor based device with onboard PSRAM (T-Beam > v1.0, T3S3, and maybe others).
@ -41,12 +41,12 @@ Initial requirements for the Store and Forward Router:
### Usage Overview
- To use / test this you will want at least 3 devices
- One ESP32 device with PSRAM configured as `ROUTER` or `ROUTER_CLIENT`.
- One ESP32 device with PSRAM configured as `ROUTER`.
- Two others will be regular clients. If one client sends a text message when the other is not in range, the other can request the history from the router to receive the missed message when it is back in range.
### Router setup
- Configure your device as a `ROUTER` or `ROUTER_CLIENT`.
- Configure your device as a `ROUTER`.
- Name your router node something that makes it easily identifiable, aka "Router".
- Configure the Store and Forward module

View file

@ -26,7 +26,12 @@ The device config options are: Role, Serial Output, and Debug Log. Device config
| TAK_TRACKER | Enables automatic TAK PLI broadcasts and reduces routine broadcasts. | Standalone PLI integration with ATAK systems for communication in tactical or coordinated operations. |
| REPEATER | Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list. | Best positioned in strategic locations to maximize the network's overall coverage. Device is not shown in topology. |
| ROUTER | Infrastructure node for extending network coverage by relaying messages. Visible in Nodes list. | Best positioned in strategic locations to maximize the network's overall coverage. Device is shown in topology. |
| ROUTER_CLIENT | Combination of both ROUTER and CLIENT. Not for mobile devices. | Devices in a strategic position for priority routing that need to also serve as a standard CLIENT. |
:::tip
Still not sure which role to use? Check out the [role configuration tips](/docs/configuration/tips/#roles)
:::
Looking for ROUTER_CLIENT? This role was deprecated in firmware 2.3.15. Learn more in the [2.3.15 release notes](https://github.com/meshtastic/firmware/releases/tag/v2.3.15.deb7c27)
### Role Comparison
@ -43,12 +48,11 @@ This table shows the **default** values after selecting a preset. As always, ind
| TAK | Yes | Optional | Regular | Yes | No | Yes |
| TAK_TRACKER | Yes | Optional | Regular | Yes | No | Yes |
| ROUTER | No[^2] | No | High | Yes | Yes | Yes |
| ROUTER_CLIENT | Yes | Yes | Highest | Yes | Yes | Yes |
| REPEATER | Yes | No | High | Yes | Yes | No |
[^1]: **Awake Only** indicates retransmissions will occur normally but not while asleep between transmission intervals.
[^2]: The Router role enables [Power Saving](/docs/configuration/radio/power/#power-saving) by default. Consider ROUTER_CLIENT if BLE/WiFi/Serial are still needed.
[^2]: The `ROUTER` role enables [Power Saving](/docs/configuration/radio/power/#power-saving) by default (ESP32 only). When needing to update a `ROUTER` via BLE, it's recommended you utilize an admin channel to temporarily change the role in order to update and then revert when done.
## Notes about Power Saving + Role behavior
@ -160,7 +164,7 @@ All device config options are available in the python CLI. Example commands are
| Setting | Acceptable Values | Default |
| --------------------------------- | ----------------------------------------------------------------------------------- | ----------------- |
| device.debug_log_enabled | `true`, `false` | `false` |
| device.role | `CLIENT`, `CLIENT_MUTE`, `ROUTER`, `ROUTER_CLIENT`, `REPEATER`, `TRACKER`, `SENSOR` | `CLIENT` |
| device.role | `CLIENT`, `CLIENT_MUTE`, `ROUTER`, `REPEATER`, `TRACKER`, `SENSOR` | `CLIENT` |
| device.rebroadcast_mode | `ALL`, `ALL_SKIP_DECODING`, `LOCAL_ONLY` | `ALL` |
| device.serial_enabled | `true`, `false` | `true` |
| device.button_gpio | `0` - `34` | `0` |

View file

@ -15,9 +15,9 @@ It is strongly recommended to keep your [ROLE](/docs/configuration/radio/device#
- `CLIENT` nodes efficiently repeat and route packets as needed.
- They use smart delays for rebroadcasting, improving network stability.
### Avoid `ROUTER`, `ROUTER_CLIENT`, and `REPEATER`
### Avoid `ROUTER`and `REPEATER`
Using `ROUTER`, `ROUTER_CLIENT, or `REPEATER` roles unnecessarily can cause serious network issues:
Using `ROUTER` or `REPEATER` roles unnecessarily can cause serious network issues:
- Increased risk of packet collision.
- Reduced message delivery rates.

View file

@ -21,3 +21,6 @@ You may wish to perform a [Factory Erase](/docs/getting-started/flashing-firmwar
### Convert RAK4631-R to RAK4631
If your device did not come with the Arduino bootloader you will need to [perform the conversion](/docs/getting-started/flashing-firmware/nrf52/convert-rak4631r).
### Use Raspberry Pi as a SWDIO Flash Tool
If your device can't be flashed through USB or Bluetooth, another option might be a [direct SWDIO connection](/docs/getting-started/flashing-firmware/nrf52/swdio).

View file

@ -0,0 +1,105 @@
---
id: swdio
title: SWDIO using a Raspberry Pi
sidebar_label: SWDIO using a Raspberry Pi
sidebar_position: 6
description: Instructions for uploading firmware through SWDIO by using a Raspberry Pi.
---
Most Meshtastic devices can be flashed simply using USB.
However, some (eg Seeed WM1110) require the use of an external device that can connect via "SWDIO".
There are dedicated devices such as the [RAKDAP1](https://store.rakwireless.com/products/daplink-tool)
that can do this work. However, for many people a Raspberry Pi is more convenient.
This article provides instructions on how use a Raspberry Pi as a SWDIO Flash Tool.
## Set up Wiring
The first step is to connect two wires between your Raspberry Pi and the SWDIO ports on your NRF52-based device.
Connect GPIO pin 11 on your Raspbery Pi to the CLK pin on the Meshtastic Device.
Connect GPIO pin 8 on your Raspbery Pi to the DIO pin on the Meshtastic Device.
Ensure you get the GPIO numbers correct.
Plug in your Raspberry Pi to USB power.
Plug in the Meshtastic Device to power.
## Install OpenOCD
You can use OpenOCD to manage the SWDIO connection with the Meshtastic Device.
Install it on your Raspberry Pi.
```
$ sudo apt update
$ sudo apt install libtool autoconf automake texinfo telnet gdb-multiarch git
$ git clone git://repo.or.cz/openocd.git
$ cd openocd/
$ ./bootstrap
$ ./configure --enable-bcm2835gpio
$ make -j4
$ sudo make install
```
## Check connection
Let's try connecting to the NRF52-based device with SWDIO before we do anything with firmware.
All the configuration you need is in the openocd repository.
```
$ openocd -f ./openocd/tcl/interface/raspberrypi-native.cfg -c "transport select swd" -f openocd/tcl/target/nrf52.cfg -s tcl
```
The first flag selects the Raspberry Pi as your host machine, the transport is SWDIO, and the last flag says you are connecting to a nRF52-based chip.
You should see something like this:
```
Open On-Chip Debugger 0.12.0+dev-00633-gad87fbd1c
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
swd
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 100 kHz
Info : SWD DPIDR 0x2ba01477
Info : [nrf52.cpu] Cortex-M4 r0p1 processor detected
Info : [nrf52.cpu] target has 6 breakpoints, 4 watchpoints
Info : [nrf52.cpu] Examination succeed
Info : [nrf52.cpu] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'telnet' connection on tcp/4444
```
If you see “Error connecting DP: cannot read IDR”, then you've probably connected the wires to the wrong place.
## Obtaining Firmware
Check the instructions for your [hardware](/docs/hardware/devices) to find the correct firmware for your device.
Then, copy the firmware file to your Raspberry Pi.
## Flashing Firmware
Once you have openocd running, you can connect to your Meshtastic device using telnet.
Flashing is as simple as running a few commands inside the telnet session:
```
$ telnet 127.0.0.1 4444
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Open On-Chip Debugger
> init
> reset init
> halt
> nrf5 mass_erase
> program new2.uf2 verify
> reset
> exit 0
```
Unplug the power and plug it back in after flashing.
## Connecting
Congratulations, you should now be able to connect to your device through Bluetooth in the Meshtastic app.

View file

@ -167,3 +167,13 @@ All-in-one development device with LoRa, WiFi, BT, touchscreen, accelerometer, g
| Name | MCU | Radio | WiFi | BT | GPS |
| :-------------------- | :--------------- | :----- | :--: | :-: | :-: |
| [unPhone](./unPhone) | ESP32-S3-WROOM-1 | RF950W | YES | 5.0 | NO |
### [Seeed Wio-WM1110](./seeed-wm1110)
nRF52840-based development boards with GPS, and multiple ports to attach sensors.
| Name | MCU | Radio | WiFi | BT | GPS |
| :--------------------------------------------------------- | :------- | :----- | :--: | :-: | :-: |
| [Seeed Wio-WM1110 Dev Kit](./seeed-wm1110?wio-sdk-wm1110) | nRF52840 | LR1110 | YES | 5.3 | YES |
| [Seeed Wio Tracker 1110](./seeed-wm1110?wio-tracker-wm1110) | nRF52840 | LR1110 | YES | 5.3 | YES |

View file

@ -47,8 +47,9 @@ sudo apt install libgpiod-dev libyaml-cpp-dev libbluetooth-dev
sudo apt install openssl libssl-dev libulfius-dev liborcania-dev
```
- The .deb Package is available as part of the release, installing the binary, a systemd service, and a config file. It is compiled for Debian Bookworm and incompatible with Bullseye.
- The .deb Package is available as [part of the release](https://github.com/meshtastic/firmware/releases/latest), installing the binary, a systemd service, and a config file. It is compiled for Debian Bookworm and incompatible with Bullseye.
```shell
wget https://github.com/meshtastic/firmware/releases/download/v{version}/meshtasticd_{version}_arm64.deb
sudo apt install ./meshtasticd_{version}arm64.deb
```

View file

@ -0,0 +1,108 @@
---
id: seeed-wm1110
title: Seeed Wio-WM1100
sidebar_label: Seeed Wio-WM1100
sidebar_position: 15
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
<Tabs
groupId="wm1110"
queryString="wm1110"
defaultValue="wio-sdk-wm1110"
values={[
{label: 'WM110 Dev Kit', value:'wio-sdk-wm1110'},
{label: 'WM110 Tracker', value: 'wio-tracker-wm1110'},
]}>
<TabItem value="wio-sdk-wm1110">
## Seeed Wio-WM1110 Dev Kit
:::caution Firmware Version Notice
Basic support for this device has only just been added, and not all features work
:::
- **MCU**
- Nordic nRF52840 (WiFi & Bluetooth)
- **LoRa Transceiver**
- Semtech LR1110
- **Frequency options**
- 868 MHz
- 915 MHz
- 923 MHz
- **Navigation Module**
- Semtech LR1110
- **Connectors**
- USB-C
- LoRa Antenna: SMA antenna connector and U.FL/IPEX
- GNSS Antenna: RP-SMA antenna connector U.FL/IPEX
- NFC Antenna: U.FL/IPEX
- GPIO
- I2C x1
- UART x1
- Solar Panel
- SWDIO
### Features
- Temperature and Humidity Sensor (SHT41)
- 3-Axis Accelerometer(LIS3DHTR)
- Reset switch, power jumpers, 2 configurable buttons
- AAA Battery x3
- Screen sold separately
### Resources
- Firmware file: `firmware-wio-sdk-wm1110-X.X.X.xxxxxxx.bin`
- Purchase Links:
- International
- [Seeed Studio](https://www.seeedstudio.com/Wio-WM1110-Dev-Kit-p-5677.html)
</TabItem>
<TabItem value="wio-tracker-wm1110">
## Seeed Wio Tracker 1110
:::caution Firmware Version Notice
Basic support for this device has only just been added, and not all features work
:::
- **MCU**
- Nordic nRF52840 (WiFi & Bluetooth)
- **LoRa Transceiver**
- Semtech LR1110
- **Frequency options**
- 868 MHz
- 915 MHz
- 923 MHz
- **Navigation Module**
- Semtech LR1110
- **Connectors**
- USB-C
- LoRa Antenna: on-board and U.FL/IPEX
- GNSS Antenna: on-board and U.FL/IPEX
- Grove connectors: ADC x1, I2C x1, UART x1, Digital x3
### Features
- Temperature and Humidity Sensor (SHT41)
- 3-Axis Accelerometer(LIS3DHTR)
- Reset switch, power jumpers
- Screen sold separately
### Resources
- Firmware file: `firmware-wio-tracker-wm1110-X.X.X.xxxxxxx.bin`
- Purchase Links:
- International
- [Seeed Studio](https://www.seeedstudio.com/Wio-Tracker-1110-Dev-Board-p-5799.html)
</TabItem>
</Tabs>

View file

@ -87,14 +87,14 @@ The meaning of these fields is as follows:
- "`id`" is the unique ID for this message.
- "`channel`" is the channel index this message was received on.
- "`from`" is the unique node number of the node on the mesh that sent this message.
- "`id`" inside the payload of a `NODEINFO_APP` message is the user ID of the node that sent it, which is currently just the hexadecimal representation of the node number.
- "`from`" is the unique decimal-equivalent Node ID of the node on the mesh that sent this message. (The hexadecimal value `7efeee00` represented by an integer in decimal is `2130636288`).
- "`id`" inside the payload of a `NODEINFO_APP` message is the hexadecimal Node ID (sometimes called User ID) of the node that sent it.
- "`hardware`" is the [hardware model](https://github.com/meshtastic/protobufs/blob/master/meshtastic/mesh.proto#L215) of the node sending the `NODEINFO_APP` message.
- "`longname`" is the long name of the device that sent the `NODEINFO_APP` message.
- "`shortname`" is the short name of the device that sent the `NODEINFO_APP` message.
- "`sender`" is the user ID of the gateway device, which is in this case the same node that sent the `NODEINFO_APP` message (the hexadecimal value `7efeee00` represented by an integer in decimal is `2130636288`).
- "`sender`" is the hexadecimal Node ID of the gateway device, which is in this case the same node that sent the `NODEINFO_APP` message.
- "`timestamp`" is the Unix Epoch when the message was received, represented as an integer in decimal.
- "`to`" is the node number of the destination of the message. In this case, "-1" means it was a broadcast message (this is the decimal integer representation of `0xFFFFFFFF`).
- "`to`" is the decimal-equivalent Node ID of the destination of the message. In this case, "-1" means it was a broadcast message (this is the decimal integer representation of `0xFFFFFFFF`).
- "`type`" is the type of the message, in this case it was a `NODEINFO_APP` message.
The `from` field can thus be used as a stable identifier for a specific node. Note that in firmware prior to 2.2.0, this is a signed value in JSON, while in firmware 2.2.0 and higher, the JSON values are unsigned.
@ -103,12 +103,18 @@ If the message received contains valid JSON in the payload, the JSON is deserial
#### JSON downlink to instruct a node to send a message
You can also send a JSON message to the topic `msh/2/json/mqtt/` to instruct a gateway node to send a message to the mesh. Note that the channel you publish it on **must** be called "mqtt". The JSON message should contain the following fields:
You can also send a JSON message to the topic `msh/2/json/mqtt/` to instruct a gateway node to send a message to the mesh.
To make this work, ensure that your node has a Meshtastic channel configured called "mqtt". Enable Downlink. The PSK can be random and doesn't matter. This channel allows the node to listen to messages on the `msh/2/json/mqtt/` topic.
Reboot your device after creating this channel.
The JSON message should contain the following fields:
```json
{
"from": <node number of MQTT node>,
"to": <node number of recipient for a DM (optional)>,
"from": <decimal Node ID of MQTT node>,
"to": <decimal Node ID of recipient for a DM (optional)>,
"channel": <channel index (optional)>,
"type": "type",
"payload": {
@ -118,7 +124,7 @@ You can also send a JSON message to the topic `msh/2/json/mqtt/` to instruct a g
}
```
`from` and `payload` fields are required for a valid envelope (note that in firmware &lt;2.2.20 a field `sender` was required, but this is no longer the case). The `from` field should be equal to the node number of the node that will transmit the message. Optionally, you can specify a different channel than the primary channel by setting the `channel` field to a channel index (0-7). Furthermore, you can send a direct message by setting the `to` field to the node number of the destination. If the `to` field is not set, the message will be broadcast to all nodes on the mesh.
`from` and `payload` fields are required for a valid envelope (note that in firmware &lt;2.2.20 a field `sender` was required, but this is no longer the case). The `from` field should be equal to the decimal Node ID of the node that will transmit the message. If the Node ID (sometimes called User ID) is !7efeee00, then the decimal equivalent would be 2130636288. Optionally, you can specify a different channel than the primary channel by setting the `channel` field to a channel index (0-7). Furthermore, you can send a direct message by setting the `to` field to the decimal Node ID of the destination. If the `to` field is not set, the message will be broadcast to all nodes on the mesh.
Currently two types of messages are supported: `"sendtext"` and `"sendposition"`.
For the type `sendtext`, the `payload` should be a string containing the text to send. For the type `sendposition`, the payload should be an object with the fields `latitude_i`, `longitude_i`, `altitude` (optional) and `time` (optional).

View file

@ -8,7 +8,43 @@ sidebar_position: 4
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
## Connection Arguments
### --port PORT
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.
This argument can also be specified as `--serial` or `-s`.
```shell title="Usage"
meshtastic --port /dev/ttyUSB0 --info
meshtastic --port COM4 --info
meshtastic -s --info
```
### --host HOST
The hostname/ipaddr of the device to connect to (over TCP). If a host is not provided, the CLI will try to connect to `localhost`.
This argument can also be specified as `--tcp` or `-t`.
```shell title="Usage"
meshtastic --host meshtastic.local --info
meshtastic --host --info
```
### --ble BLE
Connect to a Meshtastic device using its BLE address or name. This option allows for wireless communication with the device, similar to how the `--host` option is used for TCP connections. If an address is not provided, meshtastic will try to find a compatible device that's paired.
This argument can also be specified as `-b`.
```shell title="Usage"
meshtastic --ble "device_name_or_address" --info
meshtastic -b --info
```
## Help & Support Arguments
### -h or --help
@ -17,6 +53,25 @@ Shows a help message that describes the arguments.
```shell title="Usage"
meshtastic -h
```
### --version
Show program's version number and exit.
```shell title="Usage"
meshtastic --version
```
### --support
Print out info that would be helpful supporting any issues.
```shell title="Usage"
meshtastic --support
```
## Optional Arguments
### --export-config
Export the configuration of the device. (to be consumed by the '--configure' command).
@ -27,10 +82,6 @@ To create to a file with the connected device's configuration, this command's ou
meshtastic --export-config > example_config.yaml
```
```title="Usage"shell
meshtastic --export-config
```
### --configure
Configure radio using a yaml file.
@ -39,29 +90,13 @@ Configure radio using a yaml file.
meshtastic --configure example_config.yaml
```
### --port PORT
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.
```shell title="Usage"
meshtastic --port /dev/ttyUSB0 --info
meshtastic --port COM4 --info
```
### --host HOST
The hostname/ipaddr of the device to connect to (over TCP).
```shell title="Usage"
meshtastic --host HOST
```
### --seriallog SERIALLOG
Logs device serial output to either 'stdout', 'none' or a filename to append to.
Logs device serial output to either 'stdout', 'none' or a filename to append to. Defaults to 'stdout' if no filename is specified.
```shell title="Usage"
meshtastic --port /dev/ttyUSB0 --seriallog
meshtastic -t meshtastic.local --seriallog log.txt
```
### --info
@ -114,12 +149,20 @@ meshtastic --nodes
### --qr
Displays the QR code that corresponds to the current channel.
Displays the URL and QR code that corresponds to the current primary channel.
```shell title="Usage"
meshtastic --qr
```
### --qr-all
Displays the URL and QR code that corresponds to all configured channels on the node.
```shell title="Usage"
meshtastic --qr-all
```
### --get [config_section]
Gets a preferences field.
@ -131,6 +174,12 @@ meshtastic --get lora
meshtastic --get lora.region
```
To see all valid values, pass an invalid value, such as `0`:
```shell title="Usage"
meshtastic --get 0
```
### --set [config_section].[option]&nbsp; [value]
Sets a preferences field.
@ -143,15 +192,24 @@ meshtastic --set lora.region Unset
### --seturl SETURL
Set a channel URL.
Set the channel URL, which contains LoRa configuration plus the configuration of channels. Replaces your current configuration and channels completely.
```shell title="Usage"
meshtastic --seturl https://www.meshtastic.org/c/GAMiIE67C6zsNmlWQ-KE1tKt0fRKFciHka-DShI6G7ElvGOiKgZzaGFyZWQ=
```
### --pos-fields POS_FIELDS
Configure position fields to send with positions; can pass multiple values. With 0 values, list current settings.
```shell title="Usage"
meshtastic --pos-fields
meshtastic --pos-fields ALTITUDE HEADING SPEED
```
### --ch-index CH_INDEX
Set the specified channel index.
Act on the specified channel index. Applies to options that configure channels (such as `--ch-set` and `--ch-del`) as well as options that send messages to the mesh (such as `--sendtext` and `--traceroute`).
```shell title="Usage"
meshtastic --ch-index 1 --ch-disable
@ -161,29 +219,35 @@ meshtastic --ch-index 1 --ch-disable
Add a secondary channel, you must specify a channel name.
Incompatible with `--ch-index`. If you pass `--ch-add`, any subsequent `--ch-set` and other commands that use a channel will use the index of the newly-added channel.
```shell title="Usage"
meshtastic --ch-add testing-channel
```
### --ch-del
Delete the ch-index channel.
Delete the channel specified by `--ch-index`.
```shell title="Usage"
meshtastic --ch-index 1 --ch-del
```
### --ch-enable
### --ch-enable (deprecated)
Enable the specified channel.
This option is deprecated. Using `--ch-add` is preferred in order to ensure there are no gaps in the channel list.
Enable the channel specified by `--ch-index`.
```shell title="Usage"
meshtastic --ch-index 1 --ch-enable
```
### --ch-disable
### --ch-disable (deprecated)
Disable the specified channel.
This option is deprecated. Using `--ch-del` is preferred in order to ensure there are no gaps in the channel list.
Disable the channel specified by `--ch-index`.
```shell title="Usage"
meshtastic --ch-index 1 --ch-disable
@ -191,7 +255,7 @@ meshtastic --ch-index 1 --ch-disable
### --ch-set CH_SET CH_SET
Set a channel parameter.
Set a channel parameter on the channel specified by `--ch-index`.
```shell title="Usage"
meshtastic --ch-set id 1234 --ch-index 0
@ -255,7 +319,7 @@ meshtastic --ch-shortfast
### --set-owner SET_OWNER
Set device owner name.
Set device owner name, sometimes called the long name.
```shell title="Usage"
meshtastic --set-owner "MeshyJohn"
@ -271,7 +335,9 @@ meshtastic --set-owner-short "MJ"
### --set-ham SET_HAM
Set licensed Ham ID and turn off encryption.
Set licensed Ham ID (by setting the owner name) and turn off encryption on the primary channel.
To disable Ham mode, use `--set-owner` and `--set-owner-short` to reset the owner names, and use `--seturl` or `--ch-set` commands to configure channels with the name and encryption you wish them to have. Or, use `--factory-reset` to reset to default settings.
```shell title="Usage"
meshtastic --set-ham KI1345
@ -279,7 +345,9 @@ meshtastic --set-ham KI1345
### --dest DEST
The destination node id for any sent commands. Used for [Remote Node Administration](/docs/configuration/remote-admin)
The destination node id for any sent commands, if not passed to a command another way. Used for [Remote Node Administration](/docs/configuration/remote-admin).
On many shells, exclamation points trigger special behavior unless enclosed in single quotes.
```shell title="Usage"
meshtastic --dest '!28979058' --set-owner "MeshyJohn"
@ -287,23 +355,16 @@ meshtastic --dest '!28979058' --set-owner "MeshyJohn"
### --sendtext SENDTEXT
Send a text message. Can specify a channel index ('--ch-index') or a destination ('--dest').
Send a text message. Can specify a channel index (`--ch-index`) and/or a destination (`--dest`).
```shell title="Usage"
meshtastic --sendtext "Hello Mesh!"
```
### --sendping
Send a ping message (which requests a reply).
```shell title="Usage"
meshtastic --sendping
meshtastic --sendtext 'Hello Mesh!'
meshtastic --ch-index 1 --sendtext 'Hello secondary channel!'
```
### --traceroute TRACEROUTE
Traceroute from connected node to a destination. You need pass the destination ID as an argument. Only nodes that have the encryption key can be traced.
Traceroute from connected node to a destination. You need pass the destination ID as an argument, and may pass `--ch-index` to specify a channel. The node you are tracing must have the same channel configured, and only nodes that share the channel will identify themselves within the response. With recent enough firmware, other nodes may be included as `!ffffffff` but not with their actual ID.
```shell title="Usage"
meshtastic --traceroute '!ba4bf9d0'
@ -311,19 +372,27 @@ meshtastic --traceroute '!ba4bf9d0'
### --request-telemetry
Request telemetry from a node. You need to pass the destination ID as an argument with '--dest'. For repeaters, the nodeNum is required.
Request telemetry from a node. You need to pass the destination ID as an argument with `--dest`. For repeaters, using the node's decimal ID may be more effective, but a hexadecimal ID should work as well.
```shell title="Usage"
meshtastic --request-telemetry --dest '!ba4bf9d0'
meshtastic --request-telemetry --dest 1828779180
```
### --ack
### --request-position
Used in combination with --sendtext to wait for an acknowledgment.
Request position from a node. You need to pass the destination ID as an argument with `--dest`.
```shell title="Usage"
meshtastic --sendtext "Hello Mesh!" --ack
meshtastic --request-position --dest '!ba4bf9d0' --ch-index 1
```
### --ack
Used in combination with `--sendtext` and other commands to wait for an acknowledgment. Not all commands will be able to return an acknowledgment. Best used for commands that specify a single destination node.
```shell title="Usage"
meshtastic --sendtext 'Hello Mesh!' --dest '!28979058' --ack
```
### --reboot
@ -358,14 +427,128 @@ Tell the node to clear its list of nodes.
meshtastic --reset-nodedb
```
### --remove-node NODE
Tell the node to remove the specified node from the NodeDB.
```shell title="Usage"
meshtastic --remove-node '!48759737'
```
### --reply
Reply to received messages.
Listen for messages. When one is received, send a message to the primary channel repeating the message along with some information.
```shell title="Usage"
meshtastic --reply
```
### --no-time
Suppress sending the current time to the mesh on startup. May improve reliability and startup time.
```shell title="Usage"
meshtastic --port /dev/ttyUSB0 --no-time
```
### --no-nodes
Instruct the node to not send nodeinfo from the NodeDB on startup. Requires firmware of sufficient version. Commands that use node information may behave unpredictably, since that information will not be populated, but this can improve efficiency for commands that don't.
```shell title="Usage"
meshtastic --no-nodes --no-time --sendtext "Firing off a quick message"
```
### --wait-to-disconnect WAIT_TO_DISCONNECT
After performing whatever actions are specified by other options, wait before disconnecting from the device. Some devices will reboot when the serial connection disconnects, so adding a wait time may improve reliability. Defaults to 5 seconds if not provided.
```shell title="Usage"
meshtastic --set lora.channel_num 20 --wait-to-disconnect 10
```
### --setalt SETALT
Set device altitude (allows use without GPS), and enables fixed position mode.
Can only be used on locally-connected nodes and not along with `--dest`.
```shell title="Usage"
meshtastic --setalt 120
```
### --setlat SETLAT
Set device latitude (allows use without GPS), and enables fixed position mode.
Can only be used on locally-connected nodes and not along with `--dest`.
```shell title="Usage"
meshtastic --setlat 25.2
```
### --setlon SETLON
Set device longitude (allows use without GPS), and enables fixed position mode.
Can only be used on locally-connected nodes and not along with `--dest`.
```shell title="Usage"
meshtastic --setlon -16.8
```
### --remove-position
Clear the node's currently set fixed position and disable fixed position mode.
Can only be used on locally-connected nodes and not along with `--dest`.
```shell title="Usage"
meshtastic --remove-position
```
### --debug
Show API library debug log messages.
```shell title="Usage"
meshtastic --debug --info
```
### --listen
Stay open and listen to the stream of protocol buffer messages. This option enables `--debug` even if it is not provided alongside this argument.
```shell title="Usage"
meshtastic --listen
```
### --test
Run stress test against all connected Meshtastic devices.
```shell title="Usage"
meshtastic --test
```
### --ble-scan
Scan for available Meshtastic devices using BLE. This command lists discoverable devices, providing a convenient method to identify devices for connection via BLE.
```shell title="Usage"
meshtastic --ble-scan
```
### --noproto
Don't start the API, just function as a dumb serial terminal. Probably not very helpful from the command line. Used more for testing/internal needs.
```shell title="Usage"
meshtastic --noproto
```
## Remote Hardware arguments
### --gpio-wrb GPIO_WRB GPIO_WRB
Set a particular GPIO # to 1 or 0.
@ -390,90 +573,14 @@ Start watching a GPIO mask for changes.
meshtastic --port /dev/ttyUSB0 --gpio-watch 0x10 --dest '!28979058'
```
### --no-time
## Tunnel arguments
Suppress sending the current time to the mesh.
### --tunnel
```shell title="Usage"
meshtastic --port /dev/ttyUSB0 --no-time
```
Linux only, very experimental. Low bandwidth and low reliability.
### --setalt SETALT
Create a TUN tunnel device for forwarding IP packets over the mesh.
Set device altitude (allows use without GPS).
## --subnet TUNNEL_NET
```shell title="Usage"
meshtastic --setalt 120
```
### --setlat SETLAT
Set device latitude (allows use without GPS).
```shell title="Usage"
meshtastic --setlat 25.2
```
### --setlon SETLON
Set device longitude (allows use without GPS).
```shell title="Usage"
meshtastic --setlon -16.8
```
### --debug
Show API library debug log messages.
```shell title="Usage"
meshtastic --debug --info
```
### --test
Run stress test against all connected Meshtastic devices.
```shell title="Usage"
meshtastic --test
```
### --ble BLE
Connect to a Meshtastic device using its BLE address or name. This option allows for wireless communication with the device, similar to how the `--host` option is used for TCP connections.
```shell title="Usage"
meshtastic --ble "device_name_or_address" --info
```
### --ble-scan
Scan for available Meshtastic devices using BLE. This command lists discoverable devices, providing a convenient method to identify devices for connection via BLE.
```shell title="Usage"
meshtastic --ble-scan
```
### --noproto
Don't start the API, just function as a dumb serial terminal. Probably not very helpful from the command line. Used more for testing/internal needs.
```shell title="Usage"
meshtastic --noproto
```
### --version
Show program's version number and exit.
```shell title="Usage"
meshtastic --version
```
### --support
Print out info that would be helpful supporting any issues.
```shell title="Usage"
meshtastic --support
```
Set the subnet for the local end of the tunnel established using `--tunnel`.

@ -1 +1 @@
Subproject commit eeddd10c108f1516e6e0c878fbaa8ed40a4d279d
Subproject commit 77fafb2b027787f1206fe3774a2f456f1ffc721d