From 896c730a5fa566e245a0010a1dad6eab48342342 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Mon, 27 Dec 2021 08:51:32 -0800 Subject: [PATCH 01/30] Fix typo --- docs/developers/device/radio-settings.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/developers/device/radio-settings.md b/docs/developers/device/radio-settings.md index 39198371..b5ecf569 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 / Slow | Short Fast | 18.89 kbps | 7 / 128 | 4/5 | 500 | 134dB | -| Long Range / Fast | Short Slow | 4.69 kbps | 7 / 128 | 4/5 | 125 | 140dB | -| Medium Range / Slow | Medium Fast | 1.2 kbps | 10 / 1024 | 4/6 | 250 | 146dB | -| Medium Range / Fast | Medium Slow | 0.75 kbps | 11 / 2048 | 4/7 | 250 | 148dB | -| Short Range / Slow | Long Fast | 0.19 kbps | 9 / 512 | 4/8 | 31 | 153dB | -| Short Range / Fast | Long Slow | 0.13 kbps (default) | 12 / 4096 | 4/8 | 125 | 154dB | +| 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 | +| 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 | 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. From 6b57508ef2762ab322f08bc8237ac3294ff93794 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Mon, 27 Dec 2021 10:31:34 -0800 Subject: [PATCH 02/30] Update on the delayed meshpacket type. --- docs/software/plugins/store-forward.md | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/docs/software/plugins/store-forward.md b/docs/software/plugins/store-forward.md index 1d40cbfe..6cd0385e 100644 --- a/docs/software/plugins/store-forward.md +++ b/docs/software/plugins/store-forward.md @@ -129,6 +129,43 @@ Story: The Store & Forward Router sends a periodic message onto the network. Thi * * * StoreAndForward.heartbeat.Period = 120 // Expect a heartbeat every 2 minutes * * * StoreAndForward.heartbeat.Secondary = false // If true, this is a secondary "backup" S&F node. Will be (eventually) used for router election in the event there are multiple S&F Routers. +## Meshpacket + +To support functionality of Store and Forward, a new enum has been added to the MeshPacket. + +``` +typedef enum _MeshPacket_Delayed { + MeshPacket_Delayed_NO_DELAY = 0, + MeshPacket_Delayed_DELAYED_BROADCAST = 1, + MeshPacket_Delayed_DELAYED_DIRECT = 2 +} MeshPacket_Delayed; +``` + +* NO_DELAY - The packet was set in real time. Store and Forward had no hand in this message. This is the default case. +* DELAYED_BROADCAST - This is a delayed message. The 'to' of the packet has been directed at a named user but was previously a broadcast packet. +* DELAYED_DIRECT - This is a delayed message. The 'to' of the packet has been directed at a named user but was previously a direct packet. + +As a reminder, broadcast messages are messages where the "to" of a payload is directed at NODENUM_BROADCAST or (0xFFFFFFFF). + +Example Cases: + +* Real time :: BROADCAST +* * Delayed = MeshPacket_Delayed_NO_DELAY +* * From: Ann +* * To: BROADCAST +* Real time :: Direct +* * Delayed = MeshPacket_Delayed_NO_DELAY +* * From: Ann +* * To: Bob +* Delayed :: BROADCAST +* * Delayed = MeshPacket_Delayed_DELAYED_BROADCAST +* * From: Ann +* * To: Bob +* Delayed :: Direct +* * Delayed = MeshPacket_Delayed_DELAYED_DIRECT +* * From: Ann +* * To: Bob + ## Developer TODO Not necessarily in this order: From f430a742ac12763bbd5b491f05671e7dd69a8f5e Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Mon, 27 Dec 2021 10:41:27 -0800 Subject: [PATCH 03/30] fixed typo in store forward doc --- docs/software/plugins/store-forward.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/software/plugins/store-forward.md b/docs/software/plugins/store-forward.md index 6cd0385e..45cab1e0 100644 --- a/docs/software/plugins/store-forward.md +++ b/docs/software/plugins/store-forward.md @@ -141,7 +141,7 @@ typedef enum _MeshPacket_Delayed { } MeshPacket_Delayed; ``` -* NO_DELAY - The packet was set in real time. Store and Forward had no hand in this message. This is the default case. +* NO_DELAY - The packet was sent in real time. Store and Forward had no hand in this message. This is the default case. * DELAYED_BROADCAST - This is a delayed message. The 'to' of the packet has been directed at a named user but was previously a broadcast packet. * DELAYED_DIRECT - This is a delayed message. The 'to' of the packet has been directed at a named user but was previously a direct packet. From ac236a1ce37195d3bedeed51487cbe82a1c9b353 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Mon, 27 Dec 2021 10:48:33 -0800 Subject: [PATCH 04/30] Updated notes for the delayed enum --- docs/software/plugins/store-forward.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/software/plugins/store-forward.md b/docs/software/plugins/store-forward.md index 45cab1e0..f35b617b 100644 --- a/docs/software/plugins/store-forward.md +++ b/docs/software/plugins/store-forward.md @@ -166,6 +166,10 @@ Example Cases: * * From: Ann * * To: Bob +When a message is 'real time', time a message is sent is the same as the time the message was received. In the case the message is delayed, there is no timestamp available for the message. + +Where the message is a delayed broadcast, the "To" is *not* a broadcast address but rather the address of the device that requested the messages to be replayed. This is to allow the message to be routed over the mesh network and not displayed in the message screen of other devices. + ## Developer TODO Not necessarily in this order: From 5ea754b52c27fb0dfaa58d9f8f2416da8d64d04d Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Mon, 27 Dec 2021 10:51:13 -0800 Subject: [PATCH 05/30] Add note about stability to S&F doc --- docs/software/plugins/store-forward.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/software/plugins/store-forward.md b/docs/software/plugins/store-forward.md index f35b617b..130da349 100644 --- a/docs/software/plugins/store-forward.md +++ b/docs/software/plugins/store-forward.md @@ -6,7 +6,7 @@ sidebar_label: Store and Forward ## About :::caution -This is a work in progress and is not yet available. +This is a work in progress and is partially available. Stability is not gaurenteed. ::: The Store Forward Plugin is an implementation of a Store and Forward system to enable resilient messaging in the event that a client device is disconnected from the main network. From 546780bfebfc88161b87e6542d68921c1c3090dc Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Tue, 28 Dec 2021 20:46:50 +1100 Subject: [PATCH 06/30] Firmware loading placeholder --- package.json | 4 +- .../firmware/_components/FirmwareCard.tsx | 91 +++++++++++++++++++ src/pages/firmware/index.tsx | 79 ++++++++-------- yarn.lock | 16 ++-- 4 files changed, 144 insertions(+), 46 deletions(-) diff --git a/package.json b/package.json index a0aa31c6..ce7cb7c8 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "react-dom": "^17.0.2", "react-icons": "^4.3.1", "react-json-pretty": "^2.2.0", - "swr": "^1.1.1", + "swr": "^1.1.2", "url-search-params-polyfill": "^8.1.1" }, "browserslist": { @@ -40,7 +40,7 @@ "devDependencies": { "@docusaurus/module-type-aliases": "^2.0.0-beta.14", "@tsconfig/docusaurus": "^1.0.4", - "@types/node": "^17.0.2", + "@types/node": "^17.0.5", "@types/w3c-web-serial": "^1.0.2", "typescript": "^4.5.4" } diff --git a/src/pages/firmware/_components/FirmwareCard.tsx b/src/pages/firmware/_components/FirmwareCard.tsx index 8a9c301d..0a1238a0 100644 --- a/src/pages/firmware/_components/FirmwareCard.tsx +++ b/src/pages/firmware/_components/FirmwareCard.tsx @@ -56,3 +56,94 @@ export const FirmwareCard = ({ ); }; + +export const PlaceholderFirmwareCard = (): JSX.Element => { + return ( +
+
+
+
+
+
+   +
+
+
+
+
+
+ ); +}; diff --git a/src/pages/firmware/index.tsx b/src/pages/firmware/index.tsx index 9788ab31..00c6b326 100644 --- a/src/pages/firmware/index.tsx +++ b/src/pages/firmware/index.tsx @@ -7,7 +7,10 @@ import Layout from '@theme/Layout'; import { Release } from '../../utils/github'; import { fetcher } from '../../utils/swr'; -import { FirmwareCard } from './_components/FirmwareCard'; +import { + FirmwareCard, + PlaceholderFirmwareCard, +} from './_components/FirmwareCard'; const Firmware = (): JSX.Element => { const { data, error } = useSWR( @@ -34,41 +37,45 @@ const Firmware = (): JSX.Element => { paddingLeft: "0", }} > - {/* */} - - - - {/* */} - {/* */} -
-
-

Bleeding

-
-
-

- Latest successful CI build. For those who want to break - things. -

-
- -
- - {/* */} + {data && !error ? ( + <> + + +
+
+

Bleeding

+
+
+

+ Latest successful CI build. For those who want to break + things. +

+
+ +
+ + ) : ( + <> + + + + + )}
diff --git a/yarn.lock b/yarn.lock index 4593378e..f2d5680c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2581,10 +2581,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.9.tgz#bc43c990c3c9be7281868bbc7b8fdd6e2b57adfa" integrity sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A== -"@types/node@^17.0.2": - version "17.0.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.2.tgz#a4c07d47ff737e8ee7e586fe636ff0e1ddff070a" - integrity sha512-JepeIUPFDARgIs0zD/SKPgFsJEAF0X5/qO80llx59gOxFTboS9Amv3S+QfB7lqBId5sFXJ99BN0J6zFRvL9dDA== +"@types/node@^17.0.5": + version "17.0.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.5.tgz#57ca67ec4e57ad9e4ef5a6bab48a15387a1c83e0" + integrity sha512-w3mrvNXLeDYV1GKTZorGJQivK6XLCoGwpnyJFbJVK/aTBQUxOCaa/GlFAAN3OTDFcb7h5tiFG+YXCO2By+riZw== "@types/parse-json@^4.0.0": version "4.0.0" @@ -8125,10 +8125,10 @@ svgo@^2.5.0, svgo@^2.7.0: picocolors "^1.0.0" stable "^0.1.8" -swr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/swr/-/swr-1.1.1.tgz#f13346cc830d7950183af57b341bfabb4cc90d43" - integrity sha512-ZpUHyU3N3snj2QGFeE2Fd3BXl1CVS6YQIQGb1ttPAkTmvwZqDyV3GRMNPsaeAYCBM74tfn4XbKx28FVQR0mS7Q== +swr@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/swr/-/swr-1.1.2.tgz#9f3de2541931fccf03c48f322f1fc935a7551612" + integrity sha512-UsM0eo5T+kRPyWFZtWRx2XR5qzohs/LS4lDC0GCyLpCYFmsfTk28UCVDbOE9+KtoXY4FnwHYiF+ZYEU3hnJ1lQ== tapable@^1.0.0: version "1.1.3" From 5364c00da5ad30d03b73ab4d32bb22e96cb57504 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Tue, 28 Dec 2021 13:27:27 -0800 Subject: [PATCH 07/30] add notes on mqtt stuff --- docs/software/other/mqtt.md | 90 ++++++++++++++++++++++++++++++++++ docs/software/settings/mqtt.md | 4 +- 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/docs/software/other/mqtt.md b/docs/software/other/mqtt.md index b89de351..2a494dfe 100644 --- a/docs/software/other/mqtt.md +++ b/docs/software/other/mqtt.md @@ -17,6 +17,7 @@ This is a mini-doc/RFC sketching out a development plan to satisfy a number of 1 - A text messaging bridge when a node in the mesh can gateway to the internet. Issue #[353](https://github.com/meshtastic/Meshtastic-device/issues/353) and this nicely documented [android issue](https://github.com/meshtastic/Meshtastic-Android/issues/2). - An easy way to let desktop app developers remotely control GPIOs. Issue #[182](https://github.com/meshtastic/Meshtastic-device/issues/182) - Remote attribute access (to change settings of distant nodes). Issue #182 +- Be sure to checkout [MQTT Settings](https://meshtastic.org/docs/software/settings/mqtt) ## Short term goals @@ -186,3 +187,92 @@ on how this will be implemented and guesses at approximate work items. The initial gateway will be added to the python tool. But the gateway implementation is designed to be fairly trivial/dumb. After the initial release, the actual gateway code can be ported to also run inside the android app. In fact, we could have ESP32 based nodes include a built-in "gateway node" implementation. Store and forward could be added so that nodes on the mesh could deliver messages (i.e. text messages) on an "as possible" basis. This would allow things like "hiker sends a message to friend - mesh can not currently reach friend - eventually (days later) mesh can somehow reach friend, message gets delivered" + +### Mini tutorial on how to get up and running with mosquitto on a mac + +1. install mqtt server + +``` +brew install mosquitto +``` + +2. start the mqtt server + +``` +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) + +``` +mosquitto_sub -t test/hello +``` + +4. In another window, publish a message to that topic: + +``` +mosquitto_pub -h localhost -q 0 -t test/hello -m 'yo!' +``` + +5. For Meshtastic to be able to access that server, two settings need to be changed in the +`/usr/local/etc/mosquitto/mosquitto.conf` file: + +``` +listener 1883 0.0.0.0 +allow_anonymous true +``` +6. Restart the service: + +``` +brew services restart mosquitto +``` + +7. If you are using the mac firewall, you will need to go into: System Preferences > Security & Privacy > Firewall > Firewall Options and add it. + +### Sending/receiving messages on mosquitto server using python + +Here is an example publish message in python: + +``` +#!/usr/bin/env python3 +import paho.mqtt.client as mqtt +from random import randrange, uniform +import time + +client = mqtt.Client("some_client_id") +client.connect('localhost') + +while True: + randNumber = uniform(20.0, 21.0) + client.publish("env/test/TEMPERATURE", randNumber) + print("Just published " + str(randNumber) + " to topic TEMPERATURE") + time.sleep(1) +``` + +Here is example subscribe in python: + +``` +#!/usr/bin/env python3 + +import paho.mqtt.client as paho + +def on_message(mosq, obj, msg): + print("%-20s %d %s" % (msg.topic, msg.qos, msg.payload)) + mosq.publish('pong', 'ack', 0) + +def on_publish(mosq, obj, mid): + pass + +if __name__ == '__main__': + client = paho.Client() + client.on_message = on_message + client.on_publish = on_publish + + client.connect("localhost", 1883, 60) + + client.subscribe("env/test/TEMPERATURE", 0) + + while client.loop() == 0: + pass +``` diff --git a/docs/software/settings/mqtt.md b/docs/software/settings/mqtt.md index a63bba51..913d40a9 100644 --- a/docs/software/settings/mqtt.md +++ b/docs/software/settings/mqtt.md @@ -19,6 +19,8 @@ You may want to change your [GPS location sharing settings](gps#location_share) If your device is connected to WiFi you can enable it to forward messages along to an MQTT server. This allows users on the local mesh to communicate with users on the internet. +Be sure to checkout this [MQTT](https://meshtastic.org/docs/software/other/mqtt) too. + ## Settings | Setting | Acceptable Values | Default | @@ -64,7 +66,7 @@ meshtastic --set mqtt_server 192.168.123.234 ``` ```bash title="Enable MQTT server to mesh" -meshtastic --ch-set uplink_enabled true --ch-set downlink_enabled true +meshtastic --ch-set uplink_enabled true --ch-set downlink_enabled true --ch-index 0 ``` ```bash title="View raw encoded messages using mosquitto" From 14a342471e62e26d34046a15ef24141de30d7e8a Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Tue, 28 Dec 2021 23:29:08 -0800 Subject: [PATCH 08/30] change link to python api docs --- sidebars.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sidebars.js b/sidebars.js index ee6e155f..1ef4ffc1 100644 --- a/sidebars.js +++ b/sidebars.js @@ -55,7 +55,7 @@ module.exports = { { type: "link", label: "API Docs", - href: "https://meshtastic.github.io/Meshtastic-python", + href: "https://meshtastic-python.vercel.app/meshtastic/index.html", }, ], }, From c2e6c96616d55597bd0981258e125a8a51359d16 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Wed, 29 Dec 2021 10:49:34 -0800 Subject: [PATCH 09/30] 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 10/30] 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 11/30] 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 12/30] 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 13/30] 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 14/30] 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 15/30] 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 16/30] 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 17/30] 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 18/30] 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. From 838ee6753284bafb5168c38a053684b3ae78ac44 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sun, 2 Jan 2022 17:44:00 +1100 Subject: [PATCH 19/30] Update FAQ --- docs/getting-started/faq.md | 111 ++++++++++++++++++++++++------------ 1 file changed, 73 insertions(+), 38 deletions(-) diff --git a/docs/getting-started/faq.md b/docs/getting-started/faq.md index 0968d596..5b66c07d 100644 --- a/docs/getting-started/faq.md +++ b/docs/getting-started/faq.md @@ -4,10 +4,11 @@ title: Frequently Asked Questions (FAQ) sidebar_label: Frequently Asked Questions slug: /getting-started/faq --- + import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; - +- Optional case and battery + +LILYGO T-Echo diff --git a/docs/hardware/supported_hardware.md b/docs/hardware/supported_hardware.md deleted file mode 100644 index b6478128..00000000 --- a/docs/hardware/supported_hardware.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: supported-hardware -title: Supported hardware -sidebar_label: Supported hardware -slug: /hardware/supported-hardware ---- diff --git a/docs/hardware/tbeam.md b/docs/hardware/tbeam.md deleted file mode 100644 index 6aeeb043..00000000 --- a/docs/hardware/tbeam.md +++ /dev/null @@ -1,118 +0,0 @@ ---- -id: tbeam-hardware -title: LILYGO® TTGO T-Beam devices -sidebar_label: LILYGO® T-Beam ---- - -## T-Beam - Meshtastic - -* Meshtastic pre-installed -* ESP32 - Wifi & Bluetooth -* SX1276 - LoRa Transceiver -* Frequency options: - * 433 MHz - * 868 MHz - * 915 MHz - * 923 MHz -* NEO-6M - GPS receiver -* SMA antenna connector -* Power, Program and Reset switches -* Comes with 0.96 inch OLED display (some soldering required to assemble) - - -* Firmware file: `firmware-tbeam-1.x.x.bin` -* [Purchase link](https://www.aliexpress.com/item/4001178678568.html) - -[LILYGO® TTGO T-Beam Meshtastic](/img/hardware/t-beam-meshtastic.png) - -## T-Beam - v0.7 - -:::note -This is an earlier version of the T-Beam board, and due to changes in the design in subsequent iterations this board uses a specific firmware file different from the other T-Beam boards. - -`firmware-tbeam0.7-1.x.x.bin` is the correct firmware. `firmware-tbeam-1.x.x.bin` is incompatible. For all other T-Beam boards `firmware-tbeam-1.x.x.bin` is the correct selection. -::: - -* ESP32 - Wifi & Bluetooth -* SX1276 - LoRa Transceiver -* Frequency options: - * 868 MHz - * 915 MHz -* NEO-6M - GPS receiver -* SMA antenna connector -* Power, Program and Reset switches -* No GPS -* Screen sold separately - - -* Firmware file: `firmware-tbeam0.7-1.x.x.bin` -* [Purchase link](https://www.aliexpress.com/item/4000469332610.html) - -[LILYGO TTGO T-Beam v0.7](/img/hardware/t-beam-v0.7.png) - -## T-Beam - V1.1 - -* ESP32 - Wifi & Bluetooth -* SX1276 - LoRa Transceiver -* Frequency options: - * 433 MHz - * 868 MHz - * 915 MHz - * 923 MHz -* NEO-6M - GPS receiver -* SMA antenna connector -* Power, Program and Reset switches -* Comes with 0.96 inch OLED display (some soldering required to assemble) - - -* Firmware file: `firmware-tbeam-1.x.x.bin` -* [Purchase link](https://www.aliexpress.com/item/4001178678568.html) - -[LILYGO® TTGO T-Beam v1.1](/img/hardware/t-beam-v1.1.png) - -## T-Beam - M8N - -* ESP32 - Wifi & Bluetooth -* SX1276 - LoRa Transceiver -* Frequency options: - * 433 MHz - * 868 MHz - * 915 MHz - * 923 MHz -* NEO-M8N - GPS receiver - better GPS sensitivity -* U.FL antenna connector -* Power, Program and Reset switches -* Screen sold separately - - -* Firmware file: `firmware-tbeam-1.x.x.bin` -* [Purchase link](https://www.aliexpress.com/item/33047631119.html) - -[LILYGO® TTGO T-Beam M8N](/img/hardware/t-beam-m8n.png) - -## T-Beam - M8N & SX1262 - -* ESP32 - Wifi & Bluetooth -* SX1262 - LoRa Transceiver - improved performance -* Frequency options: - * 433 MHz - * 868 MHz - * 915 MHz - * 923 MHz -* NEO-M8N - GPS receiver - better GPS sensitivity -* U.FL antenna connector -* Power, Program and Reset switches -* Screen sold separately - - -* Firmware file: `firmware-tbeam-1.x.x.bin` -* [Purchase link](https://www.aliexpress.com/item/4001287221970.html) - -[LILYGO® TTGO T-Beam M8N & SX1262](/img/hardware/t-beam-sx1262.png) - -## Screen - -* 0.96 inch OLED i2c display -* [Purchase link](https://www.aliexpress.com/item/32922106384.html) - -[0.96 inch OLED display](/img/hardware/screen.png) diff --git a/docs/hardware/techo.md b/docs/hardware/techo.md deleted file mode 100644 index 5ec96949..00000000 --- a/docs/hardware/techo.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -id: techo-hardware -title: LILYGO® TTGO T-Echo devices -sidebar_label: LILYGO® T-Echo ---- - -The T-Echo has been in development by LILYGO® over the past few months and has now been released. - -### See [Getting Started](../getting-started/flashing-nrf52) - -* firmware file: `firmware-t-echo-1.x.x.uf2` -* [Purchase link](https://www.aliexpress.com/item/1005002842456390.html) -* TTGO's [GitHub page](https://github.com/Xinyuan-LilyGO/LilyGO-T-Echo) for the T-Echo - -### Features - -* nRF52840 - Bluetooth BLE 5.0, NFC and very low power consumption -* SX1262 - LoRa transceiver -* 1.54" eInk display -* L76K - GNSS receiver - Supporting GPS, BeiDou, GLONASS & QZSS -* Reset, Program and capacitive touch buttons -* U.FL antenna connector - -* Optional case and battery - - -LILYGO T-Echo diff --git a/docs/software/python/commands.md b/docs/software/python/commands.md new file mode 100644 index 00000000..091bb078 --- /dev/null +++ b/docs/software/python/commands.md @@ -0,0 +1,396 @@ +--- +id: python-commands +title: Meshtastic-python Commands +sidebar_label: Commands +--- + +# Python API Commands Guide + +The python pip package installs a "meshtastic" command line executable, which displays packets sent over the network as JSON and lets you see serial debugging information from the meshtastic devices. This command is not run inside of python, you run it from your operating system shell prompt directly. If when you type "meshtastic" it doesn't find the command and you are using Windows: Check that the python "scripts" directory is in your path. + +## Optional Arguments + +### -h or --help + +Shows a help message that describes the arguments. + +**Usage** + +```shell +meshtastic -h +``` + +### --port PORT + +The port the Meshtastic device is connected to, i.e. /dev/ttyUSB0 or COM4. if unspecified, meshtastic will try to find it. Important to use when multiple devices are connected to ensure you call the command for the correct device. + +**Usage** + +```shell +meshtastic --port /dev/ttyUSB0 --info +meshtastic --port COM4 --info +``` + +### --host HOST + +The hostname/ipaddr of the device to connect to (over TCP). + +**Usage** + +```shell +meshtastic --host HOST +``` + +### --seriallog SERIALLOG + +Logs device serial output to either 'stdout', 'none' or a filename to append to. + +**Usage** + +```shell +meshtastic --port /dev/ttyUSB0 --seriallog +``` + +### --info + +Read and display the radio config information. + +**Usage** + +```shell +meshtastic --port /dev/ttyUSB0 --info +``` + +### --nodes + +Prints a node list in a pretty, formatted table. + +**Usage** + +```shell +meshtastic --nodes +``` + +### --qr + +Displays the QR code that corresponds to the current channel. + +**Usage** + +```shell +meshtastic --qr +``` + +### --get GET + +Gets a preferences field. + +**Usage** + +```shell +meshtastic --get modem_config +``` + +### --set SET SET + +Sets a preferences field. + +**Usage** + +```shell +meshtastic --set region Unset +``` + +### --seturl SETURL + +Set a channel URL. + +**Usage** + +```shell +meshtastic --seturl https://www.meshtastic.org/c/GAMiIE67C6zsNmlWQ-KE1tKt0fRKFciHka-DShI6G7ElvGOiKgZzaGFyZWQ= +``` + +### --ch-index CH_INDEX + +Set the specified channel index + +**Usage** + +```shell +meshtastic --ch-index 1 --ch-disable +``` + +### --ch-add CH_ADD + +Add a secondary channel, you must specify a channel name. + +**Usage** + +```shell +meshtastic --ch-add testing-channel +``` + +### --ch-del + +Delete the ch-index channel. + +**Usage** + +```shell +meshtastic --ch-index 1 --ch-del +``` + +### --ch-enable + +Enable the specified channel. + +**Usage** + +```shell +meshtastic --ch-index 1 --ch-enable +``` + +### --ch-disable + +Disable the specified channel. + +**Usage** + +```shell +meshtastic --ch-index 1 --ch-disable +``` + +### --ch-set CH_SET CH_SET + +Set a channel parameter. + +**Usage** + +```shell +meshtastic --ch-set id 1234 +``` + +### --ch-longslow + +Change to the standard long-range (but slow) channel. + +**Usage** + +```shell +meshtastic --ch-longslow +``` + +### --ch-shortfast + +Change to the standard fast (but short range) channel. + +**Usage** + +```shell +meshtastic --ch-shortfast +``` + +### --set-owner SET_OWNER + +Set device owner name. + +**Usage** + +```shell +meshtastic --dest \!28979058 --set-owner "MeshyJohn" +``` + +### --set-ham SET_HAM + +Set licensed Ham ID and turn off encryption. + +**Usage** + +```shell +meshtastic --set-ham KI1345 +``` + +### --dest DEST + +The destination node id for any sent commands + +**Usage** + +```shell +meshtastic --dest \!28979058 --set-owner "MeshyJohn" +``` + +### --sendtext SENDTEXT + +Send a text message. + +**Usage** + +```shell +meshtastic --sendtext "Hello Mesh!" +``` + +### --sendping + +Send a ping message (which requests a reply). + +**Usage** + +```shell +meshtastic --sendping +``` + +### --reboot + +Tell the destination node to reboot. + +**Usage** + +```shell +meshtastic --dest \!28979058 --reboot +``` + +### --reply + +Reply to received messages. + +**Usage** + +```shell +meshtastic --reply +``` + +### --gpio-wrb GPIO_WRB GPIO_WRB + +Set a particular GPIO # to 1 or 0. + +**Usage** + +```shell +meshtastic --port /dev/ttyUSB0 --gpio-wrb 4 1 --dest \!28979058 +``` + +### --gpio-rd GPIO_RD + +Read from a GPIO mask. + +**Usage** + +```shell +meshtastic --port /dev/ttyUSB0 --gpio-rd 0x10 --dest \!28979058 +``` + +### --gpio-watch GPIO_WATCH + +Start watching a GPIO mask for changes. + +**Usage** + +```shell +meshtastic --port /dev/ttyUSB0 --gpio-watch 0x10 --dest \!28979058 +``` + +### --no-time + +Suppress sending the current time to the mesh. + +**Usage** + +```shell +meshtastic --port /dev/ttyUSB0 --no-time +``` + +### --setalt SETALT + +Set device altitude (allows use without GPS). + +**Usage** + +```shell +meshtastic --setalt 120 +``` + +### --setlat SETLAT + +Set device latitude (allows use without GPS). + +**Usage** + +```shell +meshtastic --setlat 25.2 +``` + +### --setlon SETLON + +Set device longitude (allows use without GPS). + +**Usage** + +```shell +meshtastic --setlon -16.8 +``` + +### --debug + +Show API library debug log messages. + +**Usage** + +```shell +meshtastic --debug --info +``` + +### --test + +Run stress test against all connected Meshtastic devices. + +**Usage** + +```shell +meshtastic --test +``` + +### --ble BLE + +BLE mac address to connect to (BLE is not yet supported for this tool). + +**Usage** + +```shell +meshtastic --ble "83:38:92:32:37:48" +``` + +### --noproto + +Don't start the API, just function as a dumb serial terminal. + +**Usage** + +```shell +meshtastic --noproto +``` + +### --version + +Show program's version number and exit. + +**Usage** + +```shell +meshtastic --version +``` + +## Deprecated Arguments + +### --setchan + +Deprecated - use "--ch-set param value" instead. + +### --set-router + +Deprecated - use "--set is_router true" instead. + +### --unset-router + +Deprecated - use "--set is_router false" instead. diff --git a/docs/software/python/stream.md b/docs/software/python/stream.md new file mode 100644 index 00000000..696cb190 --- /dev/null +++ b/docs/software/python/stream.md @@ -0,0 +1,23 @@ +--- +id: python-stream +title: Meshtastic-python stream protocol +sidebar_label: Stream Protocol +--- + +# Stream protocol + +Documentation on how out protobufs get encoded when placed onto any stream transport (i.e. TCP or serial, but not UDP or BLE) + +## Wire encoding + +When sending protobuf packets over serial or TCP each packet is preceded by uint32 sent in network byte order (big endian). +The upper 16 bits must be 0x94C3. The lower 16 bits are packet length (this encoding gives room to eventually allow quite large packets). + +Implementations validate length against the maximum possible size of a BLE packet (our lowest common denominator) of 512 bytes. If the +length provided is larger than that we assume the packet is corrupted and begin again looking for 0x4403 framing. + +The packets flowing towards the device are ToRadio protobufs, the packets flowing from the device are FromRadio protobufs. +The 0x94C3 marker can be used as framing to (eventually) resync if packets are corrupted over the wire. + +Note: the 0x94C3 framing was chosen to prevent confusion with the 7 bit ascii character set. It also doesn't collide with any valid utf8 encoding. This makes it a bit easier to start a device outputting regular debug output on its serial port and then only after it has received a valid packet from the PC, turn off unencoded debug printing and switch to this +packet encoding. diff --git a/sidebars.js b/sidebars.js index 36fe5d7e..dc01c654 100644 --- a/sidebars.js +++ b/sidebars.js @@ -52,8 +52,8 @@ module.exports = { "software/python/python-installation", "software/python/python-cli", "software/python/python-uses", - "software/python/python-using-library", - "software/python/python-development", + "software/python/python-commands", + "software/python/python-stream", { type: "link", label: "API Docs", @@ -132,15 +132,16 @@ module.exports = { "hardware/overview", { "Supported Hardware": [ - "hardware/tbeam-hardware", - "hardware/lora-hardware", - "hardware/heltec-hardware", - "hardware/techo-hardware", - "hardware/wisBlock-hardware", - "hardware/linux-hardware", + "hardware/supported/tbeam", + "hardware/supported/lora", + "hardware/supported/heltec", + "hardware/supported/techo", + "hardware/supported/wisBlock", + "hardware/supported/linux", ], }, "hardware/buttons", + "hardware/battery", { Antennas: [ "hardware/antenna/antenna", diff --git a/src/components/BatteryCalculator.tsx b/src/components/BatteryCalculator.tsx new file mode 100644 index 00000000..9d152108 --- /dev/null +++ b/src/components/BatteryCalculator.tsx @@ -0,0 +1,25 @@ +import React from 'react'; + +export const BatteryCalculator = (): JSX.Element => { + return ( +
+
+

Battery Calculator

+
+
+
+ + + + +
+
+
+
+ +
+
+ ); +}; From 8ab2403549bea8e994721d220604ccfe0b60a34a Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sun, 2 Jan 2022 18:03:24 +1100 Subject: [PATCH 21/30] Fix build & use absolute paths across the board --- docs/getting-started/flashing-esp32.md | 4 +- docs/getting-started/getting_started.md | 2 +- docs/hardware/supported/techo.md | 2 +- docs/software/device/remote-admin.md | 26 ++++--- docs/software/python/uses.md | 10 +-- docs/software/settings/power.md | 38 ++++++----- docs/software/settings/range-test-plugin.md | 75 +++++++++++---------- 7 files changed, 82 insertions(+), 75 deletions(-) diff --git a/docs/getting-started/flashing-esp32.md b/docs/getting-started/flashing-esp32.md index 2860f868..d6d4c16a 100644 --- a/docs/getting-started/flashing-esp32.md +++ b/docs/getting-started/flashing-esp32.md @@ -55,9 +55,9 @@ values={[ Firmware can be downloaded from the [Firmware](/firmware) page. 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. :::note -The [T-Beam 0.7](../hardware/supported/tbeam#t-beam---v07) board is an earlier version of the T-Beam board, and due to changes in the design in subsequent iterations this board uses a specific firmware file different from the other T-Beam boards. +The [T-Beam 0.7](/hardware/supported/tbeam#t-beam---v07) board is an earlier version of the T-Beam board, and due to changes in the design in subsequent iterations this board uses a specific firmware file different from the other T-Beam boards. -`firmware-tbeam0.7-1.x.x.bin` is the correct firmware. `firmware-tbeam-1.x.x.bin` is incompatible. For all other [T-Beam](../hardware/supported/tbeam) boards `firmware-tbeam-1.x.x.bin` is the correct selection. +`firmware-tbeam0.7-1.x.x.bin` is the correct firmware. `firmware-tbeam-1.x.x.bin` is incompatible. For all other [T-Beam](/hardware/supported/tbeam) boards `firmware-tbeam-1.x.x.bin` is the correct selection. ::: ## Command Line Interface Instructions diff --git a/docs/getting-started/getting_started.md b/docs/getting-started/getting_started.md index 092ae8b2..066bc415 100644 --- a/docs/getting-started/getting_started.md +++ b/docs/getting-started/getting_started.md @@ -15,7 +15,7 @@ Meshtastic uses LoRa for the long range communications and depending on settings ## Purchase a Radio -The easiest way is to [buy a device with the software already installed](https://www.aliexpress.com/item/4001178678568.html). Other devices are [available](/docs/hardware/supported/tbeam-hardware). In the Americas get the 915MHz version, in Europe the 868MHz, or Asia 923MHz. See this listing by [The Things Network](https://www.thethingsnetwork.org/docs/lorawan/frequencies-by-country.html) for frequencies by specific countries. +The easiest way is to [buy a device with the software already installed](https://www.aliexpress.com/item/4001178678568.html). Other devices are [available](/docs/hardware/supported/tbeam). In the Americas get the 915MHz version, in Europe the 868MHz, or Asia 923MHz. See this listing by [The Things Network](https://www.thethingsnetwork.org/docs/lorawan/frequencies-by-country.html) for frequencies by specific countries. ## Setup the Radio diff --git a/docs/hardware/supported/techo.md b/docs/hardware/supported/techo.md index 2760f7e4..36d92380 100644 --- a/docs/hardware/supported/techo.md +++ b/docs/hardware/supported/techo.md @@ -6,7 +6,7 @@ sidebar_label: LILYGO® T-Echo The T-Echo has been in development by LILYGO® over the past few months and has now been released. -### See [Getting Started](../getting-started/flashing-nrf52) +### See [Getting Started](/getting-started/flashing-nrf52) - firmware file: `firmware-t-echo-1.x.x.uf2` - [Purchase link](https://www.aliexpress.com/item/1005002842456390.html) diff --git a/docs/software/device/remote-admin.md b/docs/software/device/remote-admin.md index 6118ba4d..ea236efe 100644 --- a/docs/software/device/remote-admin.md +++ b/docs/software/device/remote-admin.md @@ -4,13 +4,14 @@ title: Remote node administration sidebar_label: Remote node administration --- -This feature will allow you to use the multiple channels feature to enable remote administration of meshtastic nodes. This will let you talk through the mesh to some far away node and change that node's settings. This is an advanced feature that (currently) few users would need. Also, keep in mind it is possible (if you are not careful) to assign settings to that remote node that cause it to completely drop off of your mesh. We advise network admins have a test node to test settings with before applying changes to a remote node to prevent this. +This feature will allow you to use the multiple channels feature to enable remote administration of meshtastic nodes. This will let you talk through the mesh to some far away node and change that node's settings. This is an advanced feature that (currently) few users would need. Also, keep in mind it is possible (if you are not careful) to assign settings to that remote node that cause it to completely drop off of your mesh. We advise network admins have a test node to test settings with before applying changes to a remote node to prevent this. ## Creating the admin channel -By default, nodes will **only** respond to administrative commands via the local USB/Bluetooth/TCP interface. This provides basic security to prevent unauthorized access and is how normal administration and settings changes work. The only difference for the remote case is that we are sending those commands over the mesh. +By default, nodes will **only** respond to administrative commands via the local USB/Bluetooth/TCP interface. This provides basic security to prevent unauthorized access and is how normal administration and settings changes work. The only difference for the remote case is that we are sending those commands over the mesh. Before a node will allow remote admin access, it must have a primary channel: + ```bash title="Expected output" $ meshtastic --info Connected to radio @@ -22,7 +23,7 @@ Primary channel URL: https://www.meshtastic.org/d/#CgUYAyIBAQ So from this output you see can that this node knows about only one channel and that its PSK is set to the default value. -Now we add an admin channel: +Now we add an admin channel: ```bash title="Command" meshtastic --ch-add admin @@ -33,6 +34,7 @@ The name of the channel is important and must be `admin`. ::: Your channels will now look like this: + ```bash title="Expected output" $ meshtastic --ch-add admin Connected to radio @@ -47,7 +49,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. When deploying remote administration, 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. +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 administration, 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 @@ -59,9 +61,11 @@ For this step you need physical access to both the nodes. 2. Copy the "Complete URL" someplace for permanent reference/access. 3. Connect to the "remote node" over the USB port. 4. For the "remote node" type - ```bash - meshtastic --seturl the-url-from-step-2 - ``` + +```bash +meshtastic --seturl the-url-from-step-2 +``` + 5. Run `meshtastic --info` and confirm that the "Complete URL" is the same for both of the nodes. At this point you can take your remote node and install it far away and still be able to change any of its settings. @@ -101,7 +105,7 @@ The above note needs clarification. Currently, you refer to other nodes with `!# And you can now confirm via the local node that the remote node has changed: ```bash title="Expected output" -$ meshtastic --nodes +$ meshtastic --nodes Connected to radio /----------------------------------------------------------------------------------------------------\ |N| User |AKA| ID | Position |Battery| SNR | LastHeard | Since | @@ -110,7 +114,7 @@ Connected to radio \----------------------------------------------------------------------------------------------------/ ``` -Note: you can change **any** parameter, add channels or get info from the remote node. Here's an example of setting ls_secs and printing the complete device info from the remote node: +Note: you can change **any** parameter, add channels or get info from the remote node. Here's an example of setting ls_secs and printing the complete device info from the remote node: ```bash title="Expected output" $ meshtastic --dest \!28979058 --set ls_secs 301 --info @@ -138,11 +142,11 @@ 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 through 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](/software/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 -In the future we will add a "deadman timer" to this feature so that the remote node will revert any changes if you fail to send a special "commit changes" command. This will protect against sending bad settings to nodes that you can't physically access. Instead, if the node does not receive a commit message within 10 minutes it will revert all changes and (hopefully) rejoin the mesh. +In the future we will add a "deadman timer" to this feature so that the remote node will revert any changes if you fail to send a special "commit changes" command. This will protect against sending bad settings to nodes that you can't physically access. Instead, if the node does not receive a commit message within 10 minutes it will revert all changes and (hopefully) rejoin the mesh. diff --git a/docs/software/python/uses.md b/docs/software/python/uses.md index 5d222a77..695b3f55 100644 --- a/docs/software/python/uses.md +++ b/docs/software/python/uses.md @@ -7,12 +7,13 @@ 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/). +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 ``` @@ -57,7 +58,7 @@ For a full list of preferences which can be set (and their documentation) can be 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). +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](/software/device/device-channels). ::: ```bash @@ -84,7 +85,7 @@ 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: +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: @@ -110,7 +111,6 @@ Use "--ch-set psk default" to restore the standard 'default' (minimally secure, 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. @@ -119,7 +119,7 @@ This is a collection of common questions and answers from our friendly forum. 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. +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 diff --git a/docs/software/settings/power.md b/docs/software/settings/power.md index 57cdf4eb..68f250e0 100644 --- a/docs/software/settings/power.md +++ b/docs/software/settings/power.md @@ -9,18 +9,19 @@ 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-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. +Power settings on a Meshtastic device can be set like other user-define settings with the `--set` command see ([see Meshtastic-python](/software/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: ```bash meshtastic --set mesh_sds_timeout_secs 4294967295 ``` + :::note See MAXUINT from `mesh_sds_timeout_secs` below: ::: -For a description and more information on what exactly all of these mean, please refer to [Power Management State Machine](../other/power) +For a description and more information on what exactly all of these mean, please refer to [Power Management State Machine](/software/other/power) ## Settings @@ -32,7 +33,7 @@ For a description and more information on what exactly all of these mean, please | ls_secs | `integer` (seconds) | `0` (see note) | | mesh_sds_timeout_secs | `integer` (seconds) | `0` | | min_wake_secs | `integer` (seconds) | `0` | -| phone_sds_timeout_sec | `integer` (seconds) | `0` | Power management state machine option. See the [power page](../other/power) for details. 0 for default of two hours, use the value of MAXUINT or 4294967295 to disable | +| phone_sds_timeout_sec | `integer` (seconds) | `0` | Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of two hours, use the value of MAXUINT or 4294967295 to disable | | phone_timeout_secs | `integer` (seconds) | `0` | | screen_on_secs | `integer` (seconds) | `0` | | sds_secs | `integer` (seconds) | `0` | @@ -66,31 +67,31 @@ Are we operating as a router. Changes behavior in the following ways: The device ### ls_secs -Power management state machine option. See the [power page](../other/power) for details. 0 for default of 3600 +Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of 3600 ### mesh_sds_timeout_secs -Power management state machine option. See the [power page](../other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable +Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable ### min_wake_secs -Power management state machine option. See the [power page](../other/power)for details. 0 for default of 10 seconds +Power management state machine option. See the [power page](/software/other/power)for details. 0 for default of 10 seconds ### phone_sds_timeout_sec -Power management state machine option. See the [power page](../other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable +Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable ### phone_timeout_secs -Power management state machine option. See the [power page](../other/power) for details. 0 for default of 15 minutes +Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of 15 minutes ### screen_on_secs -Power management state machine option. See the [power page](../other/power) for details. 0 for default of one minute. +Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of one minute. ### sds_secs -Power management state machine option. See the [power page](../other/power) for details. 0 for default of one year +Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of one year ### send_owner_interval @@ -100,7 +101,7 @@ For instance the default interval of 4 will send the node owner information for ### wait_bluetooth_secs -Wait number of seconds for Bluetooth - Power management state machine option. See the [power page](../other/power) for details. 0 for default of 1 minute +Wait number of seconds for Bluetooth - Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of 1 minute ### is_always_powered @@ -109,19 +110,20 @@ If the device is plugged into the wall (not from battery), you may consider usin ## Examples - +groupId="settings" +defaultValue="cli" +values={[ +{label: 'CLI', value: 'cli'}, +{label: 'Android', value: 'android'}, +]}> + ```bash meshtastic --set mesh_sds_timeout_secs 0 ``` Note: Probably only want to set the wait_bluetooth_secs this high during testing: + ```bash meshtastic --set wait_bluetooth_secs 28800 ``` diff --git a/docs/software/settings/range-test-plugin.md b/docs/software/settings/range-test-plugin.md index 162955c9..416334cc 100644 --- a/docs/software/settings/range-test-plugin.md +++ b/docs/software/settings/range-test-plugin.md @@ -3,10 +3,10 @@ id: range-test-plugin title: Range Test Plugin Settings sidebar_label: Range Test Plugin --- + import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; - ## Overview This plugin allows you to test the range of your Meshtastic nodes. It requires at least two nodes, a sender and a receiver. The receiving node then saves the messages along with the GPS coordinates at which they were received into a .csv file. This .csv file can then be integrated into [Google Earth](https://earth.google.com), [Google Maps - My Maps](https://mymaps.google.com), or any other program capable of processing .csv files. This can enable you to visualize your mesh. @@ -17,11 +17,11 @@ Once settings are changed, a **reset** is required for them to take effect. ## Settings -| Setting | Acceptable Values | Default | -| :-----: | :---------------: | :-----: | -| range_test_plugin_enabled | `true`, `false` | `false` | -| range_test_plugin_save | `true`, `false` | `false` | -| range_test_plugin_sender | `integer` (Seconds) | `0` | +| Setting | Acceptable Values | Default | +| :-----------------------: | :-----------------: | :-----: | +| range_test_plugin_enabled | `true`, `false` | `false` | +| range_test_plugin_save | `true`, `false` | `false` | +| range_test_plugin_sender | `integer` (Seconds) | `0` | ### range_test_plugin_enabled @@ -44,7 +44,7 @@ Be sure to turn off either the plugin configured as a sender or the device where Also be mindful of your space usage on the file system. It has protections from filling up the space but it's best to delete old range test results. :::note -Leaving this plugin on can slow down your mesh. Currently, the messages are sent using the same `TEXT_MESSAGE_APP` [port that all other messages](../../developers/protobufs/api#portnumsproto) are sent on. +Leaving this plugin on can slow down your mesh. Currently, the messages are sent using the same `TEXT_MESSAGE_APP` [port that all other messages](/developers/protobufs/api#portnumsproto) are sent on. ::: ### Accessing your CSV @@ -60,56 +60,57 @@ http://198.168.0.X/static/rangetest.csv | Radio Setting | `range_test_plugin_sender` | | :-----------: | :------------------------: | -| Long Slow | 60 | -| Long Alt | 30 | -| Medium | 15 | -| Short Fast | 15 | +| Long Slow | 60 | +| Long Alt | 30 | +| Medium | 15 | +| Short Fast | 15 | ## Examples ### Sender Node + - - - ```bash title="Example - Sender Node" - meshtastic --set range_test_plugin_enabled true - meshtastic --set range_test_plugin_sender 60 - ``` +groupId="settings" +defaultValue="cli" +values={[ +{label: 'CLI', value: 'cli'}, +{label: 'Android', value: 'android'}, +]}> + +```bash title="Example - Sender Node" +meshtastic --set range_test_plugin_enabled true +meshtastic --set range_test_plugin_sender 60 +``` - TODO +TODO ### Receiver Node - - - ```bash title="Example - Receiver Node" - meshtastic --set range_test_plugin_enabled true - meshtastic --set range_test_plugin_save true - ``` + + + +```bash title="Example - Receiver Node" +meshtastic --set range_test_plugin_enabled true +meshtastic --set range_test_plugin_save true +``` - TODO +TODO From fc7c20565c42b8899ecb21e86cdc654ffe6e00bb Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sun, 2 Jan 2022 18:12:28 +1100 Subject: [PATCH 22/30] More broken links --- docs/developers/device/mesh-alg.md | 2 +- docs/getting-started/flashing-esp32.md | 4 ++-- docs/hardware/supported/techo.md | 2 +- docs/software/device/remote-admin.md | 2 +- docs/software/python/uses.md | 2 +- docs/software/settings/power.md | 22 ++++++++++----------- docs/software/settings/range-test-plugin.md | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/developers/device/mesh-alg.md b/docs/developers/device/mesh-alg.md index 0690df35..e4585d71 100644 --- a/docs/developers/device/mesh-alg.md +++ b/docs/developers/device/mesh-alg.md @@ -10,7 +10,7 @@ The routing protocol for Meshtastic is really quite simple (and suboptimal). It ### A note about protocol buffers -Because we want our devices to work across various vendors and implementations, we use [Protocol Buffers](https://github.com/meshtastic/Meshtastic-protobufs) pervasively. For information on how the protocol buffers are used with respect to API clients see [sw-design](/software/other/sw-design.md), for purposes of this document you mostly only +Because we want our devices to work across various vendors and implementations, we use [Protocol Buffers](https://github.com/meshtastic/Meshtastic-protobufs) pervasively. For information on how the protocol buffers are used with respect to API clients see [sw-design](/docs/software/other/sw-design), for purposes of this document you mostly only need to consider the MeshPacket and Subpacket message types. ### Layer 1: Non reliable zero hop messaging diff --git a/docs/getting-started/flashing-esp32.md b/docs/getting-started/flashing-esp32.md index d6d4c16a..ee645dbc 100644 --- a/docs/getting-started/flashing-esp32.md +++ b/docs/getting-started/flashing-esp32.md @@ -55,9 +55,9 @@ values={[ Firmware can be downloaded from the [Firmware](/firmware) page. 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. :::note -The [T-Beam 0.7](/hardware/supported/tbeam#t-beam---v07) board is an earlier version of the T-Beam board, and due to changes in the design in subsequent iterations this board uses a specific firmware file different from the other T-Beam boards. +The [T-Beam 0.7](/docs/hardware/supported/tbeam#t-beam---v07) board is an earlier version of the T-Beam board, and due to changes in the design in subsequent iterations this board uses a specific firmware file different from the other T-Beam boards. -`firmware-tbeam0.7-1.x.x.bin` is the correct firmware. `firmware-tbeam-1.x.x.bin` is incompatible. For all other [T-Beam](/hardware/supported/tbeam) boards `firmware-tbeam-1.x.x.bin` is the correct selection. +`firmware-tbeam0.7-1.x.x.bin` is the correct firmware. `firmware-tbeam-1.x.x.bin` is incompatible. For all other [T-Beam](/docs/hardware/supported/tbeam) boards `firmware-tbeam-1.x.x.bin` is the correct selection. ::: ## Command Line Interface Instructions diff --git a/docs/hardware/supported/techo.md b/docs/hardware/supported/techo.md index 36d92380..a398f5a8 100644 --- a/docs/hardware/supported/techo.md +++ b/docs/hardware/supported/techo.md @@ -6,7 +6,7 @@ sidebar_label: LILYGO® T-Echo The T-Echo has been in development by LILYGO® over the past few months and has now been released. -### See [Getting Started](/getting-started/flashing-nrf52) +### See [Getting Started](/docs/getting-started/flashing-nrf52) - firmware file: `firmware-t-echo-1.x.x.uf2` - [Purchase link](https://www.aliexpress.com/item/1005002842456390.html) diff --git a/docs/software/device/remote-admin.md b/docs/software/device/remote-admin.md index ea236efe..432664b3 100644 --- a/docs/software/device/remote-admin.md +++ b/docs/software/device/remote-admin.md @@ -142,7 +142,7 @@ ls_secs: 301 Completed getting preferences ``` -For further reading, I recommend starting out with [Meshtastic-python](/software/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: +For further reading, I recommend starting out with [Meshtastic-python](/docs/software/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) diff --git a/docs/software/python/uses.md b/docs/software/python/uses.md index 695b3f55..d0a6d1d2 100644 --- a/docs/software/python/uses.md +++ b/docs/software/python/uses.md @@ -58,7 +58,7 @@ For a full list of preferences which can be set (and their documentation) can be 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](/software/device/device-channels). +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](/docs/software/device/device-channels). ::: ```bash diff --git a/docs/software/settings/power.md b/docs/software/settings/power.md index 68f250e0..5e8cb61e 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](/software/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. +Power settings on a Meshtastic device can be set like other user-define settings with the `--set` command see ([see Meshtastic-python](/docs/software/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: @@ -21,7 +21,7 @@ meshtastic --set mesh_sds_timeout_secs 4294967295 See MAXUINT from `mesh_sds_timeout_secs` below: ::: -For a description and more information on what exactly all of these mean, please refer to [Power Management State Machine](/software/other/power) +For a description and more information on what exactly all of these mean, please refer to [Power Management State Machine](/docs/software/other/power) ## Settings @@ -33,7 +33,7 @@ For a description and more information on what exactly all of these mean, please | ls_secs | `integer` (seconds) | `0` (see note) | | mesh_sds_timeout_secs | `integer` (seconds) | `0` | | min_wake_secs | `integer` (seconds) | `0` | -| phone_sds_timeout_sec | `integer` (seconds) | `0` | Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of two hours, use the value of MAXUINT or 4294967295 to disable | +| phone_sds_timeout_sec | `integer` (seconds) | `0` | Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of two hours, use the value of MAXUINT or 4294967295 to disable | | phone_timeout_secs | `integer` (seconds) | `0` | | screen_on_secs | `integer` (seconds) | `0` | | sds_secs | `integer` (seconds) | `0` | @@ -67,31 +67,31 @@ Are we operating as a router. Changes behavior in the following ways: The device ### ls_secs -Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of 3600 +Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of 3600 ### mesh_sds_timeout_secs -Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable +Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable ### min_wake_secs -Power management state machine option. See the [power page](/software/other/power)for details. 0 for default of 10 seconds +Power management state machine option. See the [power page](/docs/software/other/power)for details. 0 for default of 10 seconds ### phone_sds_timeout_sec -Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable +Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of two hours, use the MAXUINT or 4294967295 to disable ### phone_timeout_secs -Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of 15 minutes +Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of 15 minutes ### screen_on_secs -Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of one minute. +Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of one minute. ### sds_secs -Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of one year +Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of one year ### send_owner_interval @@ -101,7 +101,7 @@ For instance the default interval of 4 will send the node owner information for ### wait_bluetooth_secs -Wait number of seconds for Bluetooth - Power management state machine option. See the [power page](/software/other/power) for details. 0 for default of 1 minute +Wait number of seconds for Bluetooth - Power management state machine option. See the [power page](/docs/software/other/power) for details. 0 for default of 1 minute ### is_always_powered diff --git a/docs/software/settings/range-test-plugin.md b/docs/software/settings/range-test-plugin.md index 416334cc..cb5b6821 100644 --- a/docs/software/settings/range-test-plugin.md +++ b/docs/software/settings/range-test-plugin.md @@ -44,7 +44,7 @@ Be sure to turn off either the plugin configured as a sender or the device where Also be mindful of your space usage on the file system. It has protections from filling up the space but it's best to delete old range test results. :::note -Leaving this plugin on can slow down your mesh. Currently, the messages are sent using the same `TEXT_MESSAGE_APP` [port that all other messages](/developers/protobufs/api#portnumsproto) are sent on. +Leaving this plugin on can slow down your mesh. Currently, the messages are sent using the same `TEXT_MESSAGE_APP` [port that all other messages](/docs/developers/protobufs/api#portnumsproto) are sent on. ::: ### Accessing your CSV From 59367eed64b0b479b32873b39062a8f73ad2ff24 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 2 Jan 2022 07:25:32 +0000 Subject: [PATCH 23/30] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 8837b055..7b80bde4 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 8837b0554e72c32b8b8e2b409dce50a2fafa554f +Subproject commit 7b80bde4213c530ab3d85a19d1795025299d4633 From 048dedfd8866a4bc75bd7b771374ef65d01f93a0 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Mon, 3 Jan 2022 17:05:40 -0800 Subject: [PATCH 24/30] Change GPS to LoRa --- src/pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 8aac78bc..509ce64b 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -104,7 +104,7 @@ function Home() { /> From 319239104ba9d5f9a79cde5ecc0c9487cd97e791 Mon Sep 17 00:00:00 2001 From: Dale Floer Date: Mon, 3 Jan 2022 19:53:57 -0800 Subject: [PATCH 25/30] Fixed broken links in FAQ. --- docs/getting-started/faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/faq.md b/docs/getting-started/faq.md index 5b66c07d..cbb0a53d 100644 --- a/docs/getting-started/faq.md +++ b/docs/getting-started/faq.md @@ -78,7 +78,7 @@ Q: What are Plugins? Q: What plugins do we have available? -- To see the list of available plugins, please go to: https://meshtastic.org/docs/software/plugins/plugins +- To see the list of available plugins, please go to: https://meshtastic.org/docs/software/plugins/ Q: I'd like to write a plugin. How do I get started? @@ -173,4 +173,4 @@ Q: How do I find out more about installing (and using) Meshtastic via command li Q: How do I find out more about using python to interact? -- See https://meshtastic.org/docs/software/python/python-usage +- See https://meshtastic.org/docs/software/python/python-uses From 458300c07a88ebc7fed8737b6166ccee0a68f0cd Mon Sep 17 00:00:00 2001 From: Dale Floer Date: Mon, 3 Jan 2022 19:56:25 -0800 Subject: [PATCH 26/30] Update python docs path. --- docs/software/device/remote-hardware-service.md | 8 ++++---- docs/software/python/installation.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/software/device/remote-hardware-service.md b/docs/software/device/remote-hardware-service.md index 84ba199c..101c11f4 100644 --- a/docs/software/device/remote-hardware-service.md +++ b/docs/software/device/remote-hardware-service.md @@ -47,20 +47,20 @@ Now both devices can talk over the `gpio` channel. ## Doing GPIO operations -You can programmatically do operations from your own python code by using the meshtastic `RemoteHardwareClient` class. See the [python API](https://meshtastic.github.io/Meshtastic-python) documentation for more details. +You can programmatically do operations from your own python code by using the meshtastic `RemoteHardwareClient` class. See the [python API](https://meshtastic.org/docs/software/python/python-installation) documentation for more details. ## Using GPIOs from the python CLI Writing a GPIO ```bash title="Expected output" -$ meshtastic --port /dev/ttyUSB0 --gpio-wrb 4 1 --dest \!28979058 +$ meshtastic --port /dev/ttyUSB0 --gpio-wrb 4 1 --dest \!28979058 Connected to radio Writing GPIO mask 0x10 with value 0x10 to !28979058 ``` Reading a GPIO ```bash title="Expected output" -$ meshtastic --port /dev/ttyUSB0 --gpio-rd 0x10 --dest \!28979058 +$ meshtastic --port /dev/ttyUSB0 --gpio-rd 0x10 --dest \!28979058 Connected to radio Reading GPIO mask 0x10 from !28979058 GPIO read response gpio_value=16 @@ -68,7 +68,7 @@ GPIO read response gpio_value=16 Watching for GPIO changes: ```bash title="Expected output" -$ meshtastic --port /dev/ttyUSB0 --gpio-watch 0x10 --dest \!28979058 +$ meshtastic --port /dev/ttyUSB0 --gpio-watch 0x10 --dest \!28979058 Connected to radio Watching GPIO mask 0x10 from !28979058 Received RemoteHardware typ=GPIOS_CHANGED, gpio_value=16 diff --git a/docs/software/python/installation.md b/docs/software/python/installation.md index 8041c190..639ea2bf 100644 --- a/docs/software/python/installation.md +++ b/docs/software/python/installation.md @@ -8,9 +8,9 @@ import TabItem from '@theme/TabItem'; This library provides a command line interface for Meshtastic nodes and provides an easy API for sending and receiving messages over mesh radios, in addition to changing user settings. Using the command line is currently the most powerful. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in. -[Full documentation](https://meshtastic.github.io/Meshtastic-python) for the library, including examples, is available. +[Full documentation](https://meshtastic.org/docs/software/python/python-installation) 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 GitHub page. +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. Installation is easily done through the [Python package installer pip](https://pypi.org/project/meshtastic/): :::note From af81205f5bf29bab8735c45683ead5c330d547e0 Mon Sep 17 00:00:00 2001 From: Dale Floer Date: Mon, 3 Jan 2022 20:03:58 -0800 Subject: [PATCH 27/30] Fix link. --- docs/developers/device/mesh-alg.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developers/device/mesh-alg.md b/docs/developers/device/mesh-alg.md index e4585d71..4d44bb20 100644 --- a/docs/developers/device/mesh-alg.md +++ b/docs/developers/device/mesh-alg.md @@ -163,7 +163,7 @@ TODO: - REJECTED - seems dying - possibly dash7? - does the open source stack implement multi-hop routing? flooding? their discussion mailing list looks dead-dead - update duty cycle spreadsheet for our typical use case -a description of DSR: ools.ietf.org/html/rfc4728 good slides here: +a description of DSR: good slides here: good description of batman protocol: interesting paper on LoRa mesh: From 1ecafbb83436c8f3d7c543822dc10157440eaac0 Mon Sep 17 00:00:00 2001 From: Dale Floer Date: Mon, 3 Jan 2022 20:06:57 -0800 Subject: [PATCH 28/30] Fixed links. The original files appear to be gone/moved, so changed to recent Internet Archive Wayback links instead. --- docs/hardware/antenna/non-aerial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/hardware/antenna/non-aerial.md b/docs/hardware/antenna/non-aerial.md index eb7c3021..15ff2fc3 100644 --- a/docs/hardware/antenna/non-aerial.md +++ b/docs/hardware/antenna/non-aerial.md @@ -16,9 +16,9 @@ Unless you're using your devices in a vacuum with clear line of sight between ae ### Environmental factors For a bit of light reading on environmental research: -- [RF attenuation in vegetation](https://www.itu.int/dms_pubrec/itu-r/rec/p/R-REC-P.833-9-201609-I!!PDF-E.pdf) (yes really); if you wander through the woods wondering how your RF is bouncing off leaves dependent on their variety, and wind speed … well you do, now. +- [RF attenuation in vegetation](https://web.archive.org/web/20201216041455/https://www.itu.int/dms_pubrec/itu-r/rec/p/R-REC-P.833-9-201609-I!!PDF-E.pdf) (yes really); if you wander through the woods wondering how your RF is bouncing off leaves dependent on their variety, and wind speed … well you do, now. - [RF attenuation with various building materials](https://www.ofcom.org.uk/__data/assets/pdf_file/0016/84022/building_materials_and_propagation.pdf). -- This one by ITU again is very detailed in its [analysis of the drivers of attenuation](https://www.itu.int/dms_pubrec/itu-r/rec/p/R-REC-P.2040-1-201507-I!!PDF-E.pdf) (I wasn’t aware that all EMF radiation exhibits reflection / transmission characteristics akin to light hitting a material boundary. So, depending on the angle of incidence, material and the EMF wavelength, it will be reflected and / or transmitted through). +- This one by ITU again is very detailed in its [analysis of the drivers of attenuation](https://web.archive.org/web/20211005174833/https://www.itu.int/dms_pubrec/itu-r/rec/p/R-REC-P.2040-1-201507-I!!PDF-E.pdf) (I wasn’t aware that all EMF radiation exhibits reflection / transmission characteristics akin to light hitting a material boundary. So, depending on the angle of incidence, material and the EMF wavelength, it will be reflected and / or transmitted through). - These RF bands are also made more [noisy by adjacent LTE](https://www.ofcom.org.uk/__data/assets/pdf_file/0023/55922/lte-coexistence.pdf) In summary - wavelengths in Europe fair well in plain sight, curve over not-so-tall obstacles (including trees), reflect of surfaces at low angles of incidence. They go through humans without much attenuation; but not brick or stone or anything much above glass / Kevlar. Oh, and don’t sit under an LTE tower and expect it to be plain sailing. From 7dbec175ded4a6b853adc11dce86280bd25ac625 Mon Sep 17 00:00:00 2001 From: Dale Floer Date: Mon, 3 Jan 2022 20:11:41 -0800 Subject: [PATCH 29/30] Updated link to new instructions. --- docs/software/web/partitions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/software/web/partitions.md b/docs/software/web/partitions.md index 224c67ab..ed449d6e 100644 --- a/docs/software/web/partitions.md +++ b/docs/software/web/partitions.md @@ -42,7 +42,7 @@ esptool.py --baud 921600 write_flash 0x10000 firmware-tbeam-EU865-1.1.42.bin Requires: [Python](https://www.python.org/) and [esptool.py](https://github.com/espressif/esptool) ### Visual Studio & PlatformIO -There is also the method of using the Visual Studio IDE. This requires having Visual Studio and PlatformIO installed, along with having cloned the meshtastic-device code as per the [build instructions](https://github.com/meshtastic/Meshtastic-device/blob/master/docs/software/build-instructions.md). After loading the project in Visual Studio, select the PlatformIO alien icon, then find the appropriate device, and then click the Erase Flash command. +There is also the method of using the Visual Studio IDE. This requires having Visual Studio and PlatformIO installed, along with having cloned the meshtastic-device code as per the [build instructions](https://meshtastic.org/docs/software/other/build-instructions). After loading the project in Visual Studio, select the PlatformIO alien icon, then find the appropriate device, and then click the Erase Flash command. ![Erasing the flash using PlatformIO in Visual Studio Code](/img/platformio-erase.png) From 8913391201584863e4fb50529152675a170a12b7 Mon Sep 17 00:00:00 2001 From: Dale Floer Date: Mon, 3 Jan 2022 20:15:33 -0800 Subject: [PATCH 30/30] Update broken link. --- docs/software/other/mqtt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/software/other/mqtt.md b/docs/software/other/mqtt.md index ffab3473..73181191 100644 --- a/docs/software/other/mqtt.md +++ b/docs/software/other/mqtt.md @@ -67,7 +67,7 @@ FIXME, discuss possible attacks by griefers and how they can be prevented #### Service Envelope -The payload published on mesh/... will always be wrapped in a [ServiceEnvelope protobuf](https://github.com/meshtastic/Meshtastic-protobufs/blob/master/docs/docs.md#.ServiceEnvelope). +The payload published on mesh/... will always be wrapped in a [ServiceEnvelope protobuf](https://meshtastic.org/docs/developers/protobufs/api#serviceenvelope). ServiceEnvelope will include the message, and full information about arrival time, who forwarded it, source channel, source mesh id, etc...