Fixes & cleanup

This commit is contained in:
Sacha Weatherstone 2022-01-09 12:03:14 +11:00
parent 360c6f6166
commit 98d0cd2059
6 changed files with 63 additions and 222 deletions

View file

@ -5,7 +5,7 @@ sidebar_label: Multiple channels
---
:::warning
Multiple channel support is currently an experimental feature that is ONLY supported by the Python CLI.
Multiple channel support is currently an experimental feature that is ONLY supported by the Python CLI and WebUI right now.
:::
Version 1.2 of the software adds support for multiple (simultaneous) channels. The idea behind this feature is that a mesh can allow multiple users/groups to be share common mesh infrastructure. Even including routing messages for others when no one except that subgroup of users has the encryption keys for their private channel.

View file

@ -34,6 +34,11 @@ const config = {
srcDark: "design/logo/svg/Mesh_Logo_White.svg",
},
items: [
{
label: "Start Here",
to: "docs/academy",
activeBasePath: "docs/academy",
},
{
label: "Firmware",
to: "firmware",

View file

@ -11,13 +11,13 @@
"clear": "docusaurus clear"
},
"dependencies": {
"@algolia/client-search": "^4.11.0",
"@algolia/client-search": "^4.12.0",
"@docusaurus/core": "^2.0.0-beta.14",
"@docusaurus/plugin-ideal-image": "^2.0.0-beta.14",
"@docusaurus/preset-classic": "^2.0.0-beta.14",
"@mdx-js/react": "^1.6.22",
"dotenv": "^10.0.0",
"esp-web-flasher": "^4.0.0",
"esp-web-flasher": "^5.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
@ -40,7 +40,7 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.0.0-beta.14",
"@tsconfig/docusaurus": "^1.0.4",
"@types/node": "^17.0.5",
"@types/node": "^17.0.8",
"@types/w3c-web-serial": "^1.0.2",
"typescript": "^4.5.4"
}

View file

@ -1,66 +0,0 @@
---
id: device-channels
title: Multiple channel support
sidebar_label: Multiple channels
---
:::warning
Multiple channel support is currently an experimental feature that is ONLY supported by the Python CLI and WebUI right now.
:::
Version 1.2 of the software adds support for multiple (simultaneous) channels. The idea behind this feature is that a mesh can allow multiple users/groups to be share common mesh infrastructure. Even including routing messages for others when no one except that subgroup of users has the encryption keys for their private channel.
### What is the Primary channel
The way this works is that each node keeps a list of channels it knows about. One of those channels (normally the first one) is labeled as the "PRIMARY" channel. The primary channel is the **only** channel that is used to set radio parameters. This channel controls things like spread factor, coding rate, bandwidth etc... Indirectly this channel also is used to select the specific frequency that all members of this mesh are talking over.
This channel may or may not have a PSK (encryption). If you are providing mesh to 'the public' we recommend that you always leave this channel with its default PSK. The default PSK is technically encrypted (and random users sniffing the ether would have to use Meshtastic to decode it), but the key is included in the GitHub source code and you should assume any 'attacker' would have it. But for a 'public' mesh you want this, because it allows anyone using Meshtastic in your area to send packets through 'your' mesh.
```bash title="Setting default channel"
$ meshtastic --seturl https://www.meshtastic.org/d/#CgUYAyIBAQ
Connected to radio
```
The device will now have its primary channel set to the default:
```bash title="Expected output"
$ meshtastic --info
Connected to radio
...
Channels:
PRIMARY psk=default { "modemConfig": "Bw125Cr48Sf4096", "psk": "AQ==" }
Primary channel URL: https://www.meshtastic.org/d/#CgUYAyIBAQ
```
### How to use Secondary channels
Any channel you add after that Primary channel is Secondary. Secondary channels are used only for encryption and (in the case of some special applications) security. If you would like to have a private channel over a more public mesh, you probably want to create a secondary channel. When sharing that URL with your private group you will share the "Complete URL". The complete URL includes your secondary channel (for encryption) and the primary channel (to provide radio/mesh access).
Secondary channels **must** have a PSK (encryption).
```bash title="Adding a channel called testing"
$ meshtastic --ch-add testing
Connected to radio
Writing modified channels to device
```
The device will now have a Secondary channel called "testing"
```bash title="Expected output"
$ meshtastic --info
Connected to radio
...
Channels:
PRIMARY psk=default { "modemConfig": "Bw125Cr48Sf4096", "psk": "AQ==" }
SECONDARY psk=secret { "psk": "HW7E3nMbiNbvr6MhsDonLCmj7eSAhttzjbIx/r5OQmg=", "name": "testing" }
Primary channel URL: https://www.meshtastic.org/d/#CgUYAyIBAQ
Complete URL (includes all channels): https://www.meshtastic.org/d/#CgUYAyIBAQopIiAdbsTecxuI1u-voyGwOicsKaPt5ICG23ONsjH-vk5CaCoFYWRtaW4
```
Secondary channels can be deleted by specifying their index, otherwise ch-del will attempt to delete channel index 0
```bash title="Deleting a secondary channel"
$ meshtastic --ch-index 1 --ch-del
Connected to radio
Deleting channel 1
```

View file

@ -1,139 +0,0 @@
// @ts-check
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Meshtastic",
tagline: "Open Source hiking, pilot, skiing and secure GPS mesh communicator",
url: "https://meshtastic.org",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "design/web/favicon.ico",
organizationName: "meshtastic",
projectName: "meshtastic",
themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ {
colorMode: {
respectPrefersColorScheme: true,
},
announcementBar: {
id: "play_store_workaround",
content:
'Android app unavailable in the Google Play Store store. Install by <a href="/docs/software/android/android-installation">side-loading</a> from <a href="https://github.com/meshtastic/Meshtastic-Android/releases">GitHub</a> or <a href="https://www.amazon.com/Geeksville-Industries-Meshtastic/dp/B08CY9394Q">Amazon</a>.',
backgroundColor: "#ff9999",
textColor: "#091E42",
isCloseable: true,
},
navbar: {
title: "Meshtastic",
hideOnScroll: true,
logo: {
alt: "Meshtastic Logo",
src: "design/logo/svg/Mesh_Logo_Black.svg",
srcDark: "design/logo/svg/Mesh_Logo_White.svg",
},
items: [
{
label: "Start Here",
to: "docs/academy",
activeBasePath: "docs/academy",
},
{
label: "Showcase",
to: "showcase",
activeBasePath: "showcase",
},
{
label: "Docs",
to: "docs/getting-started",
activeBasePath: "docs/getting-started",
},
{
label: "Firmware",
to: "firmware",
activeBasePath: "firmware",
},
{
href: "https://meshtastic.discourse.group",
label: "Forum",
position: "left",
},
{
href: "https://github.com/meshtastic/meshtastic",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Get Started",
to: "docs/getting-started",
},
{
label: "Showcase",
to: "showcase",
},
],
},
{
title: "Community",
items: [
{
label: "Forum",
href: "https://meshtastic.discourse.group",
},
{
label: "Discord",
href: "https://discord.gg/UQJ5QuM7vq",
},
],
},
{
title: "More",
items: [
{
label: "GitHub",
href: "https://github.com/meshtastic/meshtastic",
},
{
label: "Legal",
to: "docs/legal",
},
],
},
],
copyright: `<a href="https://vercel.com/?utm_source=meshtastic&utm_campaign=oss" style="color: white">Powered by ▲ Vercel</a> | Meshtastic® trademark is a registered trademark belonging to Geeksville Industries LLC`,
},
algolia: {
apiKey: "01ad7e13d3fe392d2ad26da3c69dbc21",
indexName: "meshtastic",
contextualSearch: false,
searchParameters: {},
},
},
presets: [
[
"@docusaurus/preset-classic",
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://github.com/meshtastic/meshtastic/edit/master/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
plugins: ["@docusaurus/plugin-ideal-image"],
};
module.exports = config;

View file

@ -33,6 +33,11 @@
resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.11.0.tgz#066fe6d58b18e4b028dbef9bb8de07c5e22a3594"
integrity sha512-lODcJRuPXqf+6mp0h6bOxPMlbNoyn3VfjBVcQh70EDP0/xExZbkpecgHyyZK4kWg+evu+mmgvTK3GVHnet/xKw==
"@algolia/cache-common@4.12.0":
version "4.12.0"
resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.12.0.tgz#c1111a4d3e9ba2d52cadb4523152580db0887293"
integrity sha512-2Z8BV+NX7oN7RmmQbLqmW8lfN9aAjOexX1FJjzB0YfKC9ifpi9Jl4nSxlnbU+iLR6QhHo0IfuyQ7wcnucCGCGQ==
"@algolia/cache-in-memory@4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.11.0.tgz#763c8cb655e6fd2261588e04214fca0959ac07c1"
@ -67,6 +72,14 @@
"@algolia/requester-common" "4.11.0"
"@algolia/transporter" "4.11.0"
"@algolia/client-common@4.12.0":
version "4.12.0"
resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.12.0.tgz#402395e2cffad89188d76b83615acffb3e45e658"
integrity sha512-fcrFN7FBmxiSyjeu3sF4OnPkC1l7/8oyQ8RMM8CHpVY8cad6/ay35MrfRfgfqdzdFA8LzcBYO7fykuJv0eOqxw==
dependencies:
"@algolia/requester-common" "4.12.0"
"@algolia/transporter" "4.12.0"
"@algolia/client-personalization@4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-4.11.0.tgz#d3bf0e760f85df876b4baf5b81996f0aa3a59940"
@ -76,7 +89,7 @@
"@algolia/requester-common" "4.11.0"
"@algolia/transporter" "4.11.0"
"@algolia/client-search@4.11.0", "@algolia/client-search@^4.11.0":
"@algolia/client-search@4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.11.0.tgz#c1105d715a2a04ba27231eca86f5d6620f68f4ae"
integrity sha512-iovPLc5YgiXBdw2qMhU65sINgo9umWbHFzInxoNErWnYoTQWfXsW6P54/NlKx5uscoLVjSf+5RUWwFu5BX+lpw==
@ -85,11 +98,25 @@
"@algolia/requester-common" "4.11.0"
"@algolia/transporter" "4.11.0"
"@algolia/client-search@^4.12.0":
version "4.12.0"
resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.12.0.tgz#ac099ee9f8de85ec204d840bcac734224c7d150c"
integrity sha512-ik6dswcTQtOdZN+8aKntI9X2E6Qpqjtyda/+VANiHThY9GD2PBXuNuuC2HvlF26AbBYp5xaSE/EKxn1DIiIJ4Q==
dependencies:
"@algolia/client-common" "4.12.0"
"@algolia/requester-common" "4.12.0"
"@algolia/transporter" "4.12.0"
"@algolia/logger-common@4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.11.0.tgz#bac1c2d59d29dee378b57412c8edd435b97de663"
integrity sha512-pRMJFeOY8hoWKIxWuGHIrqnEKN/kqKh7UilDffG/+PeEGxBuku+Wq5CfdTFG0C9ewUvn8mAJn5BhYA5k8y0Jqg==
"@algolia/logger-common@4.12.0":
version "4.12.0"
resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.12.0.tgz#0f9dbe7ace88194b395a2cb958490eb47ac91f8e"
integrity sha512-V//9rzLdJujA3iZ/tPhmKR/m2kjSZrymxOfUiF3024u2/7UyOpH92OOCrHUf023uMGYHRzyhBz5ESfL1oCdh7g==
"@algolia/logger-console@4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.11.0.tgz#ced19e3abb22eb782ed5268d51efb5aa9ef109ef"
@ -109,6 +136,11 @@
resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.11.0.tgz#d16de98d3ff72434bac39e4d915eab08035946a9"
integrity sha512-+cZGe/9fuYgGuxjaBC+xTGBkK7OIYdfapxhfvEf03dviLMPmhmVYFJtJlzAjQ2YmGDJpHrGgAYj3i/fbs8yhiA==
"@algolia/requester-common@4.12.0":
version "4.12.0"
resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.12.0.tgz#b4d96f3cbd73206b6042e523d414a34cc005c2e2"
integrity sha512-qgfdc73nXqpVyOMr6CMTx3nXvud9dP6GcMGDqPct+fnxogGcJsp24cY2nMqUrAfgmTJe9Nmy7Lddv0FyHjONMg==
"@algolia/requester-node-http@4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.11.0.tgz#beb2b6b68d5f4ce15aec80ede623f0ac96991368"
@ -125,6 +157,15 @@
"@algolia/logger-common" "4.11.0"
"@algolia/requester-common" "4.11.0"
"@algolia/transporter@4.12.0":
version "4.12.0"
resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.12.0.tgz#e375e10731df95f1be3593b32e86b5c6452cc213"
integrity sha512-MOQVHZ4BcBpf3LtOY/3fqXHAcvI8MahrXDHk9QrBE/iGensQhDiZby5Dn3o2JN/zd9FMnVbdPQ8gnkiMwZiakQ==
dependencies:
"@algolia/cache-common" "4.12.0"
"@algolia/logger-common" "4.12.0"
"@algolia/requester-common" "4.12.0"
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.8.3":
version "7.16.0"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.0.tgz#0dfc80309beec8411e65e706461c408b0bb9b431"
@ -2581,10 +2622,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.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/node@^17.0.8":
version "17.0.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.8.tgz#50d680c8a8a78fe30abe6906453b21ad8ab0ad7b"
integrity sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==
"@types/parse-json@^4.0.0":
version "4.0.0"
@ -4299,10 +4340,10 @@ eslint-scope@5.1.1:
esrecurse "^4.3.0"
estraverse "^4.1.1"
esp-web-flasher@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/esp-web-flasher/-/esp-web-flasher-4.0.0.tgz#e37b6138753ac32cb736b5cab9297ab7688bd1c7"
integrity sha512-7d23iEkEjvrYkywLZtvg69GAitRJVE73dN6nmyWNmTvCe55b0UTzndLJtTHANbAiNzpgmJ7/kYnt202A7BD75A==
esp-web-flasher@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/esp-web-flasher/-/esp-web-flasher-5.0.0.tgz#832204b5c06a5b9acdc6cdcc857eb4dadfda0de6"
integrity sha512-WNwtj3m+KlWe4/tPZtY//UkXnU9BNnrbIwrTgZWh65kqXAyWyXfBT41z84qs7wIBS+AHQ5tMCY7b/1JIO3gGLA==
dependencies:
pako "^2.0.3"
tslib "^2.2.0"