Merge pull request #37 from jfirwin/flashing-firmware-tabs

redid flashing firmware section with tabs
This commit is contained in:
Sacha Weatherstone 2021-05-07 08:51:10 +10:00 committed by GitHub
commit 0666edfd49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 322 additions and 348 deletions

View file

@ -0,0 +1,320 @@
---
id: flashing-firmware
title: Flashing Firmware
sidebar_label: Flashing Firmware
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Prerequisites
### Check Data Cable
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
To check if you have a data cable that will work, plug your device into the computer and **then** navigate to `Terminal` and enter the following command:
```bash
lsusb
```
you should see something like `CP210X USB to UART Bridge Controller`.
:::note
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)
:::
</TabItem>
<TabItem value="macos">
To check if you have a data cable that will work, plug your device into the computer and **then** navigate to `Apple Menu  > About This Mac > System Report... > Hardware > USB` you should see something like `CP210X USB to UART Bridge Controller`.
:::note
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)
:::
</TabItem>
<TabItem value="windows">
To check if you have a data cable that will work, plug your device into the computer and navigate to `Device Manager > Ports` and ensure the device is shown. You should see something like `CP210X USB to UART Bridge Controller`.
If your device is showing up under `Device Manager > Ports > Other Devices` you need to install the driver from Silicon Labs for the CP210X USB to UART bridge
:::note
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)
:::
</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/) |
| :--------------: | :-----------------------: |
## Command Line Interface Instructions
### Install Prerequisite Software
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
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.6
```
If `pip` is not installed, install with
```bash
sudo apt-get install python3-pip
```
</TabItem>
<TabItem value="macos">
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.
:::
</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.
:::note
Confirm installation of `python` & `pip` with the following commands.
```bash
py --version
```
```bash
pip --version
```
:::
</TabItem>
</Tabs>
### Install `esptool`
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
```bash
pip install --upgrade esptool
```
</TabItem>
<TabItem value="macos">
```bash
pip3 install --upgrade esptool
```
</TabItem>
<TabItem value="windows">
```bash
pip install --upgrade esptool
```
</TabItem>
</Tabs>
### Confirm Communication With Chip
Connect the radio to your computer using a data USB cable. Confirm your device is talking to your computer using the following command:
```bash title="Command"
esptool.py chip_id
```
```bash title="Expected Output"
# You should see a result similar to this:
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...
```
### Navigate to Firmware
`cd` into the directory where you unzipped the latest release. For example:
```bash title="Example"
cd /Downloads/firmware/
```
### Install/Update Firmware
:::caution
Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly.
:::
#### Install Firmware
Install the correct firmware for your board using the following command. Be sure to select the correct board and frequency.
```bash title="Command"
./device-install.sh -f firmware-BOARD-VERSION.bin
```
```bash title="Example"
./device-install.sh -f firmware-heltec-EU865-1.2.0.bin
```
#### Update Firmware
To update a the firmware on an existing Meshtastic device use the following command. Be sure to select the correct board and frequency.
```bash title="Command"
./device-update.sh -f firmware-BOARD-VERSION.bin
```
```bash title="Example"
./device-update.sh -f firmware-heltec-EU865-1.2.0.bin
```
## 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) |
| :-----------------------------------------------------------: |
:::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">
| [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases/latest) |
| :-----------------------------------------------------------: |
</TabItem>
<TabItem value="windows">
| [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases/latest) |
| :-----------------------------------------------------------: |
</TabItem>
</Tabs>
### Open ESPHome Flasher
<Tabs
groupId="operating-system"
defaultValue="linux"
values={[
{label: 'Linux', value: 'linux'},
{label: 'macOS', value: 'macos'},
{label: 'Windows', value: 'windows'},
]}>
<TabItem value="linux">
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.
</TabItem>
<TabItem value="macos">
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">
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.
</TabItem>
</Tabs>
:::note
If your device is not showing under `Serial Port` you may need to install the drivers for the [CP210X USB to UART bridge](https://www.silabes.com/products/development-tools/sofware/usb-to-uart-bridge-vcp-drivers).
:::
### Select Firmware
Browse to the previously downloaded firmware and select the correct firmware based on the board type and frequency.
:::caution
Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly.
:::
### Flash Firmware
Select `Flash ESP`. It may take a minute or two. Once complete, "Done! Flashing is complete!" will be shown.
## Over the Air Update Instructions
OTA updates are only currently available on Android.
<!--- TODO --->

View file

@ -1,100 +0,0 @@
---
id: linux
title: Flashing Firmware Linux
sidebar_label: Linux
---
:::note
To check if you have a data cable that will work, plug in your device and **then** navigate to `Terminal` and enter the following command:
```bash
lsusb
```
you should see something like `CP210X USB to UART Bridge Controller`.
:::
## Download Firmware
<!--- TODO add buttons to links --->
Download the [latest](https://github.com/meshtastic/meshtastic-device/releases/latest) firmware release. Unzip the file and locate the correct device and region within the list of prebuilt binaries.
## Command Line Instructions
:::note
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.6
```
If `pip` is not installed, install with
```bash
sudo apt-get install python3-pip
```
:::
1. Install `esptool`
```bash
pip install --upgrade esptool
```
2. Connect your radio to your USB port
3. Confirm that your device is talking to your Mac by running the following command in Terminal
```bash title="Command"
esptool.py chip_id
```
```bash title="Expected Output"
# You should see a result similar to this:
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...
```
4. `cd` into the directory where you unzipped the latest release. For example:
```bash title="Example"
cd /Downloads/firmware/
```
5. Install the correct firmware for your board with
:::caution
Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly.
:::
```bash title="Command"
./device-install.sh -f firmware-BOARD-VERSION.bin
```
```bash title="Example"
./device-install.sh -f firmware-heltec-EU865-1.2.0.bin
```
6. To update a the firmware on an existing Meshtastic device, run
```bash title="Command"
./device-update.sh -f firmware-BOARD-VERSION.bin
```
```bash title="Example"
./device-update.sh -f firmware-heltec-EU865-1.2.0.bin
```
## Graphical User Interface Instructions
:::note
ESPHome Flasher for linux is a prebuilt binary for Ubuntu. These instructions were only testing on Ubuntu. Mileage may very on other distros. ESPHome Flasher also provides instructions to build from source or install via `pip` on their README.
:::
1. Download [ESPHome Flasher](https://github.com/esphome/esphome-flasher)
2. Connect your radio to your USB port.
3. Open ESPHome Flasher. There should be no installation required.
4. If your board is not showing under `Serial Port` then you may need to install the drivers for the [CP210X USB to UART bridge](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers).
5. In ESPHome Flasher, refresh the serial ports and select the port to which your board is connected.
6. Browse to the previously downloaded firmware and select the correct firmware based on the board type.
7. Select Flash ESP.
8. Once complete, “Done! Flashing is complete!” will be shown.

View file

@ -1,109 +0,0 @@
---
id: macos
title: Flashing Firmware MacOS
sidebar_label: MacOS
---
:::note
To check if you have a data cable that will work, plug in your device and **then** navigate to `Apple Menu  > About This Mac > System Report... > Hardware > USB` you should see something like `CP210X USB to UART Bridge Controller`.
:::
## Download Firmware
<!--- TODO add buttons to links --->
Download the [latest](https://github.com/meshtastic/meshtastic-device/releases/latest) firmware release. Unzip the file and locate the correct device and region within the list of prebuilt binaries.
## Command Line Instructions
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.
:::
1. Install Python3
```bash
brew install python3
```
2. Confirm `pip3` was installed alongside `python3`
```bash
pip3 -v
```
3. Install `esptool`
```bash
pip3 install --upgrade esptool
```
:::note
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)
:::
4. Connect your radio to your USB port.
5. Confirm that your device is talking to your Mac by running the following command in Terminal.
```bash title="Command"
esptool.py chip_id
```
```bash title="Expected Output"
# You should see a result similar to this:
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...
```
6. `cd` into the directory where you unzipped the latest release. For example:
```bash title="Example"
cd /Downloads/firmware/
```
7. Install the correct firmware for your board with
:::caution
Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly.
:::
```bash title="Command"
./device-install.sh -f firmware-BOARD-VERSION.bin
```
```bash title="Example"
./device-install.sh -f firmware-heltec-EU865-1.2.0.bin
```
8. To update a the firmware on an existing Meshtastic device, run
```bash title="Command"
./device-update.sh -f firmware-BOARD-VERSION.bin
```
```bash title="Example"
./device-update.sh -f firmware-heltec-EU865-1.2.0.bin
```
## Graphical User Interface Instructions
:::note
ESPHome Flasher also provides instructions to build from source or install via `pip` on their README.
:::
1. Download [ESPHome Flasher](https://github.com/esphome/esphome-flasher)
2. Connect your radio to your USB port.
3. Open ESPHome Flasher. There should be no installation required.
:::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.
:::
4. If your board is not showing under `Serial Port` then you may need to install the drivers for the [CP210X USB to UART bridge](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers).
5. In ESPHome Flasher, refresh the serial ports and select the port to which your board is connected.
6. Browse to the previously downloaded firmware and select the correct firmware based on the board type.
7. Select Flash ESP.
8. Once complete, “Done! Flashing is complete!” will be shown.

View file

@ -1,8 +0,0 @@
---
id: ota
title: Flashing Firmware OTA
sidebar_label: Over The Air
---
:::caution
Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly.
:::

View file

@ -1,30 +0,0 @@
---
id: overview
title: Overview
sidebar_label: Overview
---
## 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 happen over bluetooth from your phone.
:::caution
Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly.
:::
<!--- 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 flashing methods
- Command line interface
- [Linux](linux#command-line-instructions)
- [MacOS](macos#command-line-instructions)
- [Windows](windows#command-line-instructions)
- Graphical user interface
- [Linux](linux#graphical-user-interface-instructions)
- [MacOS](macos#graphical-user-interface-instructions)
- [Windows](windows#graphical-user-interface-instructions)
- [Over the air](ota)
:::note
Over the air (OTA) firmware installation is currently only available on the Android App.
:::

View file

@ -1,90 +0,0 @@
---
id: windows
title: Flashing Firmware Windows
sidebar_label: Windows
---
:::note
To check if you have a data cable that will work, plug in your device and navigate to `Device Manager > Ports` and ensure the device is shown. You should see something like `CP210X USB to UART Bridge Controller`.
If your device is showing up under `Device Manager > Ports > Other Devices` you need to install the 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)
:::
## Download Firmware
<!--- TODO add buttons to links --->
Download the [latest](https://github.com/meshtastic/meshtastic-device/releases/latest) firmware release. Unzip the file and locate the correct device and region within the list of prebuilt binaries.
## Command Line Instructions
1. Download and install [Python](https://www.python.org/). Make sure to click `Add Python X.Y to PATH`.
2. Download and install [Gitbash](https://gitforwindows.org/) (or other appropriate shell) and run all subsequent commands from that shell.
3. Confirm installation of `python` & `pip` with the following commands.
```bash
py --version
```
```bash
pip --version
```
<!--- Check on `gitbash` requirements --->
4. Install `esptool`
```bash
pip install --upgrade esptool
```
5. Connect your radio to your USB port.
6. Confirm that your device is talking to your Mac by running the following command in Terminal.
```bash title="Command"
esptool.py chip_id
```
```bash title="Expected Output"
# You should see a result similar to this:
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...
```
7. `cd` into the directory where you unzipped the latest release. For example:
```bash title="Example"
cd /Downloads/firmware/
```
8. Install the correct firmware for your board with
:::caution
Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly.
:::
```bash title="Command"
./device-install.sh -f firmware-BOARD-VERSION.bin
```
```bash title="Example"
./device-install.sh -f firmware-heltec-EU865-1.2.0.bin
```
9. To update a the firmware on an existing Meshtastic device, run
```bash title="Command"
./device-update.sh -f firmware-BOARD-VERSION.bin
```
```bash title="Example"
./device-update.sh -f firmware-heltec-EU865-1.2.0.bin
```
## Graphical User Interface Instructions
:::note
ESPHome Flasher also provides instructions to build from source or install via `pip` on their README.
:::
1. Download [ESPHome Flasher](https://github.com/esphome/esphome-flasher)
2. Connect your radio to your USB port.
3. Open ESPHome Flasher. There should be no installation required.
4. If your board is not showing under `Serial Port` then you may need to install the drivers for the [CP210X USB to UART bridge](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers).
5. In ESPHome Flasher, refresh the serial ports and select the port to which your board is connected.
6. Browse to the previously downloaded firmware and select the correct firmware based on the board type.
7. Select Flash ESP.
8. Once complete, “Done! Flashing is complete!” will be shown.

View file

@ -14,7 +14,7 @@ Open the App and you should see a screen like this. You can move through the tab
## Connecting
You will need a device with Meshtastic installed to go any further. See the [flashing firmware](/docs/getting-started/flashing-firmware/overview) section for information on how to do this.
You will need a device with Meshtastic installed to go any further. See the [flashing firmware](/docs/getting-started/flashing-firmware) section for information on how to do this.
Open the Settings tab (last tab), and it should look similar to the screen below. It shows any Meshtastic devices that are found over Bluetooth.
@ -169,6 +169,3 @@ This allows you to save your messages to a .csv (comma sparated value) file on y
This allows you to change between light and dark themes, or to select the system default.
[![Meshtastic theme](/img/android/android-settings-theme-c.png)](/img/android/android-settings-theme.png)

View file

@ -3,14 +3,8 @@ module.exports = {
"Getting Started": [
"getting-started/about",
"getting-started/overview",
"getting-started/flashing-firmware",
{
"Flashing Firmware": [
"getting-started/flashing-firmware/overview",
"getting-started/flashing-firmware/linux",
"getting-started/flashing-firmware/macos",
"getting-started/flashing-firmware/ota",
"getting-started/flashing-firmware/windows",
],
"Howto's": [],
},
"getting-started/concepts",