Merge branch 'meshtastic:master' into master

This commit is contained in:
Garth Vander Houwen 2021-12-07 21:41:49 -08:00 committed by GitHub
commit 499dc82236
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 858 additions and 467 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ node_modules/
.docusaurus
build
.vercel
.DS_Store

View file

@ -0,0 +1,104 @@
# Meshtastic 1.1 feature list ideas
This is a collection of ideas for post 1.0 features. Based on community input we can tweak this list. Please add (but do not delete) ideas you are interested in. Feel free to add details/comments/links to **the bottom** of these lists, then post in [this thread](https://meshtastic.discourse.group/t/the-1-1-feature-work-list-triage-thread-lobby-for-your-features-here/1324) so we can discuss how to prioritize.
We have two approximate buckets: 1.1 features (next threeish months?) and 1.5 features (next sixish months). Mostly the focus now is on selecting which of the proposed 1.1 ideas developers actually want to work on. So please don't feel bad if your idea isn't high on this list, instead post in the linked thread and hopefully one of our volunteer devs will get excited to work on it. Or if you'd like to learn how to be a dev, we can mentor you through a github issue or on our slack channel.
But of course if someone wants to work on something (even if not in this list, or if it is low) work on it and have fun. We will happily merge pull-requests as possible.
## New device features
( @geeksville will probably spend about 60% of his time on these new features, and about 40% bug fixing / clean-up over the next two-three months)
Probably in 1.1:
* Implement router mode - for super long battery life / low power consumption solar nodes. (See issue #377).
* Finish RAK815 support (to prove that low ram NRF52 devices are fully supported)
* Wifi AP or STA mode support and serve up the meshtastic API on a TCP port (@mc-hamster is working on this)
* MQTT protocol/gateway so nodes(And other devices) can communicate through internet if they have an AP.(See issue #377)
* Use MQTT layer to allow remote GPIO control
* Use MQTT layer to allow text messaging gateway via the internet and riot.im.
* Any node in the mesh that has internet connectivity (via direct wifi or via connected PC/phone) will route MQTT for other nodes. #8
* Use the new named-attribute feature to make a 'remote GPIO' on device app, for easy remote control/monitoring of GPIOs with no custom code required. #182
* Port meshtastic to the Pinetab lora radio (this would also allow meshtastic to run on most Posix targets) #143
* Support totally opaque payloads, for use with really low end MCUs ( https://github.com/meshtastic/Meshtastic-device/issues/383 )
* Port meshtastic to very exciting boards I've been told about.
* When battery voltage falls below TBD threshold, change network params to maximize battery life and ensure we can still be contacted by radio if needed. (especially useful for solar powered router nodes) (T-Beam needs power-up default, at present they need a button press to start, not useful for unattended repeater)
* Add power profiles to the device, which can be set from the android app. See [Issue 389](https://github.com/meshtastic/Meshtastic-device/issues/389) - A small number of presets to simplify the selection of the device's power saving features.
Probably later:
* iOS client (probably via Flutter?)
* Implement a 'I need emergency help button' #60
* Make a new 'geofencing' on device app, which messages when a node enters/leaves a place. Could allow **very** long battery life for animal tracking.
* Store and forward messaging - If the mesh gets fragmented or a node goes out of range for x-period of time, eventually deliver the messages to the node that has rejoined. Especially useful for the hiking use case because someone may be over a ridge and have lost the Line of Sight.
* TTGO v2.0 2.1 navigation buttons soldered on the board(ability to customize button gpios via preferences)
* Extend the portduino simulator to run whole meshes of nodes in simulation.
* Enable a specific node in the mesh to log all position packets to a file (either in the App or SD card on device) to allow post activity route analysis of each node
* Buzzer support: Beeps for message received, node join, low battery etc
* Let user subscribe to multiple channels at once
* show compass heading in degrees as well as arrow. Makes it easier to track the true direction of a person in distress.
* add text-to-speech option in the app, for hands/screen free monitoring (while busy with stuff) and warnings of system events (new node discovered, low battery etc...)
* add speech-to-text to the app, now it can be used almost as a normal phone.
* External buttons - Have firmware recognise several exposed GPIO pins for 'scroll', 'event', etc. so that external mom.spst (reed sw, mercury sw. etc) can trigger these events. At present, we must expose device to the elements, or manufacture weatherproof actuators (difficult).
* Let app distribute APKs of itself over bluetooth or wifi: per [this forum post](https://meshtastic.discourse.group/t/suggestion-ability-to-transfer-app-apk-to-another-android-device-via-bt-or-other-non-network-dependent-method/711). let the device distribute the app or have a wifi web client for basic use for any wifi enabled device.
* Rearrange tabs on screen and add sorting option by name, range, battery, etc. See [Issue 387](https://github.com/meshtastic/Meshtastic-device/issues/387)
* Keyboard feature: Either connect a bluetooth or I2C cheap keyboard or use T-Beam buttons to select characters(One button select letters A-Z and the other one is the Next button.If you hold the next button down it will transmit the message)
Probably much-much later (or never? unless someone wants to do this):
* Code to support TTGO T-Dear mini, TTGO T-SOLAR, Lora32u4 II, Heltec Cube.Features: Recognise a relay in the nodeList as a relay.Ability to redirect all channels or only a list of channels.Have an owner password in order to change settings on the go(Like allowed channels name and battery status usage view etc).It should have a mode that it's used by the owner to map it's range. (@geeksville comment: I know of a couple of upcoming products that I think will make all of these 'ASR6505 based' low RAM devices obsolete. i.e. same price (approx), much more RAM and flash, even lower power consumption. So I don't recommend spending much time on this idea)
* Implement TTN LoraWan communication for messages and for 'I need emergency help button' #60 #377 (@geeksville comment: I think once we add our MQTT gateway/routing feature, there is minimal need for this case - given that TTN coverage is far lower than what meshtastic can achieve by letting any node gateway if it can get wifi or 4G)
* Stealth Mode: Fully disable GPS and location services to increase privacy. (I think this is already mentioned somewhere, can't find a link)
## Plumbing ideas
Not user visible but useful for the future.
Probably in 1.1:
* Clean up the device code - make the 'mesh' layer a separate library. Split the current gui into an on device 'app'
* Minor code cleanups, bugs #108, #107
* Portduino: meshtastic for base Posix (non arduino) systems.
* Add real power-on and factory diags, to detect failed hardware #128
Probably later:
* Report device crashes via the android analytics pipe
* Revisit the power measurements on ESP32 and NRF52 and retune, confirm new battery life
* Use the MQTT gateway to let users (optionally) upload signal strength and position info, so we can build a corpus of real-world measured radio performance
## App Ideas
These are ideas for the Android app. If anyone wants to make an iOS client (possibly based on [Flutter](https://flutter.dev/) @geeksville is happy to help you succeed)
Ideas for the meshtastic App development
Probably in 1.1:
* Make a tablet specific layout (I forget the bug number) - that shows map and chat at the same time
* Enable landscape layout (I forget the bug number)
* Tap on failed message to re-send them
* Implement Ping button for each node in the app list in order to refresh details about the position and the signal strength.
* Display nodes Rssi connection status with other nodes (It would be cool to see the RSSI on the map for each node from the entire network(This can be called to diagnose the network and has to be done through a button press in order to get this info when it's needed).This would help to extend coverage in the area)
* Notifications when node joins your network.
* Set wifi SSID PASSWORD, MQTT SERVER IP, power profiles #389 from the app. Probably best done by using reflection to get various settings names.
Probably later:
* Whatsapp Style communication system with full name display and correct message positioning(Sender's messages in the right and receiver's message in the left)
* Different icons for different node models, different icons for the nodes that are connected to the internet to suggest internet and mqtt connection, also more info on the "People" section(second tab from the left): RSSI, Board Info, Wifi Access, MQTT Access.
* Allow the sharing of static GPS Waypoints that would be plotted on the application map such as: Meeting locations, First AID, Water source, Vista, etc.
# 1.5 feature ideas
This is the next big bucket after 1.1. Probably dropping about six months from now. Biggest work item is probably switching to qmesh or reticulum as our transport (or possibly staying with the current transport and optimizing).
## Protocol ideas
* Use an alternative routing protocol (Reticulum, QMesh) #192
* Fully implement DSR for unicast messages #3 (if we don't switch to a different transport)
* Allow nodes to route for channels they don't have the encryption keys for
* Programmatically limit duty cycles for regulatory compliance
* Since nodes have GPS time, leave all receivers (and CPUs) completely off most of the time - then once every 30secs, wake and check to see if anyone is transmitting)

View file

@ -0,0 +1,66 @@
If you have not already done so, download and have the latest firmware for your device, and flash it to your device.
There is a very good guide for doing this [here](https://github.com/meshtastic/Meshtastic-device#firmware-installation).
Part of this guide covers the installation of pip which must be done first.
**For Linux users:**
From a terminal copy and paste the following command
```bash
pip3 install meshtastic
```
**For Windows users:**
_Insert instructions on how to install meshtastic here_
**For Mac OS users:**
_Insert instructions on how to install meshtastic here_
Using a text editor, open a blank document and copy and paste the following text
```bash
#/bin/sh
clear
echo "Set all Router Parameter"
meshtastic --setowner MeshRelay
meshtastic --settime
meshtastic --set is_router true
meshtastic --setlat 53.9 --setlon -6.8 --setalt 91
meshtastic info
```
Alter the parameter `meshtastic --setowner MeshRelay` and change "MeshRelay" to your chosen name
This will set the name of the relay.
Alter the parameter `meshtastic --setlat 53.9 --setlon -6.8 --setalt 91`
This parameter sets the latitude, longitude and altitude of your relay, assuming it doesnt have a working or installed GPS. If you have a working GPS, the device will connect to a GPS satellite and update the latitude, longitude and altitude.
Using this site, find the location of where you plan to place your relay.
[Get latitude, longitude and altitude](https://www.maps.ie/coordinates.html)
Move the place marker over the spot where your relay is to placed, and it will give you the latitude, longitude and altitude.
Enter the latitude and longitude to one decimal place and altitude is recorded in metres in the configuration file.
As a suggestion, save the configuration file into the same folder, where you have downloaded the latest device firmware.
Save the file as `relay.sh`
Go to the folder where you have saved the script and right click on "Open in Terminal"
At the command prompt in Terminal, enter the following command
```bash
sudo chmod -R 777 relay.sh
```
This enables the script to be executed as a program.
Then at the prompt enter: `./relay.sh`
That's it, your Meshtastic device is now configure to operate as a relay.
**Some explanations of other parameters**
`meshtastic --set is_router true` tells node to be power conscious and to only power up the screen/BLE if the user presses a button. Eventually will also imply that "this node has good line of sight and should be heavily weighted when routing". This is the option you should probably use.
`meshtastic --set is_low_power true`. This option means "work like a regular node, with the normal sleep/wake pattern but even though you see power coming in on USB dont constantly stay awake". You **almost certainly don't want this option** but it is useful for some edge cases (solar powered node that still talks Bluetooth to the app etc...).

View file

@ -26,7 +26,6 @@
</a>
</span>
<br />
<hr />
</div>

View file

@ -41,6 +41,7 @@ TBD
* * pip3 install pygatt
* * pip3 install pandoc
* * pip install twine
* * pip3 install -r requirements.txt
* https://pandoc.org/installing.html
* nanopb 0.4.4 installed

View file

@ -3,6 +3,7 @@ id: flashing-esp32
title: Flashing ESP32 devices firmware
sidebar_label: ESP32 devices
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@ -18,43 +19,40 @@ Some newer boards may require the drivers for the [CH9102](http://www.wch.cn/dow
:::
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
> Connect your Meshtastic device to your USB port, open a `Terminal` and enter the following command:
> ```bash
> lsusb
> ```
> You should see something like: `ID 10c4:ea60 Silicon Labs CP210x UART Bridge` for CP210X or `ID 1a86:55d4 QinHeng Electronics USB Single Serial` for CH9102
> Connect your Meshtastic device to your USB port, open a `Terminal` and enter the following command:
>
> ```bash
> lsusb
> ```
>
> You should see something like: `ID 10c4:ea60 Silicon Labs CP210x UART Bridge` for CP210X or `ID 1a86:55d4 QinHeng Electronics USB Single Serial` for CH9102
</TabItem>
<TabItem value="macos">
> Navigate to `Apple Menu  > About This Mac > System Report... > Hardware > USB`.
> You should see something like `CP210X USB to UART Bridge Controller`. If not download the appropriate drivers
> Navigate to `Apple Menu  > About This Mac > System Report... > Hardware > USB`.
> You should see something like `CP210X USB to UART Bridge Controller`. If not download the appropriate drivers
</TabItem>
<TabItem value="windows">
> Navigate to `Device Manager > Ports (COM & LPT)`. You should see something like `Silicon Labs CP210X USB to UART Bridge (COM5)`. If not download the appropriate drivers
> Navigate to `Device Manager > Ports (COM & LPT)`. You should see something like `Silicon Labs CP210X USB to UART Bridge (COM5)`. If not download the appropriate drivers
</TabItem>
</Tabs>
### Download Latest Firmware
Prebuilt binaries for the supported radios are available in our releases. Your initial installation has to happen over USB from your Mac, Windows or Linux PC. Once our software is installed, all future software updates happen over bluetooth from your phone.
<!--- TODO I'd like to create prettier buttons for this than just a table --->
| [Current Firmware](https://github.com/meshtastic/meshtastic-device/releases/latest) | [List of Firmware Versions](https://github.com/meshtastic/meshtastic-device/releases/) |
| :--------------: | :-----------------------: |
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/tbeam-hardware#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.
@ -65,96 +63,110 @@ The [T-Beam 0.7](../hardware/tbeam-hardware#t-beam---v07) board is an earlier ve
## Command Line Interface Instructions
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
### Install Prerequisite Software
### Install Prerequisite Software
> Check if you have `python3` and `pip` installed with the following command
> ```bash
> python3 --version
> pip3 --version
> ```
> If `python3` is not installed, install with
> ```bash
> sudo apt-get update
> sudo apt-get install python3
> ```
> If `pip` is not installed, install with
> ```bash
> sudo apt-get install python3-pip
> ```
> Check if you have `python3` and `pip` installed with the following command
>
> ```bash
> python3 --version
> pip3 --version
> ```
>
> If `python3` is not installed, install with
>
> ```bash
> sudo apt-get update
> sudo apt-get install python3
> ```
>
> If `pip` is not installed, install with
>
> ```bash
> sudo apt-get install python3-pip
> ```
### Install `esptool`
### Install `esptool`
> ```bash
> pip3 install --upgrade esptool
> ```
> ```bash
> pip3 install --upgrade esptool
> ```
</TabItem>
<TabItem value="macos">
### Install Prerequisite Software
### Install Prerequisite Software
> OS X comes with `Python 2.7` installed, but not `pip`. The following uses Homebrew to install `python3` which includes `pip3`. On MacOS you will use `pip3` instead > of `pip`.
> OS X comes with `Python 2.7` installed, but not `pip`. The following uses Homebrew to install `python3` which includes `pip3`. On MacOS you will use `pip3` instead > of `pip`.
:::note
Check if you have Homebrew installed with the following command
```bash
brew -v
```
If it's not installed, follow the instructions on the [Homebrew website](https://brew.sh) before continuing.
:::
> Check if you have `python3` and `pip` installed with the following command
> ```bash
> python3 --version
> pip3 --version
> ```
> If `python3` is not installed, install with
> Install Python3
> ```bash
> brew install python3
> ```
> Confirm `pip3` was installed alongside `python3`
> ```bash
> pip3 -v
> ```
> Check if you have `python3` and `pip` installed with the following command
>
> ```bash
> python3 --version
> pip3 --version
> ```
>
> If `python3` is not installed, install with
> Install Python3
>
> ```bash
> brew install python3
> ```
>
> Confirm `pip3` was installed alongside `python3`
>
> ```bash
> pip3 -v
> ```
### Install `esptool`
> ```bash
> pip3 install --upgrade esptool
> ```
### Install `esptool`
> ```bash
> pip3 install --upgrade esptool
> ```
</TabItem>
<TabItem value="windows">
> - Download and install [Python](https://www.python.org/). When installing, make sure to click `Add Python X.Y to PATH`.
> - Download and install [Gitbash](https://gitforwindows.org/) (or other appropriate shell) and run all subsequent commands from that shell.
> - Download and install [Python](https://www.python.org/). When installing, make sure to click `Add Python X.Y to PATH`.
> - Download and install [Gitbash](https://gitforwindows.org/) (or other appropriate shell) and run all subsequent commands from that shell.
:::note
Confirm installation of `python` & `pip` with the following commands.
```bash
py --version
```
```bash
pip --version
```
:::
### Install `esptool`
### Install `esptool`
> ```bash
> pip install --upgrade esptool
> ```
> ```bash
> pip install --upgrade esptool
> ```
</TabItem>
</Tabs>
@ -167,36 +179,39 @@ Connect the radio to your computer using a data USB cable. Confirm your device i
On windows, you must explicitly declare esptools as a .py script. Use `esptools.py chip_id`.
:::
```bash title="Command"
esptool chip_id
```
```bash title="Expected Output"
# You should see a result similar to this:
mydir$ esptool chip_id
esptool.py v2.6
Found 2 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 24:6f:28:b5:36:71
Uploading stub...
Running stub...
Stub running...
Warning: ESP32 has no Chip ID. Reading MAC instead.
MAC: 24:6f:28:b5:36:71
Hard resetting via RTS pin...
```
```bash title="Command"
esptool chip_id
```
```bash title="Expected Output"
# You should see a result similar to this:
mydir$ esptool chip_id
esptool.py v2.6
Found 2 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 24:6f:28:b5:36:71
Uploading stub...
Running stub...
Stub running...
Warning: ESP32 has no Chip ID. Reading MAC instead.
MAC: 24:6f:28:b5:36:71
Hard resetting via RTS pin...
```
### Navigate to Firmware
`cd` into the directory where you unzipped the latest release. For example:
```bash title="Example"
cd /Downloads/firmware/
```
### Install/Update Firmware
Install or Update the device that you have by using the following commands according to your operating system:
:::caution
@ -204,116 +219,56 @@ Be very careful to install the correct load for your board. In particular the po
:::
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
#### Install
#### Install
> ```bash title="Command"
> ./device-install.sh -f firmware-BOARD-VERSION.bin
> ```
> ```bash title="Command"
> ./device-install.sh -f firmware-BOARD-VERSION.bin
> ```
#### Update
#### Update
> ```bash title="Command"
> ./device-update.sh -f firmware-BOARD-VERSION.bin
> ```
> ```bash title="Command"
> ./device-update.sh -f firmware-BOARD-VERSION.bin
> ```
</TabItem>
<TabItem value="macos">
#### Install
#### Install
> ```bash title="Command"
> ./device-install.sh -f firmware-BOARD-VERSION.bin
> ```
> ```bash title="Command"
> ./device-install.sh -f firmware-BOARD-VERSION.bin
> ```
#### Update
#### Update
> ```bash title="Command"
> ./device-update.sh -f firmware-BOARD-VERSION.bin
> ```
> ```bash title="Command"
> ./device-update.sh -f firmware-BOARD-VERSION.bin
> ```
</TabItem>
<TabItem value="windows">
#### Install
#### Install
> ```bash title="Command"
> ./device-install.bat -f firmware-BOARD-VERSION.bin
> ```
> ```bash title="Command"
> ./device-install.bat -f firmware-BOARD-VERSION.bin
> ```
#### Update
> ```bash title="Command"
> ./device-update.bat -f firmware-BOARD-VERSION.bin
> ```
</TabItem>
</Tabs>
## Graphical User Interface Instructions
### Download `ESPHome Flasher`
:::note
ESPHome Flasher also provides instructions to build from source or install via `pip` on their [README](https://github.com/esphome/esphome-flasher/).
:::
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
| [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases/latest) |
| :-----------------------------------------------------------: |
### Open ESPHome Flasher
> There should be no installation required. Connect your device using a data USB cable and refresh the `Serial Port`. Select the port that your device is connected to.
:::note
ESPHome Flasher for linux is a prebuilt binary for Ubuntu. These instructions were only tested on Ubuntu. Mileage may very on other distros.
:::
</TabItem>
<TabItem value="macos">
### Open ESPHome Flasher
> There should be no installation required. Connect your device using a data USB cable and refresh the `Serial Port`. Select the port that your device is connected to.
:::note
If you get an error saying `The application "ESPHome-Flasher.app" can't be opened` it is likely a permissions issue. See [here](https://github.com/esphome/esphome-flasher/issues/26#issuecomment-671061140) for instructions.
:::
:::note
>If you get an error saying `"ESPHome-Flasher.app" cannot be opened because the developer cannot be verified`, click `cancel`. Right click on the application and select `Open`. Select `Open` on the confirmation alert.
:::
</TabItem>
<TabItem value="windows">
| [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases/latest) |
| :-----------------------------------------------------------: |
### Open ESPHome Flasher
> There should be no installation required. Connect your device using a data USB cable and refresh the `Serial Port`. Select the port that your device is connected to.
#### Update
> ```bash title="Command"
> ./device-update.bat -f firmware-BOARD-VERSION.bin
> ```
</TabItem>
</Tabs>

View file

@ -3,6 +3,7 @@ id: flashing-nrf52
title: Flashing nRF52 devices firmware
sidebar_label: nRF52 devices
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@ -15,10 +16,9 @@ Please ensure that you use a data USB-C cable, as many USB-C cables provide powe
### T-Echo
:::tip
The usb-C to usb-A cable from LILYGO is *NOT* a "data cable", and can only be used for charging.
The usb-C to usb-A cable from LILYGO is _NOT_ a "data cable", and can only be used for charging.
:::
#### Windows:
You may need to install the [USB device drivers](http://www.wch-ic.com/search?q=ch340&t=downloads) if your device does not show up when connected.
@ -28,11 +28,11 @@ You may need to install the [USB device drivers](http://www.wch-ic.com/search?q=
Last Verified T-Echo nRF52840 on: Mac OS Monterey v12.0.1 (Intel chipset)
:::tip
You can use the latest [Apple USB-C Charge cables](https://www.apple.com/shop/product/MLL82AM/A/usb-c-charge-cable-2-m). The cable that is provided with the iPad Pro works. Older Laptop usb-C Power cables will *NOT* work, as they are missing the data lines.
You can use the latest [Apple USB-C Charge cables](https://www.apple.com/shop/product/MLL82AM/A/usb-c-charge-cable-2-m). The cable that is provided with the iPad Pro works. Older Laptop usb-C Power cables will _NOT_ work, as they are missing the data lines.
:::
:::caution
With the latest versions of MacOS, the USB Serial driver is built-in. Do *NOT* download any USB device drivers - this will actually prevent you from connecting to your T-Echo from your Mac. If you downloaded/installed any already, please Remove them.
With the latest versions of MacOS, the USB Serial driver is built-in. Do _NOT_ download any USB device drivers - this will actually prevent you from connecting to your T-Echo from your Mac. If you downloaded/installed any already, please Remove them.
:::
<details>
@ -42,52 +42,48 @@ With the latest versions of MacOS, the USB Serial driver is built-in. Do *NOT* d
If you have already downloaded/installed the MacOS WCH-IC CH340 ("CH341SER_MAC") drivers via the `CH34x_Install_V1.5.pkg`, you will have to Uninstall the kernel extension:
<br />
<br />
1.) Unplug your T-Echo<br />
2.) Open the Terminal and run:<br />
3.) sudo -rf /Library/Extensions/usbserial.kext`<br />
4.) Reboot
1. Unplug your T-Echo<br />
2. Open the Terminal and run:<br />
3. sudo -rf /Library/Extensions/usbserial.kext`<br />
4. Reboot
</div>
</div>
</details>
Verify successful connections with:
* Plug in your T-Echo
* Open the Terminal
* `ls -l /dev/tty.usbmodem*`
- Plug in your T-Echo
- Open the Terminal
- `ls -l /dev/tty.usbmodem*`
If the device file exists, you will also notice a "TECHOBOOT" volume in the Finder, or in the Terminal after double-clicking the Reset Button (see below)
* `ls /Volumes/TECHOBOOT`
- `ls /Volumes/TECHOBOOT`
### WisBlock RAK4631
Please ensure that you have updated the bootloader to the latest version using the information on the [RAK Documentation Center](https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Quickstart/#how-to-check-if-you-have-the-updated-rak4631-bootloader) website.
## Download Latest Firmware
Prebuilt binaries for the supported radios are available in our releases. Your initial installation has to happen over USB from your Mac, Windows or Linux PC. Once our software is installed, all future software updates happen over bluetooth from your phone.
<!--- TODO I'd like to create prettier buttons for this than just a table --->
| [Current Firmware](https://github.com/meshtastic/meshtastic-device/releases/latest) | [List of Firmware Versions](https://github.com/meshtastic/meshtastic-device/releases/) |
| :--------------: | :-----------------------: |
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.
## Install/Update Firmware
:::caution
Be careful to install the correct load for your board. While it is unlikely that you will cause damage to your device, the wrong firmware will cause it to not work.
:::
- Connect your device to your computer with a USB cable. If you computer complains about needing to format a new drive, cancel the format command.
- Double click the `Reset` button on your device, this will put it into boot loader mode.
* Connect your device to your computer with a USB cable. If you computer complains about needing to format a new drive, cancel the format command.
* Double click the `Reset` button on your device, this will put it into boot loader mode.
[<img alt="LILYGO T-Echo" src="/img/hardware/t-echo-lilygo.jpg" style={{zoom:'25%'}} />](/img/hardware/t-echo-lilygo.jpg)
[<img alt="LILYGO T-Echo" src="/img/hardware/t-echo-lilygo.jpg" style={{zoom:'25%'}} />](/img/hardware/t-echo-lilygo.jpg)
* A new drive will then be mounted on your computer. Open this drive and you should see three files: `CURRENT.UF2`, `INDEX.HTM`, and `INFO_UF2.TXT`
* Copy the appropriate `firmware-xxxxx-1.2.x.uf2` file from the firmware zip file onto the new drive.
- A new drive will then be mounted on your computer. Open this drive and you should see three files: `CURRENT.UF2`, `INDEX.HTM`, and `INFO_UF2.TXT`
- Copy the appropriate `firmware-xxxxx-1.2.x.uf2` file from the firmware zip file onto the new drive.
:::note
You are going to copy/drop "as is" 'firmware-xxxxx-1.2.x.uf2' (*NOT* over the "CURRENT.UF2" file) in the volume, and the device reboot will copy it/load it correctly.
You are going to copy/drop "as is" 'firmware-xxxxx-1.2.x.uf2' (_NOT_ over the "CURRENT.UF2" file) in the volume, and the device reboot will copy it/load it correctly.
:::
* Once the file has finished copying over, the device will reboot, loading the new firmware as it does.
- Once the file has finished copying over, the device will reboot, loading the new firmware as it does.

View file

@ -27,11 +27,7 @@ Make sure not to power the radio on without first attaching the antenna! You cou
## Download Firmware
Prebuilt binaries for the supported radios are available in our releases. Your initial installation has to happen over USB from your Mac, Windows or Linux PC. Once our software is installed, all future software updates can happen over bluetooth from your phone.
<!--- TODO I'd like to create prettier buttons for this than just a table --->
| [Current Firmware](https://github.com/meshtastic/meshtastic-device/releases/latest) | [List of Firmware Versions](https://github.com/meshtastic/meshtastic-device/releases/) |
| :--------------: | :-----------------------: |
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.
## Flashing Firmware
@ -78,126 +74,16 @@ The Android app is currently more robust than the iOS app. But, they both should
## A good third test (connect via Wifi/http)
- Configure the *wifi_ssid* and *wifi_password*. "meshtastic --set wifi_ssid 'xxx' --set wifi_password 'yyy'" (where xxx and yyy are the appropriate values for your neetwork)
- Configure the _wifi_ssid_ and _wifi_password_. "meshtastic --set wifi_ssid 'xxx' --set wifi_password 'yyy'" (where xxx and yyy are the appropriate values for your neetwork)
- Reboot radio by either removing power or pressing the power button.
- Click on the button to cycle thru to the screen with ip address and verify that there was a connection to the wifi access point.
- Send message(s). "meshtastic --host 192.168.1.200 --sendtext hello"
- Verify that all radios are receiving the messages. Might have to click on the button on the radio(s) to see most recent message.
- Open up a brower to http://meshtastic.local to view the web UI (currently under development). You may need to open http://meshtastic.local/static )
- If you want to switch back to bluetooth, you will need to set the *wifi_ssid* and *wifi_password* values to blank values (ex: '').
- If you want to switch back to bluetooth, you will need to set the _wifi_ssid_ and _wifi_password_ values to blank values (ex: '').
## Troubleshooting
For any issues during setup, search [our forum](https://meshtastic.discourse.group) to find a solution. If you can't find one, please post your problem, providing as much detail as possible.
We are also on [Discord](https://discord.gg/UQJ5QuM7vq).
<!--- A guide to setting up your Meshtastic device.
The easiest way is to [buy a device with the software already installed](https://www.aliexpress.com/item/4001178678568.html) In the Americas get the 915mhz version, In Europe the 868Mhz or Asia 923Mhz [Frequency details](https://www.thethingsnetwork.org/docs/lorawan/frequencies-by-country.html).
Or you can install the software yourself using the instructions below.
## Table of Contents
- [Prerequisites](#prerequisites)
- [Firmware Installation](#firmware-installation)
- [Using GUI](#firmware-installation-gui)
- [Using Commandline](#firmware-installation-cli)
- [Troubleshooting](#Troubleshooting)
<a name="prerequisites"></a>
## Prerequisites
- Purchased radios
- Appropriate batteries (18650)
- Computer
- Data MicroUSB Cable (not a charge only one)
<a name="firmware-installation"></a>
## Firmware Installation
<a name="firmware-installation-gui"></a>
### Installing from a GUI - Windows & MacOS
1. Download and unzip the latest Meshtastic firmware [release](https://github.com/meshtastic/Meshtastic-esp32/releases).
2. Download [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases).
3. Connect your radio to your USB port and open ESPHome Flasher.
4. If your board is not showing under Serial Port then you likely need to install the drivers for the CP210X serial chip. In Windows you can check by searching “Device Manager” and ensuring the device is shown under “Ports”.
5. If there is an error, download the [drivers](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers), then unzip and run the Installer application.
6. In ESPHome Flasher, refresh the serial ports and select the port to which your board is connected.
7. Browse to the previously downloaded firmware and select the correct firmware based on the board type.
8. Select Flash ESP.
9. Once complete, “Done! Flashing is complete!” will be shown.
10. The board will boot and show the Meshtastic logo.
11. Debug messages sent from the Meshtastic device can be viewed with a terminal program such as PuTTY. Within PuTTY, click “Serial”, enter the “Serial line” com port (can be found at step 4), enter “Speed” as 921600, then click “Open”.
<a name="firmware-installation-cli"></a>
### Installing from a Commandline - Linux
Requires `Python` and `pip`
1. Download and unzip the latest Meshtastic firmware [release](https://github.com/meshtastic/Meshtastic-esp32/releases).
2. `pip install --upgrade esptool` - Installs esptool on your machine
3. Connect your radio to your USB port
4. `esptool.py chip_id` - Confirm that your device is talking to your PC by running
You should see something like:
```
mydir$ esptool.py chip_id
esptool.py v2.6
Found 2 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 24:6f:28:b5:36:71
Uploading stub...
Running stub...
Stub running...
Warning: ESP32 has no Chip ID. Reading MAC instead.
MAC: 24:6f:28:b5:36:71
Hard resetting via RTS pin...
```
5. `cd` into the directory where you unzipped the latest release.
6. Install the correct firmware for your board with `device-install.sh -f firmware-BOARD-VERSION.bin`
* Example: `./device-install.sh -f firmware-heltec-1.2.x.bin`
7. To update a the firmware on an existing Meshtastic device, run `device-update.sh -f firmware-BOARD-VERSION.bin`
* Example: `./device-update.sh -f firmware-heltec-1.2.x.bin`
### Installing from a Commandline - Mac
Installing on OS X through the commandline uses the same method as linux, but requires a slightly different method to install Python, pip and esptool.
OS X (10.15.3/Catalina) comes with Python 2.7 installed, but not pip.
1. `brew install pyenv` - Installs PyEnv
2. `pyenv install 3.7.7` - To install and select Python 3.7.7
3. `pyenv global 3.7.7` - Selects the new version of Python
4. `brew install pip` - Installs pip3
5. `pip3 install --upgrade esptool` - Installs esptool
You may need to install a driver from Silicon Labs for the [CP210X USB to UART bridge](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
6. Now install as per installing on the Linux commandline.
### Installing from a Commandline - Windows
Requires Python, pip, Gitbash
1. Download and install [Python](https://www.python.org/)
2. If you have a recent version of Python, pip should be installed by default. Check using the command `py -m pip --version`. This will display the installed version of pip. If it returns an error, you will need to [install pip](https://pip.pypa.io/en/stable/installing/).
3. Download and install [Gitbash](https://gitforwindows.org/) (or other appropriate shell)
4. Run `gitbash` and complete the installation as per the instructions for linux commandline.
<a name="troubleshooting"></a>
## Troubleshooting
For any issues during setup, search [our forum](https://meshtastic.discourse.group) to find a solution. If you can't find one, please post your problem, providing as much detail as possible.
--->

View file

@ -8,17 +8,19 @@ The device firmware runs on the nodes to build the mesh for communication. Each
The current firmware has support for a screen to display received messages, along with information about nodes on the mesh, and more detailed information about the device on which it is running.
The latest firmware can be downloaded from the <a href="https://github.com/meshtastic/Meshtastic-device/releases/latest">GibHut releases</a> page, which also contains the release notes for each version. If you wish to view the code or contribute to development of the firmware, please visit the device code <a href="https://github.com/meshtastic/Meshtastic-device">GitHub page</a>.
The latest firmware can be downloaded from the [Firmware](/firmware) page. If you wish to view the code or contribute to development of the firmware, please visit the device code <a href="https://github.com/meshtastic/Meshtastic-device">GitHub page</a>.
### Buttons
A number of devices support buttons that can be used to interact with the firmware. These buttons have a number of different functions:
* Reset button - This is present on most devices
* Power button - This is present on some devices. A long press powers the device off or turns it back on again.
* Program button - This is present of some devices and has a number of functions:
* Single press - This changes the page of information displayed on the screen.
* Double press - This sets the bluetooth pairing code to `123456` (useful if you do not have a screen on the device).
* Long press - This adjusts the contrast of the screen.
* Long press during reboot - This turns on the software wifi access point on devices that support wifi.
- Reset button - This is present on most devices
- Power button - This is present on some devices. A long press powers the device off or turns it back on again.
- Program button - This is present of some devices and has a number of functions:
- Single press - This changes the page of information displayed on the screen.
- Double press - This sets the bluetooth pairing code to `123456` (useful if you do not have a screen on the device).
- Long press - This adjusts the contrast of the screen.
- Long press during reboot - This turns on the software wifi access point on devices that support wifi.
### Screens

View file

@ -18,7 +18,14 @@ meshtastic -h
Because of the growing nature of this project, not all commands may appear when using the help command with `meshtastic -h`.
:::
## Changing device settings
## Getting a list of User Preferences
You can get a list of user preferences by running '--get' with an invalid atrribute 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)

View file

@ -36,6 +36,21 @@ interface.close()
Note: Be sure to change the ip address in the code above to a valid ip address for your setup.
You can get and update settings like this:
```python
import meshtastic
interface = meshtastic.SerialInterface()
ourNode = interface.getNode('^local')
print(ourNode.radioConfig.preferences)
ourNode.radioConfig.preferences.gps_update_interval = 60
print(ourNode.radioConfig.preferences)
ourNode.writeConfig()
interface.close()
```
For the rough notes/implementation plan see [TODO](https://github.com/meshtastic/Meshtastic-python/blob/master/TODO.md). See the API for full details of how to use the library.
## A note to developers of this lib

View file

@ -32,6 +32,11 @@ const config = {
srcDark: "img/meshtastic-design/logo/svg/Mesh_Logo_White.svg",
},
items: [
{
label: "Firmware",
to: "firmware",
activeBasePath: "firmware",
},
{
label: "Showcase",
to: "showcase",

View file

@ -16,9 +16,12 @@
"@docusaurus/plugin-ideal-image": "^2.0.0-beta.9",
"@docusaurus/preset-classic": "^2.0.0-beta.9",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"esbuild-loader": "^2.16.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
"swr": "^1.1.0",
"url-search-params-polyfill": "^8.1.1"
},
"browserslist": {
"production": [
@ -35,7 +38,7 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.0.0-beta.9",
"@tsconfig/docusaurus": "^1.0.4",
"@types/node": "^16.11.10",
"@types/node": "^16.11.12",
"typescript": "^4.5.2"
}
}

View file

@ -1,80 +1 @@
import { ShowcaseNetwork } from '../../utils/showcase';
export const networks: ShowcaseNetwork[] = [
{
id: "ckwhq3l5a000008kufkw8f3dg",
title: "Network 1",
description:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget dui mollis.",
nodes: [
{
latitude: -37.656719,
longitude: 145.632219,
},
{
latitude: -37.633466,
longitude: 145.692371,
},
{
latitude: -37.559148,
longitude: 145.735771,
},
],
tags: ["community", "largeNetwork"],
},
{
id: "ckwhq4jch000108kuawlwaz0y",
title: "Network 2",
description:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut mattis felis.",
nodes: [
{
latitude: -27.069626,
longitude: 139.961265,
},
{
latitude: -26.520932,
longitude: 139.773739,
},
{
latitude: -26.233798,
longitude: 139.752755,
},
],
tags: ["favorite", "portable"],
},
{
id: "ckwhq4skm000208ku4h8ta03q",
title: "Network 3",
description:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, faucibus ut.",
nodes: [
{
latitude: -5.64,
longitude: 134.749708,
},
{
latitude: -5.561545,
longitude: 134.706247,
},
],
tags: ["longDistance"],
},
{
id: "ckwhq4yau000308kufwqz6pri",
title: "Network 4",
description:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce luctus.",
nodes: [
{
latitude: 46.658126,
longitude: 62.22795,
},
{
latitude: 46.697482,
longitude: 61.560184,
},
],
tags: ["favorite", "largeNetwork", "offGrid"],
},
];
export const writeups: string[] = ["ckwhq3l5a000008kufkw8f3dg"];

View file

@ -1,5 +1,27 @@
import { NetworkWriteup } from '../../../utils/showcase';
import { rakWireless } from '../../hardware/rakWireless';
import { NetworkWriteup, ShowcaseNetwork } from '../../utils/showcase';
import { rakWireless } from '../hardware/rakWireless';
export const metadata: ShowcaseNetwork = {
id: "ckwhq3l5a000008kufkw8f3dg",
title: "Network 1",
description:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget dui mollis.",
nodes: [
{
latitude: -37.656719,
longitude: 145.632219,
},
{
latitude: -37.633466,
longitude: 145.692371,
},
{
latitude: -37.559148,
longitude: 145.735771,
},
],
tags: ["community", "largeNetwork"],
};
export const writeup: NetworkWriteup = {
summary: "This is the article summary.",

View file

@ -3,14 +3,14 @@ import React from 'react';
import { ShowcaseNetwork, sortedNetworks, TagType } from '../utils/showcase';
import { useSelectedTags } from './useSelectedTags';
const filterNetworks = (
showcaseNetworks: ShowcaseNetwork[],
const filterNetworks = async (
showcaseNetworks: Promise<ShowcaseNetwork[]>,
selectedTags: TagType[]
) => {
if (selectedTags.length === 0) {
return showcaseNetworks;
}
return showcaseNetworks.filter((showcaseNetwork) => {
return (await showcaseNetworks).filter((showcaseNetwork) => {
if (showcaseNetwork.tags.length === 0) {
return false;
}

View file

@ -0,0 +1,58 @@
import React from 'react';
import { Release } from '@site/src/utils/github';
export interface releaseCardProps {
variant: string;
description: string;
release?: Release[];
}
export const FirmwareCard = ({
variant,
description,
release,
}: releaseCardProps): JSX.Element => {
return (
<div className="card">
<div
className="card__header"
style={{ display: "flex", justifyContent: "space-between" }}
>
<h3>{variant}</h3>
{release?.length && <a href={release[0].html_url}>{release[0].name}</a>}
</div>
<div className="card__body">
<p>{description}</p>
</div>
<div className="card__footer">
{release?.length ? (
<>
<a
href={release[0].assets[1]?.browser_download_url}
className="button button--secondary button--block"
>
Download
</a>
<div className="margin-top--sm">
<h3>Older versions</h3>
{release.slice(1, 6).map((release) => {
return (
<div key={release.id}>
<a href={release.assets[1]?.browser_download_url}>
{release.name}
</a>
</div>
);
})}
</div>
</>
) : (
<button disabled className="button button--secondary button--block">
Loading...
</button>
)}
</div>
</div>
);
};

View file

@ -0,0 +1,79 @@
import React from 'react';
import useSWR from 'swr';
// import { Endpoints } from '@octokit/types';
import Layout from '@theme/Layout';
import { Release } from '../../utils/github';
import { FirmwareCard } from './_components/FirmwareCard';
const Firmware = (): JSX.Element => {
const fetcher = (url: string) => fetch(url).then((res) => res.json());
const { data, error } = useSWR<Release[]>(
"https://api.github.com/repos/meshtastic/meshtastic-device/releases",
fetcher
);
const beta = data?.filter((release) => release.prerelease === false);
const alpha = data?.filter((release) => release.prerelease === true);
return (
<Layout
title="Firmware"
description="Firmware download for the Meshtastic project"
>
<main className="margin-vert--xl">
<div className="container">
<ul
style={{
position: "relative",
display: "grid",
gap: "1.5rem",
gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
paddingLeft: "0",
}}
>
{/* */}
<FirmwareCard
variant="Beta"
description="Tested feature set. For those who want stability."
release={beta}
/>
<FirmwareCard
variant="Alpha"
description="Upcomming changes for testing. For those who want new features."
release={alpha}
/>
{/* */}
{/* */}
<div className="card">
<div className="card__header">
<h3>Bleeding</h3>
</div>
<div className="card__body">
<p>
Latest successful CI build. For those who want to break
things.
</p>
</div>
<div className="card__footer" style={{ marginTop: "1rem" }}>
<a
href="https://nightly.link/meshtastic/meshtastic-device/workflows/main/master/built.zip"
className="button button--secondary button--block"
>
Download
</a>
</div>
</div>
{/* */}
</ul>
</div>
</main>
</Layout>
);
};
export default Firmware;

View file

@ -1,29 +1,31 @@
import React from 'react';
import { networks } from '../../../data/networks/_overview';
import { NetworkWriteup } from '../../../utils/showcase';
// import { networks } from '../../../data/networks/_overview';
import { NetworkWriteup, ShowcaseNetwork } from '../../../utils/showcase';
interface NetworkProps {
id: string;
}
export const Network = ({ id }: NetworkProps): JSX.Element => {
import(`../../../data/networks/${id}/writeup.ts`).then((data) => {
import(`../../../data/networks/${id}`).then((data) => {
setNetworkWriteup(data.writeup as NetworkWriteup);
setMetadata(data.metadata as ShowcaseNetwork);
});
// console.log(data);
const [networkWriteup, setNetworkWriteup] = React.useState<NetworkWriteup>();
const [metadata, setMetadata] = React.useState<ShowcaseNetwork>();
React.useEffect(() => {
// data.then((data) => setNetworkWriteup(data));
}, []);
const network = networks.find((network) => network.id === id);
// const network = networks.find((network) => network.id === id);
return network && networkWriteup ? (
return metadata && networkWriteup ? (
<div className="container">
<h1>{network.title}</h1>
<p>{network.description}</p>
<h1>{metadata.title}</h1>
<p>{metadata.description}</p>
<div className="avatar">
<img
src={networkWriteup.author.avatarUrl}

View file

@ -7,13 +7,6 @@ import { useSelectedTags } from '../../../hooks/useSelectedTags';
import { ShowcaseNetwork, sortedNetworks } from '../../../utils/showcase';
import { Card } from './Card';
const favoriteNetworks = sortedNetworks.filter((network) =>
network.tags.includes("favorite")
);
const otherNetworks = sortedNetworks.filter(
(network) => !network.tags.includes("favorite")
);
interface NetworkSectionProps {
title: string;
icon?: JSX.Element;
@ -70,6 +63,16 @@ const NetworkSection = ({
};
export const Networks = (): JSX.Element => {
const [sorted, setSorted] = React.useState<ShowcaseNetwork[]>([]);
const [other, setOther] = React.useState<ShowcaseNetwork[]>([]);
sortedNetworks.then((networks) => {
setSorted(networks.filter((network) => network.tags.includes("favorite")));
});
sortedNetworks.then((networks) => {
setOther(networks.filter((network) => !network.tags.includes("favorite")));
});
const selectedTags = useSelectedTags();
const filteredNetworks = useFilteredNetworks();
@ -81,9 +84,9 @@ export const Networks = (): JSX.Element => {
title="Our favorites"
icon={<FiHeart />}
iconColor="rgb(190 24 93)"
networks={favoriteNetworks}
networks={sorted}
/>
<NetworkSection title="All networks" networks={otherNetworks} />
<NetworkSection title="All networks" networks={other} />
</>
) : (
<NetworkSection

View file

@ -1,3 +1,5 @@
import 'url-search-params-polyfill';
import React from 'react';
import { useHistory, useLocation } from '@docusaurus/router';

View file

@ -1,3 +1,5 @@
import 'url-search-params-polyfill';
import React from 'react';
import { useLocation } from '@docusaurus/router';

View file

@ -0,0 +1,93 @@
export interface Author {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
}
export interface Uploader {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
}
export interface Asset {
url: string;
id: number;
node_id: string;
name: string;
label: string;
uploader: Uploader;
content_type: string;
state: string;
size: number;
download_count: number;
created_at: Date;
updated_at: Date;
browser_download_url: string;
}
export interface Reactions {
url: string;
total_count: number;
"+1": number;
"-1": number;
laugh: number;
hooray: number;
confused: number;
heart: number;
rocket: number;
eyes: number;
}
export interface Release {
url: string;
assets_url: string;
upload_url: string;
html_url: string;
id: number;
author: Author;
node_id: string;
tag_name: string;
target_commitish: string;
name: string;
draft: boolean;
prerelease: boolean;
created_at: Date;
published_at: Date;
assets: Asset[];
tarball_url: string;
zipball_url: string;
body: string;
reactions: Reactions;
mentions_count: number;
}

View file

@ -1,4 +1,4 @@
import { networks } from '../data/networks/_overview';
import { writeups } from '../data/networks/_overview';
export interface Material {
name: string;
@ -94,18 +94,28 @@ export const Tags: Record<TagType, Tag> = {
export const sortBy = <T>(array: T[], getter: (item: T) => unknown): T[] => {
const sortedArray = [...array];
sortedArray.sort((a, b) =>
// @ts-ignore
getter(a) > getter(b) ? 1 : getter(b) > getter(a) ? -1 : 0
);
return sortedArray;
};
export const TagList = Object.keys(Tags) as TagType[];
function sortNetworks() {
let result = networks;
result = sortBy(result, (user) => user.title.toLowerCase());
result = sortBy(result, (user) => !user.tags.includes("favorite"));
return result;
}
const sortNetworks = async () => {
const metadataArr: ShowcaseNetwork[] = [];
const writeupsArr: NetworkWriteup[] = [];
writeups.map(async (id) => {
await import(`../data/networks/${id}`).then(
(network: { metadata: ShowcaseNetwork; writeup: NetworkWriteup }) => {
metadataArr.push(network.metadata);
writeupsArr.push(network.writeup);
}
);
});
return metadataArr;
};
export const sortedNetworks = sortNetworks();

View file

@ -1,8 +1,13 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"lib": ["ESNext", "DOM"],
"strict": true
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"resolveJsonModule": true,
"strict": true,
"types": ["@types/jest"]
},
"include": ["src/"]
"include": ["src/"],
"exclude": ["src/sw.js"]
}

View file

@ -1989,10 +1989,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.9.tgz#bc43c990c3c9be7281868bbc7b8fdd6e2b57adfa"
integrity sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==
"@types/node@^16.11.10":
version "16.11.11"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.11.tgz#6ea7342dfb379ea1210835bada87b3c512120234"
integrity sha512-KB0sixD67CeecHC33MYn+eYARkqTheIRNuu97y2XMjR7Wu3XibO1vaY6VBV6O/a89SPI81cEUIYT87UqUWlZNw==
"@types/node@^16.11.12":
version "16.11.12"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.12.tgz#ac7fb693ac587ee182c3780c26eb65546a1a3c10"
integrity sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==
"@types/parse-json@^4.0.0":
version "4.0.0"
@ -3736,6 +3736,127 @@ es-to-primitive@^1.2.1:
is-date-object "^1.0.1"
is-symbol "^1.0.2"
esbuild-android-arm64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.15.tgz#3fc3ff0bab76fe35dd237476b5d2b32bb20a3d44"
integrity sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==
esbuild-darwin-64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.15.tgz#8e9169c16baf444eacec60d09b24d11b255a8e72"
integrity sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==
esbuild-darwin-arm64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.15.tgz#1b07f893b632114f805e188ddfca41b2b778229a"
integrity sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==
esbuild-freebsd-64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.15.tgz#0b8b7eca1690c8ec94c75680c38c07269c1f4a85"
integrity sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==
esbuild-freebsd-arm64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.15.tgz#2e1a6c696bfdcd20a99578b76350b41db1934e52"
integrity sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==
esbuild-linux-32@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.15.tgz#6fd39f36fc66dd45b6b5f515728c7bbebc342a69"
integrity sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==
esbuild-linux-64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.15.tgz#9cb8e4bcd7574e67946e4ee5f1f1e12386bb6dd3"
integrity sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==
esbuild-linux-arm64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.15.tgz#3891aa3704ec579a1b92d2a586122e5b6a2bfba1"
integrity sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==
esbuild-linux-arm@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.15.tgz#8a00e99e6a0c6c9a6b7f334841364d8a2b4aecfe"
integrity sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==
esbuild-linux-mips64le@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.15.tgz#36b07cc47c3d21e48db3bb1f4d9ef8f46aead4f7"
integrity sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==
esbuild-linux-ppc64le@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.15.tgz#f7e6bba40b9a11eb9dcae5b01550ea04670edad2"
integrity sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==
esbuild-loader@^2.16.0:
version "2.16.0"
resolved "https://registry.yarnpkg.com/esbuild-loader/-/esbuild-loader-2.16.0.tgz#a44a57a77ed2810d6b278579271f77d739aa7bc9"
integrity sha512-LCJEwkf+nMJbNmVYNgg/0PaIZDdr5OcHw1qbWAZLkrmBRX+KwHY/yAS6ia98UBtwzk/WhsftUBNB6tfPHgFIxw==
dependencies:
esbuild "^0.13.4"
joycon "^3.0.1"
json5 "^2.2.0"
loader-utils "^2.0.0"
tapable "^2.2.0"
type-fest "^1.4.0"
webpack-sources "^2.2.0"
esbuild-netbsd-64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.15.tgz#a2fedc549c2b629d580a732d840712b08d440038"
integrity sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==
esbuild-openbsd-64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.15.tgz#b22c0e5806d3a1fbf0325872037f885306b05cd7"
integrity sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==
esbuild-sunos-64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.15.tgz#d0b6454a88375ee8d3964daeff55c85c91c7cef4"
integrity sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==
esbuild-windows-32@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.15.tgz#c96d0b9bbb52f3303322582ef8e4847c5ad375a7"
integrity sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==
esbuild-windows-64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.15.tgz#1f79cb9b1e1bb02fb25cd414cb90d4ea2892c294"
integrity sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==
esbuild-windows-arm64@0.13.15:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.15.tgz#482173070810df22a752c686509c370c3be3b3c3"
integrity sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==
esbuild@^0.13.4:
version "0.13.15"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.13.15.tgz#db56a88166ee373f87dbb2d8798ff449e0450cdf"
integrity sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==
optionalDependencies:
esbuild-android-arm64 "0.13.15"
esbuild-darwin-64 "0.13.15"
esbuild-darwin-arm64 "0.13.15"
esbuild-freebsd-64 "0.13.15"
esbuild-freebsd-arm64 "0.13.15"
esbuild-linux-32 "0.13.15"
esbuild-linux-64 "0.13.15"
esbuild-linux-arm "0.13.15"
esbuild-linux-arm64 "0.13.15"
esbuild-linux-mips64le "0.13.15"
esbuild-linux-ppc64le "0.13.15"
esbuild-netbsd-64 "0.13.15"
esbuild-openbsd-64 "0.13.15"
esbuild-sunos-64 "0.13.15"
esbuild-windows-32 "0.13.15"
esbuild-windows-64 "0.13.15"
esbuild-windows-arm64 "0.13.15"
escalade@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
@ -5120,6 +5241,11 @@ joi@^17.4.0, joi@^17.4.2:
"@sideway/formula" "^3.0.0"
"@sideway/pinpoint" "^2.0.0"
joycon@^3.0.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03"
integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==
jpeg-js@0.4.2:
version "0.4.2"
resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.2.tgz#8b345b1ae4abde64c2da2fe67ea216a114ac279d"
@ -5187,7 +5313,7 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"
json5@^2.1.2:
json5@^2.1.2, json5@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
@ -6775,6 +6901,11 @@ react-helmet@^6.1.0:
react-fast-compare "^3.1.1"
react-side-effect "^2.1.0"
react-icons@^4.3.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.3.1.tgz#2fa92aebbbc71f43d2db2ed1aed07361124e91ca"
integrity sha512-cB10MXLTs3gVuXimblAdI71jrJx8njrJZmNMEMC+sQu5B/BIOmlsAjskdqpn81y8UBVEGuHODd7/ci5DvoSzTQ==
react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
@ -7511,7 +7642,7 @@ sort-css-media-queries@2.0.4:
resolved "https://registry.yarnpkg.com/sort-css-media-queries/-/sort-css-media-queries-2.0.4.tgz#b2badfa519cb4a938acbc6d3aaa913d4949dc908"
integrity sha512-PAIsEK/XupCQwitjv7XxoMvYhT7EAfyzI3hsy/MyDgTvc+Ft55ctdkctJLOy6cQejaIC+zjpUL4djFVm2ivOOw==
source-list-map@^2.0.0:
source-list-map@^2.0.0, source-list-map@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==
@ -7780,6 +7911,11 @@ svgo@^2.7.0:
picocolors "^1.0.0"
stable "^0.1.8"
swr@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/swr/-/swr-1.1.0.tgz#7710cdbc5ff664c13e41fba6a1fa4734f82aba35"
integrity sha512-MFL3mkl752Uap81nLA1tEu7vQmikPamSziW+6dBidYKAo4oLOlUx/x5GZy4ZCkCwfZe2uedylkz1UMGnatUX4g==
tapable@^1.0.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
@ -7935,6 +8071,11 @@ type-fest@^0.20.2:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
type-fest@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1"
integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==
type-is@~1.6.17, type-is@~1.6.18:
version "1.6.18"
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
@ -8154,6 +8295,11 @@ url-parse-lax@^3.0.0:
dependencies:
prepend-http "^2.0.0"
url-search-params-polyfill@^8.1.1:
version "8.1.1"
resolved "https://registry.yarnpkg.com/url-search-params-polyfill/-/url-search-params-polyfill-8.1.1.tgz#9e69e4dba300a71ae7ad3cead62c7717fd99329f"
integrity sha512-KmkCs6SjE6t4ihrfW9JelAPQIIIFbJweaaSLTh/4AO+c58JlDcb+GbdPt8yr5lRcFg4rPswRFRRhBGpWwh0K/Q==
url@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
@ -8360,6 +8506,14 @@ webpack-sources@^1.1.0, webpack-sources@^1.4.3:
source-list-map "^2.0.0"
source-map "~0.6.1"
webpack-sources@^2.2.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.1.tgz#570de0af163949fe272233c2cefe1b56f74511fd"
integrity sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==
dependencies:
source-list-map "^2.0.1"
source-map "^0.6.1"
webpack-sources@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.2.tgz#d88e3741833efec57c4c789b6010db9977545260"