From 80d619328c271f0ffce2491a01ed50a8336cabc5 Mon Sep 17 00:00:00 2001 From: rcarteraz Date: Fri, 15 Mar 2024 23:10:30 -0700 Subject: [PATCH 1/5] update python cli for clarity, structure and remove windows standalone reference. --- docs/software/python-cli/installation.mdx | 79 +++++++---------------- 1 file changed, 24 insertions(+), 55 deletions(-) diff --git a/docs/software/python-cli/installation.mdx b/docs/software/python-cli/installation.mdx index 7f1a2067..6bb3d5c4 100644 --- a/docs/software/python-cli/installation.mdx +++ b/docs/software/python-cli/installation.mdx @@ -9,30 +9,34 @@ sidebar_position: 1 import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -This library provides a command line interface (CLI) for managing the user settings of Meshtastic nodes and provides an easy API for sending and receiving messages over mesh radios. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in. +## Meshtastic Python Library -The [Meshtastic-python repo](https://github.com/meshtastic/Meshtastic-python) and [API documentation](https://python.meshtastic.org) are excellent sources of information. +This library provides a command-line interface (CLI) for managing the user settings of Meshtastic nodes and provides an easy API for sending and receiving messages over mesh radios. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in. -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 [GitHub page](https://github.com/meshtastic/Meshtastic-python). +The [Meshtastic-python repo](https://github.com/meshtastic/Meshtastic-python) and [API documentation](https://python.meshtastic.org) are excellent sources of information. If you wish to view the code or contribute to the development of the Python library or the command-line interface, please visit the Meshtastic Python [GitHub page](https://github.com/meshtastic/Meshtastic-python). -There are standalone executables for Windows and Ubuntu if you do not want to install python and/or the python libraries required to run the meshtastic CLI tool. See [Standalone](#standalone) for more information. +### Installation Methods -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` -::: -:::info -Make sure that the `PATH variable` also gets installed by checking the box while installing python. If you don't, python may not be available and you may not be able to call `meshtastic` from your CLI. If you do forget to check that box, you will need to install the path environment variable for python on your operating system. -::: -:::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) +You can install the Meshtastic CLI using one of the following methods: + +1. **Python Package Installer (pip)**: Installation can be easily done through the [Python package installer pip](https://pypi.org/project/meshtastic). Make sure to use pip version 20 or later by running `pip install --upgrade pip` if necessary. +2. **Standalone Executable (Ubuntu only)**: A single executable file for Ubuntu is available on the [Releases](https://github.com/meshtastic/Meshtastic-python/releases) page. See [Standalone](#standalone-installation-ubuntu-only) below for instructions. + +### Prerequisites + +Before installing, ensure that your system meets the following requirements: + +- **Serial Drivers**: Your computer should have the required serial drivers installed for the [CP210X USB to UART bridge](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers) or the [CH9102](http://www.wch.cn/downloads/CH343SER_ZIP.html) (for some newer boards). +- **Python**: Python 3 should be installed on your system. Check with `python3 -V` and install it if necessary. +- **pip**: The Python package installer pip should be installed. Check with `pip3 -V` and install it if necessary. + +After ensuring the requirements are met, follow the installation instructions for your operating system in the tabbed section below. -Some newer boards may require the drivers for the [CH9102](http://www.wch.cn/downloads/CH343SER_ZIP.html) or [Direct Download](https://github.com/Xinyuan-LilyGO/CH9102_Driver) for Windows 7. -::: - - -#### Ubuntu - -- Download meshtastic_ubuntu - -- Run the following command to make the file executable and rename it 'meshtastic': +1. Download the `meshtastic_ubuntu` executable from the [Releases](https://github.com/meshtastic/Meshtastic-python/releases) page. +2. Run the following command to make the file executable and rename it `meshtastic`: ```shell chmod +x meshtastic_ubuntu && mv meshtastic_ubuntu meshtastic ``` - -- To run the cli: +3. To run the CLI: ```shell ./meshtastic @@ -246,21 +233,3 @@ chmod +x meshtastic_ubuntu && mv meshtastic_ubuntu meshtastic :::tip Copy (or move) this binary somewhere in your path. ::: - - - - -#### Windows - -- Download meshtastic_windows - -- Rename to meshtastic.exe - -- To run, open a windows command prompt, navigate to the location of the executable and run: - -```shell -meshtastic.exe -``` - - - From 5260c112b3f173590eb40410518f673adb96a459 Mon Sep 17 00:00:00 2001 From: rcarteraz Date: Sat, 16 Mar 2024 00:09:10 -0700 Subject: [PATCH 2/5] Add description to front matter --- docs/software/python-cli/installation.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/software/python-cli/installation.mdx b/docs/software/python-cli/installation.mdx index 6bb3d5c4..5aa06783 100644 --- a/docs/software/python-cli/installation.mdx +++ b/docs/software/python-cli/installation.mdx @@ -4,6 +4,7 @@ title: Meshtastic Python CLI installation sidebar_label: Installation slug: /software/python/cli/installation sidebar_position: 1 +description: This page offers comprehensive instructions on methods of installing the Meshtastic Python CLI across different operating systems. --- import Tabs from "@theme/Tabs"; From 11e074184df272e51e5f48b203540dbbd987d2e9 Mon Sep 17 00:00:00 2001 From: rcarteraz Date: Sat, 16 Mar 2024 00:10:18 -0700 Subject: [PATCH 3/5] Remove extra space --- docs/software/python-cli/installation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/software/python-cli/installation.mdx b/docs/software/python-cli/installation.mdx index 5aa06783..b651ad4b 100644 --- a/docs/software/python-cli/installation.mdx +++ b/docs/software/python-cli/installation.mdx @@ -4,7 +4,7 @@ title: Meshtastic Python CLI installation sidebar_label: Installation slug: /software/python/cli/installation sidebar_position: 1 -description: This page offers comprehensive instructions on methods of installing the Meshtastic Python CLI across different operating systems. +description: This page offers comprehensive instructions on methods of installing the Meshtastic Python CLI across different operating systems. --- import Tabs from "@theme/Tabs"; From 9e1deff0bec74a6f120ef69d5eed3240ca598ad8 Mon Sep 17 00:00:00 2001 From: rcarteraz Date: Sat, 16 Mar 2024 10:51:00 -0700 Subject: [PATCH 4/5] remove installation methods add heading to tabs --- docs/software/python-cli/installation.mdx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/software/python-cli/installation.mdx b/docs/software/python-cli/installation.mdx index b651ad4b..17c65e6e 100644 --- a/docs/software/python-cli/installation.mdx +++ b/docs/software/python-cli/installation.mdx @@ -16,13 +16,6 @@ This library provides a command-line interface (CLI) for managing the user setti The [Meshtastic-python repo](https://github.com/meshtastic/Meshtastic-python) and [API documentation](https://python.meshtastic.org) are excellent sources of information. If you wish to view the code or contribute to the development of the Python library or the command-line interface, please visit the Meshtastic Python [GitHub page](https://github.com/meshtastic/Meshtastic-python). -### Installation Methods - -You can install the Meshtastic CLI using one of the following methods: - -1. **Python Package Installer (pip)**: Installation can be easily done through the [Python package installer pip](https://pypi.org/project/meshtastic). Make sure to use pip version 20 or later by running `pip install --upgrade pip` if necessary. -2. **Standalone Executable (Ubuntu only)**: A single executable file for Ubuntu is available on the [Releases](https://github.com/meshtastic/Meshtastic-python/releases) page. See [Standalone](#standalone-installation-ubuntu-only) below for instructions. - ### Prerequisites Before installing, ensure that your system meets the following requirements: @@ -33,6 +26,7 @@ Before installing, ensure that your system meets the following requirements: After ensuring the requirements are met, follow the installation instructions for your operating system in the tabbed section below. +### Installation Instructions Date: Sat, 16 Mar 2024 10:58:13 -0700 Subject: [PATCH 5/5] clarify --- docs/software/python-cli/installation.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/software/python-cli/installation.mdx b/docs/software/python-cli/installation.mdx index 17c65e6e..7fb3880a 100644 --- a/docs/software/python-cli/installation.mdx +++ b/docs/software/python-cli/installation.mdx @@ -28,6 +28,8 @@ After ensuring the requirements are met, follow the installation instructions fo ### Installation Instructions +To install the Meshtastic CLI, select the tab for your operating system and follow the step-by-step instructions for installing via `pip`. For Ubuntu only, you can alternatively install the [Standalone version](#standalone-installation-ubuntu-only) if you prefer. +