From c2e6c96616d55597bd0981258e125a8a51359d16 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Wed, 29 Dec 2021 10:49:34 -0800 Subject: [PATCH 01/10] re-org of python docs; migrate docs out of python repo README into this repo --- docs/software/other/mqtt.md | 3 +- docs/software/python/cli.md | 450 +++++++++++++++--- docs/software/python/development.md | 116 +++++ docs/software/python/installation.md | 8 +- docs/software/python/uses.md | 134 ++++++ .../python/{usage.md => using_library.md} | 6 +- sidebars.js | 4 +- 7 files changed, 636 insertions(+), 85 deletions(-) create mode 100644 docs/software/python/development.md create mode 100644 docs/software/python/uses.md rename docs/software/python/{usage.md => using_library.md} (95%) diff --git a/docs/software/other/mqtt.md b/docs/software/other/mqtt.md index 2a494dfe..ffab3473 100644 --- a/docs/software/other/mqtt.md +++ b/docs/software/other/mqtt.md @@ -203,7 +203,8 @@ brew services restart mosquitto ``` 3. Do a quick test of server, start a subscriber on a topic: -# Note: this will wait until you press control-c (publish a message, see below) + +Note: this will wait until you press control-c (publish a message, see below) ``` mosquitto_sub -t test/hello diff --git a/docs/software/python/cli.md b/docs/software/python/cli.md index fac301f5..94d4f2d6 100644 --- a/docs/software/python/cli.md +++ b/docs/software/python/cli.md @@ -1,127 +1,425 @@ --- id: python-cli -title: Command line interface -sidebar_label: CLI usage +title: meshtastic command line interface guide +sidebar_label: meshtastic cli --- -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. +# Meshtastic CLI Guide -:::note -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/). -::: +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. -To display a list of the available commands: -```bash +## Optional Arguments + +### -h or --help + +Shows a help message that describes the arguments. + +**Usage** + +``` shell meshtastic -h ``` -:::note -Because of the growing nature of this project, not all commands may appear when using the help command with `meshtastic -h`. -::: -## Getting a list of User Preferences +### --port PORT -You can get a list of user preferences by running '--get' with an invalid attribute such as 'all'. -```bash -meshtastic --get all +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 ``` -## Changing settings +### --host HOST -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 protocol from your phone will reset this timer) +The hostname/ipaddr of the device to connect to (over TCP). -```bash title="Expected Output" -# You should see a result similar to this: -mydir$ meshtastic --set wait_bluetooth_secs 28800 -Connected to radio... -Setting preference wait_bluetooth_secs to 28800 -Writing modified preferences to device... +**Usage** + +``` shell +meshtastic --host HOST ``` -Or to set a node at a fixed position and never power up the GPS. +### --seriallog SERIALLOG -```bash -meshtastic --setlat 25.2 --setlon -16.8 --setalt 120 +Logs device serial output to either 'stdout', 'none' or a filename to append to. + +**Usage** + +``` shell +meshtastic --port /dev/ttyUSB0 --seriallog ``` -Or to configure an ESP32 based board to join a Wifi network as a station: +### --info -```bash -meshtastic --set wifi_ap_mode false --set wifi_ssid mywifissid --set wifi_password mywifipsw +Read and display the radio config information. + +**Usage** + +``` shell +meshtastic --port /dev/ttyUSB0 --info ``` -Or to configure an ESP32 to run as a Wifi access point: +### --nodes -```bash -meshtastic --set wifi_ap_mode true --set wifi_ssid mywifissid --set wifi_password mywifipsw +Prints a node list in a pretty, formatted table. + +**Usage** + +``` shell +meshtastic --nodes ``` -:::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). -::: +### --qr -### Changing channel settings +Displays the QR code that corresponds to the current channel. -The channel settings can also be changed, either by using a standard (shareable) meshtastic URL or you can set particular channel parameter (for advanced users). +**Usage** -:::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-index 1 --ch-set channel_num 4 --info +``` shell +meshtastic --qr ``` -You can even set the channel preshared key to a particular AES128 or AES256 sequence. +### --get GET -```bash -meshtastic --ch-index 1 --ch-set psk 0x1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b --info +Gets a preferences field. + +**Usage** + +``` shell +meshtastic --get modem_config ``` -Use `--ch-set psk none --ch-index 0` to turn off encryption. +### --set SET SET -Use `--ch-set psk random --ch-index 0` will assign a new (high quality) random AES256 key to the primary channel (similar to what the Android app does when making new channels). +Sets a preferences field. -Use `--ch-set psk default --ch-index 0` to restore the standard 'default' (minimally secure, because it is in the source code for anyone to read) AES128 key. +**Usage** -All `ch-set` commands need to have the `ch-index` parameter specified: - -```bash -meshtastic --ch-index 1 --ch-set name mychan --ch-set channel_num 4 --info +``` shell +meshtastic --set region Unset ``` -### Ham radio support +### --seturl SETURL -Meshtastic is designed to be used without a radio operator license. If you do have a license you can set your operator ID and turn off encryption with: +Set a channel URL. -```bash title="Expected Output" -# You should see a result similar to this: -mydir$ meshtastic --port /dev/ttyUSB1 --set-ham KI1345 -Connected to radio -Setting Ham ID to KI1345 and turning off encryption -Writing modified channels to device +**Usage** + +``` shell +meshtastic --seturl https://www.meshtastic.org/c/GAMiIE67C6zsNmlWQ-KE1tKt0fRKFciHka-DShI6G7ElvGOiKgZzaGFyZWQ= ``` -## FAQ/common problems +### --ch-index CH_INDEX -This is a collection of common questions and answers from our friendly forum. +Set the specified channel index -### Permission denied: ‘/dev/ttyUSB0’ +**Usage** -As previously discussed on the [forum](https://meshtastic.discourse.group/t/question-on-permission-denied-dev-ttyusb0/590/3?u=geeksville) - -This indicates an OS permission problem for access by your user to the USB serial port. Typically this is fixed by the following. - -```bash -sudo usermod -a -G dialout +``` shell +meshtastic --ch-index 1 --ch-disable ``` -### Mac OS Big Sur +### --ch-add CH_ADD -There is a problem with Big Sur and pyserial. The workaround is to install a newer version of pyserial: +Add a secondary channel, you must specify a channel name. -```bash -pip3 install -U --pre pyserial +**Usage** + +``` shell +meshtastic --ch-add testing-channel +``` +### --ch-del + +Delete the ch-index channel. + +**Usage** + +``` shell +meshtastic --ch-index 1 --ch-del ``` -Afterwards you can use the meshtastic python client again on MacOS. +### --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-index 0 +``` + +### --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. Can specify a channel index ('--ch-index') or a destination ('--dest') + +**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. Probably not very helpful from the command line. Used more for testing/internal needs. + +**Usage** + +``` shell +meshtastic --noproto +``` + +### --version + +Show program's version number and exit. + +**Usage** + +``` shell +meshtastic --version +``` + +### --configure + +Configure all of the radio configuration from a yaml file. + +**Usage** + +``` shell +meshtastic --configure example_config.yaml +``` + +### --export-config + +Export the configuration of the device. (to be consumed by the '--configure' command) + +**Usage** + +``` shell +meshtastic --export-config +``` + +### --support + +Print out info that would be helpful supporting any issues. + +**Usage** + +``` shell +meshtastic --support +``` + +## 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. diff --git a/docs/software/python/development.md b/docs/software/python/development.md new file mode 100644 index 00000000..658e8b6b --- /dev/null +++ b/docs/software/python/development.md @@ -0,0 +1,116 @@ +--- +id: python-development +title: Meshtastic-python Development +sidebar_label: Meshtastic-python development +--- + +## A note to developers of this lib + +We use the visual-studio-code default python formatting conventions (autopep8). So if you use that IDE you should be able to use "Format Document" and not generate unrelated diffs. If you use some other editor, please do not change formatting on lines you have not changed yourself. + +If you need to build a new release you will need: + +``` +apt install pandoc +sudo pip3 install markdown pdoc3 webencodings pyparsing twine autopep8 pylint pytest pytest-cov +``` + +For development, you will probably want to run: + +``` +pip3 install -r requirements.txt +``` + +To lint, run: + +``` +pylint meshtastic +``` + +To test, first install this code locally, then run pytest: + +``` +pip3 install . +pytest +``` + +Possible options for testing: + +- For more verbosity, add "-v" or even "-vv" like this: + +``` +pytest -vv +``` + +- To run just unit tests: + +``` +pytest +# or (more verbosely) +pytest -m unit +# or +make +``` + +- To run just integration tests: + +``` +pytest -m int +``` + +- To run the smoke test with only one device connected serially (aka smoke1): + +``` +pytest -m smoke1 +``` + +CAUTION: Running smoke1 will reset values on the device, including the region to 1 (US). +Be sure to hit the reset button on the device after the test is completed. + +- To run the smoke test with only two device connected serially (aka smoke2): + +``` +pytest -m smoke2 +``` + +- To run the wifi smoke test: + +``` +pytest -m smokewifi +``` + +- To run a specific test: + +``` +pytest -msmoke1 meshtastic/tests/test_smoke1.py::test_smoke1_info +# or to run a specific smoke2 test +pytest -m smoke2 meshtastic/tests/test_smoke2.py::test_smoke2_info +# or to run a specific smoke_wifi test +pytest -m smokewifi meshtastic/tests/test_smoke_wifi.py::test_smokewifi_info +``` + +- To add another classification of tests such as "unit" or "smoke1", see [pytest.ini](pytest.ini). + +- To see the unit test code coverage: + +``` +pytest --cov=meshtastic +# or if want html coverage report +pytest --cov-report html --cov=meshtastic +# or +make cov +``` + +- To see slowest unit tests, you can run: + +``` +pytest --durations=0 +# or +make slow +``` + +See the [docs](https://meshtastic-python.vercel.app/meshtastic/index.html) or you can generate them locally by running: + +``` +bin/regen-docs.sh +``` diff --git a/docs/software/python/installation.md b/docs/software/python/installation.md index ae8ded05..8041c190 100644 --- a/docs/software/python/installation.md +++ b/docs/software/python/installation.md @@ -6,7 +6,7 @@ sidebar_label: Installation import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -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. +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. [Full documentation](https://meshtastic.github.io/Meshtastic-python) for the library, including examples, is available. @@ -117,7 +117,7 @@ Some newer boards may require the drivers for the [CH9102](http://www.wch.cn/dow pip3 -V ``` * If this does not return a version, install [pip](https://pip.pypa.io/en/stable/installing/) - + * Install pytap2 ```bash sudo pip3 install --upgrade pytap2 @@ -179,12 +179,12 @@ Wifi connection is currently under development and may not be working properly j ``` pkg install python ``` -* Upgrade pip and installed meshtastic and its dependencies +* Upgrade pip and installed meshtastic and some of its dependencies ``` pip install --upgrade pip pygatt pytap2 wheel mesthtastic ``` -:::note +:::note 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. ::: diff --git a/docs/software/python/uses.md b/docs/software/python/uses.md new file mode 100644 index 00000000..5d222a77 --- /dev/null +++ b/docs/software/python/uses.md @@ -0,0 +1,134 @@ +--- +id: python-uses +title: Uses of the meshtastic command line interface tool +sidebar_label: Uses +--- + +This section covers using the "meshtastic" command line executable, which displays packets sent over the network as JSON and lets you see serial debugging information from the Meshtastic devices. + +:::note +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/). +::: + +## Getting a list of User Preferences + +You can get a list of user preferences by running '--get' with an invalid attribute such as 'all'. +```bash +meshtastic --get all +``` + +## Changing 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 protocol from your phone will reset this timer) + +```bash title="Expected Output" +# You should see a result similar to this: +mydir$ meshtastic --set wait_bluetooth_secs 28800 +Connected to radio... +Setting preference wait_bluetooth_secs to 28800 +Writing modified preferences to device... +``` + +Or to set a node at a fixed position and never power up the GPS. + +```bash +meshtastic --setlat 25.2 --setlon -16.8 --setalt 120 +``` + +Or to configure an ESP32 based board to join a Wifi network as a station: + +```bash +meshtastic --set wifi_ap_mode false --set wifi_ssid mywifissid --set wifi_password mywifipsw +``` + +Or to configure an ESP32 to run as a Wifi access point: + +```bash +meshtastic --set wifi_ap_mode true --set wifi_ssid mywifissid --set wifi_password mywifipsw +``` + +:::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). +::: + +### Changing channel settings + +The channel settings can also be changed, either by using a standard (shareable) meshtastic URL or you can set particular channel parameter (for advanced users). + +:::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-index 1 --ch-set channel_num 4 --info +``` + +You can even set the channel preshared key to a particular AES128 or AES256 sequence. + +```bash +meshtastic --ch-index 1 --ch-set psk 0x1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b --info +``` + +Use `--ch-set psk none --ch-index 0` to turn off encryption. + +Use `--ch-set psk random --ch-index 0` will assign a new (high quality) random AES256 key to the primary channel (similar to what the Android app does when making new channels). + +Use `--ch-set psk default --ch-index 0` to restore the standard 'default' (minimally secure, because it is in the source code for anyone to read) AES128 key. + +All `ch-set` commands need to have the `ch-index` parameter specified: + +```bash +meshtastic --ch-index 1 --ch-set name mychan --ch-set channel_num 4 --info +``` + +### Ham radio support + +Meshtastic is designed to be used without a radio operator license. If you do have a license you can set your operator ID and turn off encryption with: + +```bash title="Expected Output" +# You should see a result similar to this: +mydir$ meshtastic --port /dev/ttyUSB1 --set-ham KI1345 +Connected to radio +Setting Ham ID to KI1345 and turning off encryption +Writing modified channels to device +``` + +## Changing the preshared key: + +You can set the channel preshared key to a particular AES128 or AES256 sequence. + +``` +meshtastic --ch-set psk 0x1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b --info +``` + +Use "--ch-set psk none" to turn off encryption. + +Use "--ch-set psk random" will assign a new (high quality) random AES256 key to the primary channel (similar to what the Android app does when making new channels). + +Use "--ch-set psk default" to restore the standard 'default' (minimally secure, because it is in the source code for anyone to read) AES128 key. + +All "ch-set" commands will default to the primary channel at index 0, but can be applied to other channels with the "ch-index" parameter. + + +## FAQ/common problems + +This is a collection of common questions and answers from our friendly forum. + +### Permission denied: ‘/dev/ttyUSB0’ + +As previously discussed on the [forum](https://meshtastic.discourse.group/t/question-on-permission-denied-dev-ttyusb0/590/3?u=geeksville) + +This indicates an OS permission problem for access by your user to the USB serial port. Typically this is fixed by the following. + +```bash +sudo usermod -a -G dialout +``` + +### Mac OS Big Sur + +There is a problem with Big Sur and pyserial. The workaround is to install a newer version of pyserial: + +```bash +pip3 install -U --pre pyserial +``` diff --git a/docs/software/python/usage.md b/docs/software/python/using_library.md similarity index 95% rename from docs/software/python/usage.md rename to docs/software/python/using_library.md index f151ce72..fbf95cc4 100644 --- a/docs/software/python/usage.md +++ b/docs/software/python/using_library.md @@ -1,7 +1,7 @@ --- -id: python-usage -title: Meshtastic-python usage -sidebar_label: Python usage +id: python-using-library +title: using the Meshtastic-python library +sidebar_label: Using the meshtastic Python library --- An example using Python 3 code to send a message to the mesh, get and set a radio configuration preference: diff --git a/sidebars.js b/sidebars.js index 1ef4ffc1..36fe5d7e 100644 --- a/sidebars.js +++ b/sidebars.js @@ -51,7 +51,9 @@ module.exports = { "Meshtastic-python": [ "software/python/python-installation", "software/python/python-cli", - "software/python/python-usage", + "software/python/python-uses", + "software/python/python-using-library", + "software/python/python-development", { type: "link", label: "API Docs", From ac28557d47ea1f15b0b273c209cf1245b56e1921 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Wed, 29 Dec 2021 11:11:03 -0800 Subject: [PATCH 02/10] fix links --- docs/software/python/development.md | 2 +- docs/software/settings/power.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/software/python/development.md b/docs/software/python/development.md index 658e8b6b..91af1278 100644 --- a/docs/software/python/development.md +++ b/docs/software/python/development.md @@ -89,7 +89,7 @@ pytest -m smoke2 meshtastic/tests/test_smoke2.py::test_smoke2_info pytest -m smokewifi meshtastic/tests/test_smoke_wifi.py::test_smokewifi_info ``` -- To add another classification of tests such as "unit" or "smoke1", see [pytest.ini](pytest.ini). +- To add another classification of tests such as "unit" or "smoke1", see [pytest.ini](https://github.com/meshtastic/Meshtastic-python/blob/master/pytest.ini). - To see the unit test code coverage: diff --git a/docs/software/settings/power.md b/docs/software/settings/power.md index 8fa1c672..57cdf4eb 100644 --- a/docs/software/settings/power.md +++ b/docs/software/settings/power.md @@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem'; ## Overview -Power settings on a Meshtastic device can be set like other user-define settings with the `--set` command see ([see Meshtastic-python](../python/python-usage)). Some of these options are implicit in other commands. For example, when you set the device to router mode using `is_router true`, it is implied that deep sleep is disabled and we want to constantly listen for messages. Below is a list of all user-definable settings and the acceptable values that these settings can use. +Power settings on a Meshtastic device can be set like other user-define settings with the `--set` command see ([see Meshtastic-python](../python/python-cli)). Some of these options are implicit in other commands. For example, when you set the device to router mode using `is_router true`, it is implied that deep sleep is disabled and we want to constantly listen for messages. Below is a list of all user-definable settings and the acceptable values that these settings can use. For example, if we wanted to disable sleep mode, like when we put the device into router mode, we could use the command: From 935c69cf0de9d6bcc6d870fd798018d7ed700f5e Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 30 Dec 2021 18:01:58 +0000 Subject: [PATCH 03/10] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index c52c8ef9..9f9d770a 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit c52c8ef99ead88a5edb73891b33247c54d37cb28 +Subproject commit 9f9d770a3a7c021933364283995bd7f5f6414ce3 From 144112c7690bd5458d9a2cdde75d15d67d708fc8 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 30 Dec 2021 18:05:05 +0000 Subject: [PATCH 04/10] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 9f9d770a..d7ab05e1 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 9f9d770a3a7c021933364283995bd7f5f6414ce3 +Subproject commit d7ab05e194f25955592ded6fcf6423b0a01711dc From 304d3e479db5c438a3058be71d2f9691fb30a44c Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 30 Dec 2021 18:08:07 +0000 Subject: [PATCH 05/10] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index d7ab05e1..9bd0303b 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit d7ab05e194f25955592ded6fcf6423b0a01711dc +Subproject commit 9bd0303ba24a19ee8ee898ec10ea5ee40cd7c417 From dd5cc94af949e998049ff3147cfb2efd179a71aa Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 30 Dec 2021 18:13:53 +0000 Subject: [PATCH 06/10] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 9bd0303b..229a971f 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 9bd0303ba24a19ee8ee898ec10ea5ee40cd7c417 +Subproject commit 229a971fc0b710b7f6a370f00faed1383e12ef6b From 176675efa3c147915494ed3a2954a71d45be41ee Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 30 Dec 2021 18:20:08 +0000 Subject: [PATCH 07/10] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 229a971f..4a64080d 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 229a971fc0b710b7f6a370f00faed1383e12ef6b +Subproject commit 4a64080d160f9219768a4126414d41dc82a3d63c From 37a4cd69f282b9292e7a4fe907c50cdd49df6b09 Mon Sep 17 00:00:00 2001 From: redfast00 Date: Thu, 30 Dec 2021 22:27:55 +0100 Subject: [PATCH 08/10] Fix typo --- src/pages/firmware/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/firmware/index.tsx b/src/pages/firmware/index.tsx index 00c6b326..c6518704 100644 --- a/src/pages/firmware/index.tsx +++ b/src/pages/firmware/index.tsx @@ -46,7 +46,7 @@ const Firmware = (): JSX.Element => { />
From b2cd8a77df8bd097a175c8a64423c7886efdce6c Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 31 Dec 2021 04:50:53 +0000 Subject: [PATCH 09/10] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 4a64080d..8837b055 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 4a64080d160f9219768a4126414d41dc82a3d63c +Subproject commit 8837b0554e72c32b8b8e2b409dce50a2fafa554f From a0e2c20d676a205f080f4c381b46a284967f8189 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Fri, 31 Dec 2021 09:08:34 -0800 Subject: [PATCH 10/10] Fix typos in radio setting table --- docs/developers/device/radio-settings.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/developers/device/radio-settings.md b/docs/developers/device/radio-settings.md index b5ecf569..60f7ca97 100644 --- a/docs/developers/device/radio-settings.md +++ b/docs/developers/device/radio-settings.md @@ -60,12 +60,12 @@ We have six predefined channels. These are the most common settings and have bee | Channel setting | Alt Channel Name | Data-rate | SF / Symbols | Coding Rate | Bandwidth | Link Budget | | :------------------------- | :--------------- | :------------------- | :----------- | :---------- | :-------- | :---------- | -| Long Range / Fast | Short Fast | 18.89 kbps | 7 / 128 | 4/5 | 500 | 134dB | -| Long Range / Slow | Short Slow | 4.69 kbps | 7 / 128 | 4/5 | 125 | 140dB | +| Short Range / Fast | Short Fast | 18.89 kbps | 7 / 128 | 4/5 | 500 | 134dB | +| Short Range / Slow | Short Slow | 4.69 kbps | 7 / 128 | 4/5 | 125 | 140dB | | Medium Range / Fast | Medium Fast | 1.2 kbps | 10 / 1024 | 4/6 | 250 | 146dB | | Medium Range / Slow | Medium Slow | 0.75 kbps | 11 / 2048 | 4/7 | 250 | 148dB | -| Short Range / Fast | Long Fast | 0.19 kbps | 9 / 512 | 4/8 | 31 | 153dB | -| Short Range / Slow | Long Slow | 0.13 kbps (default) | 12 / 4096 | 4/8 | 125 | 154dB | +| Long Range / Fast | Long Fast | 0.19 kbps | 9 / 512 | 4/8 | 31 | 153dB | +| Long Range / Slow | Long Slow | 0.13 kbps (default) | 12 / 4096 | 4/8 | 125 | 154dB | Note: The link budget used by these calculations assumes a transmit power of 17dBm and an antenna with 0dB gain. Adjust your link budget assumptions based on your actual devices. Data-rate in this table is actual measured but doesn't count mesh overhead, hops and retransmissions.