mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-12-26 22:19:46 -08:00
Streamline, Spelling, grammer, made more intuitive
This commit is contained in:
parent
88fc361ec2
commit
a24de292a1
|
@ -10,6 +10,11 @@ import TabItem from '@theme/TabItem';
|
|||
|
||||
### Check Data Cable
|
||||
|
||||
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)
|
||||
:::
|
||||
|
||||
<Tabs
|
||||
groupId="operating-system"
|
||||
defaultValue="linux"
|
||||
|
@ -20,40 +25,26 @@ import TabItem from '@theme/TabItem';
|
|||
]}>
|
||||
<TabItem value="linux">
|
||||
|
||||
To check if you have a data cable that will work, plug your device into the computer and **then** navigate to `Terminal` and enter the following command:
|
||||
```bash
|
||||
lsusb
|
||||
```
|
||||
you should see something like `CP210X USB to UART Bridge Controller`.
|
||||
|
||||
:::note
|
||||
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)
|
||||
:::
|
||||
> Open a `Terminal` and enter the following command:
|
||||
> ```bash
|
||||
> lsusb
|
||||
> ```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="macos">
|
||||
|
||||
To check if you have a data cable that will work, plug your device into the computer and **then** navigate to `Apple Menu > About This Mac > System Report... > Hardware > USB` you should see something like `CP210X USB to UART Bridge Controller`.
|
||||
|
||||
:::note
|
||||
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)
|
||||
:::
|
||||
|
||||
> Navigate to `Apple Menu > About This Mac > System Report... > Hardware > USB`.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="windows">
|
||||
|
||||
To check if you have a data cable that will work, plug your device into the computer and navigate to `Device Manager > Ports` and ensure the device is shown. You should see something like `CP210X USB to UART Bridge Controller`.
|
||||
|
||||
If your device is showing up under `Device Manager > Ports > Other Devices` you need to install the driver from Silicon Labs for the CP210X USB to UART bridge
|
||||
|
||||
:::note
|
||||
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)
|
||||
:::
|
||||
> Navigate to `Device Manager > Ports (COM & LPT)`.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
You should see something like `CP210X USB to UART Bridge Controller`. If you don't, you will need to install the appropriate driver from [Silicon Labs](https://sliabs.com/developers/usb-to-uart-bridge-vcp-drivers).
|
||||
|
||||
### Download Latest Firmware
|
||||
|
||||
Prebuilt binaries for the supported radios are available in our releases. 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.
|
||||
|
@ -70,8 +61,6 @@ The [T-Beam 0.7](../hardware/tbeam-hardware#t-beam---v07) board is an earlier ve
|
|||
|
||||
## Command Line Interface Instructions
|
||||
|
||||
### Install Prerequisite Software
|
||||
|
||||
<Tabs
|
||||
groupId="operating-system"
|
||||
defaultValue="linux"
|
||||
|
@ -82,25 +71,35 @@ The [T-Beam 0.7](../hardware/tbeam-hardware#t-beam---v07) board is an earlier ve
|
|||
]}>
|
||||
<TabItem value="linux">
|
||||
|
||||
Check if you have `python3` and `pip` installed with the following command
|
||||
```bash
|
||||
python3 --version
|
||||
pip3 --version
|
||||
```
|
||||
If `python3` is not installed, install with
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install python3.6
|
||||
```
|
||||
If `pip` is not installed, install with
|
||||
```bash
|
||||
sudo apt-get install python3-pip
|
||||
```
|
||||
### Install Prerequisite Software
|
||||
|
||||
> Check if you have `python3` and `pip` installed with the following command
|
||||
> ```bash
|
||||
> python3 --version
|
||||
> pip3 --version
|
||||
> ```
|
||||
> If `python3` is not installed, install with
|
||||
> ```bash
|
||||
> sudo apt-get update
|
||||
> sudo apt-get install python3.6
|
||||
> ```
|
||||
> If `pip` is not installed, install with
|
||||
> ```bash
|
||||
> sudo apt-get install python3-pip
|
||||
> ```
|
||||
|
||||
### Install `esptool`
|
||||
|
||||
> ```bash
|
||||
> pip3 install --upgrade esptool
|
||||
> ```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="macos">
|
||||
|
||||
OS X comes with `Python 2.7` installed, but not `pip`. The following uses Homebrew to install `python3` which includes `pip3`. On MacOS you will use `pip3` instead of `pip`.
|
||||
### Install Prerequisite Software
|
||||
|
||||
> OS X comes with `Python 2.7` installed, but not `pip`. The following uses Homebrew to install `python3` which includes `pip3`. On MacOS you will use `pip3` instead > of `pip`.
|
||||
|
||||
:::note
|
||||
Check if you have Homebrew installed with the following command
|
||||
|
@ -110,26 +109,33 @@ brew -v
|
|||
If it's not installed, follow the instructions on the [Homebrew website](https://brew.sh) before continuing.
|
||||
:::
|
||||
|
||||
Check if you have `python3` and `pip` installed with the following command
|
||||
```bash
|
||||
python3 --version
|
||||
pip3 --version
|
||||
```
|
||||
If `python3` is not installed, install with
|
||||
Install Python3
|
||||
```bash
|
||||
brew install python3
|
||||
```
|
||||
Confirm `pip3` was installed alongside `python3`
|
||||
```bash
|
||||
pip3 -v
|
||||
```
|
||||
> Check if you have `python3` and `pip` installed with the following command
|
||||
> ```bash
|
||||
> python3 --version
|
||||
> pip3 --version
|
||||
> ```
|
||||
> If `python3` is not installed, install with
|
||||
> Install Python3
|
||||
> ```bash
|
||||
> brew install python3
|
||||
> ```
|
||||
> Confirm `pip3` was installed alongside `python3`
|
||||
> ```bash
|
||||
> pip3 -v
|
||||
> ```
|
||||
|
||||
### Install `esptool`
|
||||
|
||||
> ```bash
|
||||
> pip3 install --upgrade esptool
|
||||
> ```
|
||||
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="windows">
|
||||
|
||||
- Download and install [Python](https://www.python.org/). When installing, make sure to click `Add Python X.Y to PATH`.
|
||||
- Download and install [Gitbash](https://gitforwindows.org/) (or other appropriate shell) and run all subsequent commands from that shell.
|
||||
> - Download and install [Python](https://www.python.org/). When installing, make sure to click `Add Python X.Y to PATH`.
|
||||
> - Download and install [Gitbash](https://gitforwindows.org/) (or other appropriate shell) and run all subsequent commands from that shell.
|
||||
|
||||
:::note
|
||||
Confirm installation of `python` & `pip` with the following commands.
|
||||
|
@ -141,49 +147,23 @@ pip --version
|
|||
```
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
### Install `esptool`
|
||||
|
||||
|
||||
### Install `esptool`
|
||||
|
||||
<Tabs
|
||||
groupId="operating-system"
|
||||
defaultValue="linux"
|
||||
values={[
|
||||
{label: 'Linux', value: 'linux'},
|
||||
{label: 'macOS', value: 'macos'},
|
||||
{label: 'Windows', value: 'windows'},
|
||||
]}>
|
||||
<TabItem value="linux">
|
||||
|
||||
```bash
|
||||
pip3 install --upgrade esptool
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="macos">
|
||||
|
||||
```bash
|
||||
pip3 install --upgrade esptool
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="windows">
|
||||
|
||||
```bash
|
||||
pip install --upgrade esptool
|
||||
```
|
||||
> ```bash
|
||||
> pip install --upgrade esptool
|
||||
> ```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
|
||||
### 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:
|
||||
|
||||
:::important
|
||||
On windows, you must explicitly declare esptools as a .py script. Use `esptools.py chip_id`.
|
||||
:::
|
||||
|
||||
```bash title="Command"
|
||||
esptool chip_id
|
||||
```
|
||||
|
@ -214,30 +194,67 @@ cd /Downloads/firmware/
|
|||
```
|
||||
|
||||
### Install/Update Firmware
|
||||
Install or Update the device that you have by using the following commands according to your operating system:
|
||||
|
||||
:::caution
|
||||
Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly.
|
||||
:::
|
||||
|
||||
#### Install Firmware
|
||||
<Tabs
|
||||
groupId="operating-system"
|
||||
defaultValue="linux"
|
||||
values={[
|
||||
{label: 'Linux', value: 'linux'},
|
||||
{label: 'macOS', value: 'macos'},
|
||||
{label: 'Windows', value: 'windows'},
|
||||
]}>
|
||||
<TabItem value="linux">
|
||||
|
||||
Install the correct firmware for your board using the following command. Be sure to select the correct board and frequency.
|
||||
```bash title="Command"
|
||||
./device-install.sh -f firmware-BOARD-VERSION.bin
|
||||
```
|
||||
```bash title="Example"
|
||||
./device-install.sh -f firmware-heltec-EU865-1.2.0.bin
|
||||
```
|
||||
#### Install
|
||||
|
||||
> ```bash title="Command"
|
||||
> ./device-install.sh -f firmware-BOARD-VERSION.bin
|
||||
> ```
|
||||
|
||||
#### Update Firmware
|
||||
#### Update
|
||||
|
||||
> ```bash title="Command"
|
||||
> ./device-update.sh -f firmware-BOARD-VERSION.bin
|
||||
> ```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="macos">
|
||||
|
||||
#### Install
|
||||
|
||||
> ```bash title="Command"
|
||||
> ./device-install.sh -f firmware-BOARD-VERSION.bin
|
||||
> ```
|
||||
|
||||
#### Update
|
||||
|
||||
> ```bash title="Command"
|
||||
> ./device-update.sh -f firmware-BOARD-VERSION.bin
|
||||
> ```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="windows">
|
||||
|
||||
#### Install
|
||||
|
||||
> ```bash title="Command"
|
||||
> ./device-install.bat -f firmware-BOARD-VERSION.bin
|
||||
> ```
|
||||
|
||||
#### Update
|
||||
|
||||
> ```bash title="Command"
|
||||
> ./device-update.bat -f firmware-BOARD-VERSION.bin
|
||||
> ```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
To update a the firmware on an existing Meshtastic device use the following command. Be sure to select the correct board and frequency.
|
||||
```bash title="Command"
|
||||
./device-update.sh -f firmware-BOARD-VERSION.bin
|
||||
```
|
||||
```bash title="Example"
|
||||
./device-update.sh -f firmware-heltec-EU865-1.2.0.bin
|
||||
```
|
||||
|
||||
## Graphical User Interface Instructions
|
||||
|
||||
|
@ -261,66 +278,43 @@ ESPHome Flasher also provides instructions to build from source or install via `
|
|||
| [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases/latest) |
|
||||
| :-----------------------------------------------------------: |
|
||||
|
||||
### Open ESPHome Flasher
|
||||
|
||||
> There should be no installation required. Connect your device using a data USB cable and refresh the `Serial Port`. Select the port that your device is connected to.
|
||||
|
||||
:::note
|
||||
ESPHome Flasher for linux is a prebuilt binary for Ubuntu. These instructions were only tested on Ubuntu. Mileage may very on other distros.
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="macos">
|
||||
|
||||
| [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases/latest) |
|
||||
| :-----------------------------------------------------------: |
|
||||
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="windows">
|
||||
|
||||
| [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases/latest) |
|
||||
| :-----------------------------------------------------------: |
|
||||
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Open ESPHome Flasher
|
||||
|
||||
|
||||
<Tabs
|
||||
groupId="operating-system"
|
||||
defaultValue="linux"
|
||||
values={[
|
||||
{label: 'Linux', value: 'linux'},
|
||||
{label: 'macOS', value: 'macos'},
|
||||
{label: 'Windows', value: 'windows'},
|
||||
]}>
|
||||
<TabItem value="linux">
|
||||
|
||||
There should be no installation required. Connect your device using a data USB cable and refresh the `Serial Port`. Select the port that your device is connected to.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="macos">
|
||||
|
||||
There should be no installation required. Connect your device using a data USB cable and refresh the `Serial Port`. Select the port that your device is connected to.
|
||||
### Open ESPHome Flasher
|
||||
|
||||
> There should be no installation required. Connect your device using a data USB cable and refresh the `Serial Port`. Select the port that your device is connected to.
|
||||
|
||||
:::note
|
||||
If you get an error saying `The application "ESPHome-Flasher.app" can't be opened` it is likely a permissions issue. See [here](https://github.com/esphome/esphome-flasher/issues/26#issuecomment-671061140) for instructions.
|
||||
:::
|
||||
:::note
|
||||
If you get an error saying `"ESPHome-Flasher.app" cannot be opened because the developer cannot be verified`, click `cancel`. Right click on the application and select `Open`. Select `Open` on the confirmation alert.
|
||||
>If you get an error saying `"ESPHome-Flasher.app" cannot be opened because the developer cannot be verified`, click `cancel`. Right click on the application and select `Open`. Select `Open` on the confirmation alert.
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="windows">
|
||||
|
||||
There should be no installation required. Connect your device using a data USB cable and refresh the `Serial Port`. Select the port that your device is connected to.
|
||||
| [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases/latest) |
|
||||
| :-----------------------------------------------------------: |
|
||||
|
||||
### Open ESPHome Flasher
|
||||
|
||||
> There should be no installation required. Connect your device using a data USB cable and refresh the `Serial Port`. Select the port that your device is connected to.
|
||||
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
:::note
|
||||
If your device is not showing under `Serial Port` you may need to install the drivers for the [CP210X USB to UART bridge](https://www.silabes.com/products/development-tools/sofware/usb-to-uart-bridge-vcp-drivers).
|
||||
:::
|
||||
|
||||
### Select Firmware
|
||||
|
||||
Browse to the previously downloaded firmware and select the correct firmware based on the board type and frequency.
|
||||
|
|
|
@ -7,14 +7,14 @@ sidebar_label: Multiple channels
|
|||
Version 1.2 of the software adds support for multiple (simultaneous) channels. The idea behind this feature is that a mesh can allow multiple users/groups to be share common mesh infrastructure. Even including routing messages for others when no one except that subgroup of users has the encryption keys for their private channel.
|
||||
|
||||
:::note
|
||||
Older meshtastic applications that don't yet understand multi-channel support will only show the user the primary channel.
|
||||
Older Meshtastic applications that don't yet understand multi-channel support will only show the user the primary channel.
|
||||
:::
|
||||
|
||||
### What is the Primary channel
|
||||
|
||||
The way this works is that each node keeps a list of channels it knows about. One of those channels (normally the first one) is labelled as the "PRIMARY" channel. The primary channel is the **only** channel that is used to set radio parameters. This channel controls things like spread factor, coding rate, bandwidth etc... Indirectly this channel also is used to select the specific frequency that all members of this mesh are talking over.
|
||||
|
||||
This channel may or may not have a PSK (encryption). If you are providing mesh to 'the public' we recommend that you always leave this channel with its default psk. The default PSK is technically encrypted (and random users sniffing the ether would have to use meshtastic to decode it), but the key is included in the github source code and you should assume any 'attacker' would have it. But for a 'public' mesh you want this, because it allows anyone using meshtastic in your area to send packets through 'your' mesh.
|
||||
This channel may or may not have a PSK (encryption). If you are providing mesh to 'the public' we recommend that you always leave this channel with its default psk. The default PSK is technically encrypted (and random users sniffing the ether would have to use Meshtastic to decode it), but the key is included in the github source code and you should assume any 'attacker' would have it. But for a 'public' mesh you want this, because it allows anyone using Meshtastic in your area to send packets through 'your' mesh.
|
||||
|
||||
```bash title="Setting default channel"
|
||||
$ meshtastic --seturl https://www.meshtastic.org/d/#CgUYAyIBAQ
|
||||
|
@ -34,7 +34,7 @@ Primary channel URL: https://www.meshtastic.org/d/#CgUYAyIBAQ
|
|||
|
||||
### How to use Secondary channels
|
||||
|
||||
Any channel you add after that Primary channel is Secondary. Secondary channels are used only for encyryption and (in the case of some special applications) security. If you would like to have a private channel over a more public mesh, you probably want to create a secondary channel. When sharing that URL with your private group you will share the "Complete URL". The complete URL includes your secondary channel (for encryption) and the primary channel (to provide radio/mesh access).
|
||||
Any channel you add after that Primary channel is Secondary. Secondary channels are used only for encryption and (in the case of some special applications) security. If you would like to have a private channel over a more public mesh, you probably want to create a secondary channel. When sharing that URL with your private group you will share the "Complete URL". The complete URL includes your secondary channel (for encryption) and the primary channel (to provide radio/mesh access).
|
||||
|
||||
Secondary channels **must** have a PSK (encryption).
|
||||
|
||||
|
|
|
@ -30,11 +30,11 @@ The screen is split up into pages, through which you can navigate using the prog
|
|||
|
||||
![Message page](/img/screen/mesh-message.jpg)
|
||||
|
||||
The next pages display information about the nodes that are currently on the mesh. This includes the distance and direction to that node, along with signal strenth and time last seen.
|
||||
The next pages display information about the nodes that are currently on the mesh. This includes the distance and direction to that node, along with signal strength and time last seen.
|
||||
|
||||
![Node page](/img/screen/mesh-node1.jpg) ![Node page](/img/screen/mesh-node2.jpg)
|
||||
|
||||
The next page shows information about the device, battery power, number of nodes and how many are connected current, number of GPS satalites being received, channel name, last digits of the MAC address, and names of the last nodes to join the mesh.
|
||||
The next page shows information about the device, battery power, number of nodes and how many are connected current, number of GPS satellites being received, channel name, last digits of the MAC address, and names of the last nodes to join the mesh.
|
||||
|
||||
![Channel page](/img/screen/mesh-channel.jpg)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ title: Power Management State Machine
|
|||
sidebar_label: Power Management
|
||||
---
|
||||
|
||||
Long battery life is one of the main goals of this project. Based on intial measurements, the current code should run for about three days between charging (assuming using a t-beam with a 3500mAh 18650 battery). This will hopefully be increased to around eight days in the future.
|
||||
Long battery life is one of the main goals of this project. Based on initial measurements, the current code should run for about three days between charging (assuming using a t-beam with a 3500mAh 18650 battery). This will hopefully be increased to around eight days in the future.
|
||||
|
||||
## States
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ Primary channel URL: https://www.meshtastic.org/d/#CgUYAyIBAQ
|
|||
Complete URL (includes all channels): https://www.meshtastic.org/d/#CgUYAyIBAQopIiAdbsTecxuI1u-voyGwOicsKaPt5ICG23ONsjH-vk5CaCoFYWRtaW4
|
||||
```
|
||||
|
||||
Notice that now we have a new secondary channel and the `--info` option prints out TWO URLs. The `Complete URL` includes all of the channels this node understands. The URL contains the preshared keys and should be treated with caution and kept a secret. Wehn deploying remote adminstration, you only need the node you want to adminster and the node you are locally connected to know this new "admin" channel. All of the other nodes will forward the packets as long as they are a member of the primary channel.
|
||||
Notice that now we have a new secondary channel and the `--info` option prints out TWO URLs. The `Complete URL` includes all of the channels this node understands. The URL contains the preshared keys and should be treated with caution and kept a secret. When deploying remote adminstration, you only need the node you want to administer and the node you are locally connected to know this new "admin" channel. All of the other nodes will forward the packets as long as they are a member of the primary channel.
|
||||
|
||||
## Sharing the admin channel with other nodes
|
||||
|
||||
|
@ -95,7 +95,7 @@ INFO:root:Requesting configuration from remote node (this could take a while)
|
|||
You will need to escape the `!` using `\!` otherwise the command will fail.
|
||||
:::
|
||||
:::note
|
||||
The above note needs clarificaiton. Currently, you refer to other nodes with `!########`. No backslashes are used.
|
||||
The above note needs clarification. Currently, you refer to other nodes with `!########`. No backslashes are used.
|
||||
:::
|
||||
|
||||
And you can now confirm via the local node that the remote node has changed:
|
||||
|
@ -128,7 +128,7 @@ Complete URL (includes all channels): https://www.meshtastic.org/d/#CgUYAyIBAQop
|
|||
|
||||
## Admin Channel Setup is Complete
|
||||
|
||||
You've finished setting up and adding 2 devices to the admin channel. Remember, because this is a mesh network, it doesn't matter which node you are at; you could adminster your first device we set up from the second one we added to the channel. And the settings and examples on this page are just a tast of the other settings you can set. Also, if you ever want to view a setting without having to read through the `--info`, you can always do the following:
|
||||
You've finished setting up and adding 2 devices to the admin channel. Remember, because this is a mesh network, it doesn't matter which node you are at; you could administer your first device we set up from the second one we added to the channel. And the settings and examples on this page are just a taste of the other settings you can set. Also, if you ever want to view a setting without having to read through the `--info`, you can always do the following:
|
||||
|
||||
```bash title="--get vs. --info"
|
||||
$ meshtastic --dest \!28979058 --get ls_secs
|
||||
|
@ -138,9 +138,10 @@ ls_secs: 301
|
|||
Completed getting preferences
|
||||
```
|
||||
|
||||
For further reading, I recommend starting out with [Meshtastic-python](../python/python-cli) if you haven't already gone throught this (hopefully you have since you are reading this). But for a full reference to the settings you can change, please see:
|
||||
For further reading, I recommend starting out with [Meshtastic-python](../python/python-cli) if you haven't already gone through this (hopefully you have since you are reading this). But for a full reference to the settings you can change, please see:
|
||||
|
||||
[Settings Overview](/docs/settings)
|
||||
[Complete list of user settings in Protobufs](https://meshtastic.org/docs/developers/protobufs/api#radioconfiguserpreferences)
|
||||
|
||||
## Areas for future development
|
||||
|
||||
|
|
|
@ -4,21 +4,24 @@ title: Command line interface
|
|||
sidebar_label: CLI usage
|
||||
---
|
||||
|
||||
This pip package will also install 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. The source code for this tool is also a good [example](https://github.com/meshtastic/Meshtastic-python/blob/master/meshtastic/__main__.py) of a 'complete' application that uses the meshtastic python API.
|
||||
This section covers installing 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. The source code for this tool is also a good [example](https://github.com/meshtastic/Meshtastic-python/blob/master/meshtastic/__main__.py) of a 'complete' application that uses the Meshtastic python API.
|
||||
|
||||
:::note
|
||||
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](https://datatofish.com/add-python-to-windows-path/).
|
||||
The `meshtastic` command is not run within python but is a script run from your operating system shell prompt. When you type "meshtastic" and the prompt is unable to find the command in Windows, check that the python "scripts" directory [is in your path](https://datatofish.com/add-python-to-windows-path/).
|
||||
:::
|
||||
|
||||
To display a (partial) list of the available commands:
|
||||
To display a list of the available commands:
|
||||
```bash
|
||||
meshtastic -h
|
||||
```
|
||||
:::note
|
||||
Because of the growing nature of this project, not all commands may appear when using the help command with `meshtastic -h`.
|
||||
:::
|
||||
|
||||
## Changing device settings
|
||||
|
||||
You can also use this tool to set any of the device parameters which are stored in persistent storage. For instance, here's how to set the device
|
||||
to keep the bluetooth link alive for eight hours (any usage of the bluetooth protcol from your phone will reset this timer)
|
||||
to keep the bluetooth link alive for eight hours (any usage of the bluetooth protocol from your phone will reset this timer)
|
||||
|
||||
```bash title="Expected Output"
|
||||
# You should see a result similar to this:
|
||||
|
@ -47,21 +50,20 @@ meshtastic --set wifi_ap_mode true --set wifi_ssid mywifissid --set wifi_passwor
|
|||
```
|
||||
|
||||
:::note
|
||||
For a full list of preferences which can be set (and their documentation) can be found in the [protobufs](/docs/developers/protobufs/api#radioconfiguserpreferences)
|
||||
For a full list of preferences which can be set (and their documentation) can be found in the [protobufs](/docs/developers/protobufs/api#radioconfiguserpreferences).
|
||||
:::
|
||||
|
||||
### Changing channel settings
|
||||
|
||||
The channel settings can be changed similiarly. Either by using a standard (sharable) meshtastic URL or you can set partiular channel parameters (for advanced users).
|
||||
The channel settings can also be changed, either by using a standard (sharable) meshtastic URL or you can set particular channel parameter (for advanced users).
|
||||
|
||||
The URL is constructed automatically based off of the current channel settings. So if you want to customize a channel you could do something like:
|
||||
:::warning
|
||||
Meshtastic encodes the radio channel and PSK in the channel's URL. All nodes must connect to the channel again by using the URL provided after a change in this section by performing the `--info` switch. Please refer to [Multiple Channel Support](../device/device-channels).
|
||||
|
||||
```bash
|
||||
meshtastic --ch-set name mychan --ch-set channel_num 4 --info
|
||||
```
|
||||
|
||||
This will change some channel params and then show device info (which will include the current channel URL)
|
||||
|
||||
You can even set the channel preshared key to a particular AES128 or AES256 sequence.
|
||||
|
||||
```bash
|
||||
|
|
|
@ -6,13 +6,16 @@ sidebar_label: Installation
|
|||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
This is a python library for using Meshtastic devices. This small library (and example application) provides an easy API for sending and receiving messages over mesh radios. It also provides access to any of the operations/data available in the device user interface or the Android application. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in.
|
||||
This small 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 w. 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.github.io/Meshtastic-python) for the library, including examples, is available.
|
||||
|
||||
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/) (note, you must use pip version 20 or later):
|
||||
Installation is 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`
|
||||
:::
|
||||
|
||||
<Tabs
|
||||
groupId="operating-system"
|
||||
|
@ -100,7 +103,10 @@ Installation is easily done through the [Python package installer pip](https://p
|
|||
* Connect your Meshtastic device to your USB port
|
||||
* Open Device Manager
|
||||
* Under `Ports (COM & LPT)` you should see something like `Silicon Labs CP210X USB to UART Bridge (COM5)`
|
||||
* If not download the drivers from [Silicon Labs](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers).
|
||||
* If not download the drivers from [Silicon Labs](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers) or use the direct link below.
|
||||
:::warning
|
||||
You must install the [CP210x Universal Windows Driver](https://www.silabs.com/documents/public/software/CP210x_Universal_Windows_Driver.zip). If you do not install this driver, your device may not work and the driver may need to be uninstalled from device manager before installing the correct driver.
|
||||
:::
|
||||
* Check that your computer has Python 3 installed.
|
||||
* Use the command
|
||||
```powershell
|
||||
|
@ -125,6 +131,10 @@ Installation is easily done through the [Python package installer pip](https://p
|
|||
</TabItem>
|
||||
<TabItem value="termux">
|
||||
|
||||
:::note
|
||||
Wifi connection is currently under development and may not be working properly just yet. If you would like to provide feedback or test this feature, please visit our [forum](https://meshtastic.discourse.group/) or join our [Discord server](https://discord.gg/RjQKWHmzPZ) for more information.
|
||||
:::
|
||||
|
||||
* Install [Termux](https://f-droid.org/en/packages/com.termux/) from the F-Droid app store (Google play does not currently support the latest builds)
|
||||
* Load Termux and update the package list
|
||||
```
|
||||
|
@ -144,7 +154,7 @@ Installation is easily done through the [Python package installer pip](https://p
|
|||
```
|
||||
|
||||
:::note
|
||||
Be aware that currently the Meshtastic CLI is not able to control the nodes over USB through termux, but you can control devices over wifi using the `--host x.x.x.x` option with the device IP address. However, only ESP32 devices can use wifi currently.
|
||||
Be aware that the Meshtastic CLI is not able to control the nodes over USB through termux, but you can control devices over wifi using the `--host x.x.x.x` option with the device IP address. However, only ESP32 devices can use wifi currently.
|
||||
:::
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
|
Loading…
Reference in a new issue