mirror of
https://github.com/meshtastic/meshtastic.git
synced 2025-01-11 05:47:34 -08:00
Linux docs overhaul
This commit is contained in:
parent
83213a62ef
commit
7468056800
|
@ -53,7 +53,7 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
|
||||||
<!-- markdownlint-disable no-inline-html -->
|
<!-- markdownlint-disable no-inline-html -->
|
||||||
|
|
||||||
<Tabs groupId="operating-systems" queryString="os">
|
<Tabs groupId="operating-systems" queryString="os">
|
||||||
<TabItem value="debian" label={<><Icon icon="mdi:debian" height="1.5rem" /> Debian</>} default>
|
<TabItem value="debian" label={<><Icon icon="mdi:debian" style={{ marginRight: "0.25rem" }} height="1.5rem" /> Debian</>} default>
|
||||||
Debian packages are provided via [OpenSUSE Build Service](https://build.opensuse.org/project/show/network:meshtastic).
|
Debian packages are provided via [OpenSUSE Build Service](https://build.opensuse.org/project/show/network:meshtastic).
|
||||||
|
|
||||||
Supported: `bookworm`
|
Supported: `bookworm`
|
||||||
|
@ -79,7 +79,7 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="raspbian" label={<><Icon icon="cib:raspberry-pi" height="1.5rem" /> Raspbian</>}>
|
<TabItem value="raspbian" label={<><Icon icon="cib:raspberry-pi" style={{ marginRight: "0.25rem" }} height="1.5rem" /> Raspbian</>}>
|
||||||
Raspbian (Raspberry Pi OS) packages are provided via [OpenSUSE Build Service](https://build.opensuse.org/project/show/network:meshtastic).
|
Raspbian (Raspberry Pi OS) packages are provided via [OpenSUSE Build Service](https://build.opensuse.org/project/show/network:meshtastic).
|
||||||
|
|
||||||
Supported: `bookworm`
|
Supported: `bookworm`
|
||||||
|
@ -89,7 +89,7 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="ubuntu" label={<><Icon icon="mdi:ubuntu" height="1.5rem" /> Ubuntu</>}>
|
<TabItem value="ubuntu" label={<><Icon icon="mdi:ubuntu" style={{ marginRight: "0.25rem" }} height="1.5rem" /> Ubuntu</>}>
|
||||||
Ubuntu packages are provided via [Canonical Launchpad](https://launchpad.net/~meshtastic).
|
Ubuntu packages are provided via [Canonical Launchpad](https://launchpad.net/~meshtastic).
|
||||||
|
|
||||||
Supported: `oracular` (24.10), `noble` (24.04 LTS), `jammy` (22.04 LTS)
|
Supported: `oracular` (24.10), `noble` (24.04 LTS), `jammy` (22.04 LTS)
|
||||||
|
@ -116,7 +116,7 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="fedora" label={<><Icon icon="mdi:fedora" height="1.5rem" /> Fedora</>}>
|
<TabItem value="fedora" label={<><Icon icon="mdi:fedora" style={{ marginRight: "0.25rem" }} height="1.5rem" /> Fedora</>}>
|
||||||
Fedora packages are provided via Fedora COPR.
|
Fedora packages are provided via Fedora COPR.
|
||||||
|
|
||||||
Supported[^1]: `41`, `40`
|
Supported[^1]: `41`, `40`
|
||||||
|
@ -142,7 +142,7 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem value="docker" label={<><Icon icon="mdi:docker" height="1.5rem" /> Docker</>}>
|
<TabItem value="docker" label={<><Icon icon="mdi:docker" style={{ marginRight: "0.25rem" }} height="1.5rem" /> Docker</>}>
|
||||||
Docker containers are provided via [DockerHub](https://hub.docker.com/r/meshtastic/meshtasticd).
|
Docker containers are provided via [DockerHub](https://hub.docker.com/r/meshtastic/meshtasticd).
|
||||||
|
|
||||||
**Pull:**
|
**Pull:**
|
||||||
|
@ -158,77 +158,96 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
|
||||||
|
|
||||||
### Hardware Interfaces
|
### Hardware Interfaces
|
||||||
|
|
||||||
For devices requiring SPI or I2C:
|
<!-- markdownlint-disable no-inline-html -->
|
||||||
|
<Tabs>
|
||||||
|
<TabItem value="usb" label={<><Icon icon="mdi:usb" style={{ marginRight: "0.25rem" }} height="1.5rem" /> USB</>}>
|
||||||
|
USB support via the CH341 was added in Meshtastic 2.5.18.
|
||||||
|
|
||||||
- This can be done by running the below commands on a Raspberry Pi (2-5)
|
Note that in order for Linux to recognize multiple CH341-USB devices, an EEPROM must be included onboard. Devices like the `Pinedio` do not include this.
|
||||||
|
|
||||||
```shell
|
</TabItem>
|
||||||
sudo raspi-config nonint set_config_var dtparam=spi on /boot/firmware/config.txt # Enable SPI
|
<TabItem value="rpi_spi" label={<><Icon icon="cib:raspberry-pi" style={{ marginRight: "0.25rem" }} height="1.5rem" /> Raspberry Pi Hat (SPI)</>}>
|
||||||
sudo raspi-config nonint set_config_var dtparam=i2c_arm on /boot/firmware/config.txt # Enable i2c_arm
|
**Enable SPI support for LoRa Radio**
|
||||||
|
|
||||||
# Ensure dtoverlay=spi0-0cs is set in /boot/firmware/config.txt without altering dtoverlay=vc4-kms-v3d or dtparam=uart0
|
- This can be done by running the below commands on a Raspberry Pi (2-5)
|
||||||
sudo sed -i -e '/^\s*#\?\s*dtoverlay\s*=\s*vc4-kms-v3d/! s/^\s*#\?\s*(dtoverlay|dtparam\s*=\s*uart0)\s*=.*/dtoverlay=spi0-0cs/' /boot/firmware/config.txt
|
|
||||||
|
|
||||||
# Insert dtoverlay=spi0-0cs after dtparam=spi=on if not already present
|
```shell
|
||||||
if ! sudo grep -q '^\s*dtoverlay=spi0-0cs' /boot/firmware/config.txt; then
|
sudo raspi-config nonint set_config_var dtparam=spi on /boot/firmware/config.txt # Enable SPI
|
||||||
sudo sed -i '/^\s*dtparam=spi=on/a dtoverlay=spi0-0cs' /boot/firmware/config.txt
|
|
||||||
fi
|
|
||||||
```
|
|
||||||
|
|
||||||
- Or this can be accomplished by manually enabling SPI support in `/boot/firmware/config.txt`:
|
# Ensure dtoverlay=spi0-0cs is set in /boot/firmware/config.txt without altering dtoverlay=vc4-kms-v3d or dtparam=uart0
|
||||||
|
sudo sed -i -e '/^\s*#\?\s*dtoverlay\s*=\s*vc4-kms-v3d/! s/^\s*#\?\s*(dtoverlay|dtparam\s*=\s*uart0)\s*=.*/dtoverlay=spi0-0cs/' /boot/firmware/config.txt
|
||||||
|
|
||||||
```plaintext
|
# Insert dtoverlay=spi0-0cs after dtparam=spi=on if not already present
|
||||||
dtparam=spi=on
|
if ! sudo grep -q '^\s*dtoverlay=spi0-0cs' /boot/firmware/config.txt; then
|
||||||
dtoverlay=spi0-0cs
|
sudo sed -i '/^\s*dtparam=spi=on/a dtoverlay=spi0-0cs' /boot/firmware/config.txt
|
||||||
```
|
fi
|
||||||
|
```
|
||||||
|
|
||||||
- I2C support is enabled with:
|
- Or this can be accomplished by manually enabling SPI support in `/boot/firmware/config.txt`:
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||
dtparam=i2c_arm=on
|
dtparam=spi=on
|
||||||
```
|
dtoverlay=spi0-0cs
|
||||||
|
```
|
||||||
|
|
||||||
### GPS Support
|
**Enable I2C support**
|
||||||
|
|
||||||
- You can enable UART by running the below commands (which additionally will disable serial console tty)
|
Enabled with:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo raspi-config nonint do_serial_hw 0 # Enable Serial Port (enable_uart=1)
|
sudo raspi-config nonint set_config_var dtparam=i2c_arm on /boot/firmware/config.txt # Enable i2c_arm
|
||||||
sudo raspi-config nonint do_serial_cons 1 # Disable Serial Console
|
```
|
||||||
```
|
|
||||||
|
|
||||||
- Or you can manually enable UART for GPS hats by making modifications in `/boot/firmware/config.txt`:
|
Or manually enabled in `/boot/firmware/config.txt`:
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||
# Needed for all Pi device.
|
dtparam=i2c_arm=on
|
||||||
enable_uart=1
|
```
|
||||||
|
|
||||||
# Needed for the Pi 5 only.
|
**Enable UART support for GPS**
|
||||||
dtoverlay=uart0
|
|
||||||
```
|
|
||||||
|
|
||||||
- The correct port for UART GPS on the Pi 5 after a reboot is `/dev/ttyAMA0`.
|
- You can enable UART by running the below commands (which additionally will disable serial console tty)
|
||||||
- The correct port for UART GPS on earlier Pi versions after a reboot is `/dev/ttyS0`.
|
|
||||||
- You may need to disable the serial console on a Pi and then reboot
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo raspi-config nonint do_serial_cons 1 # Disable Serial Console
|
sudo raspi-config nonint do_serial_hw 0 # Enable Serial Port (enable_uart=1)
|
||||||
```
|
sudo raspi-config nonint do_serial_cons 1 # Disable Serial Console
|
||||||
|
```
|
||||||
|
|
||||||
|
- Or you can manually enable UART for GPS hats by making modifications in `/boot/firmware/config.txt`:
|
||||||
|
|
||||||
|
```plaintext
|
||||||
|
# Needed for all Pi device.
|
||||||
|
enable_uart=1
|
||||||
|
|
||||||
|
# Needed for the Pi 5 only.
|
||||||
|
dtoverlay=uart0
|
||||||
|
```
|
||||||
|
|
||||||
|
- The correct port for UART GPS on the Pi 5 after a reboot is `/dev/ttyAMA0`.
|
||||||
|
- The correct port for UART GPS on earlier Pi versions after a reboot is `/dev/ttyS0`.
|
||||||
|
- You may need to disable the serial console on a Pi and then reboot
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo raspi-config nonint do_serial_cons 1 # Disable Serial Console
|
||||||
|
```
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
<!-- markdownlint-enable no-inline-html -->
|
||||||
|
|
||||||
### Meshtasticd Configuration
|
### Meshtasticd Configuration
|
||||||
|
|
||||||
- The meshtasticd configuration is at `/etc/meshtasticd/config.yaml` by default. If a `config.yaml` is found in the current directory, that takes precedence. And a config file specified with the `-c/--config` option has the highest precedence.
|
- The meshtasticd configuration is at `/etc/meshtasticd/config.yaml` by default. If a `config.yaml` is found in the current directory, that takes precedence. And a config file specified with the `-c/--config` option has the highest precedence.
|
||||||
|
|
||||||
To enable a LoRa radio connected to your device, uncomment the appropriate lines in the config file, including the Module line. As an example, the Waveshare SX126X module would have a Lora section that looks like this:
|
To enable a LoRa radio connected to your device, first locate it's configuration in the presets, then copy to `config.d`.
|
||||||
|
|
||||||
```yaml
|
```shell
|
||||||
Lora:
|
# First, locate your radio hardware
|
||||||
Module: sx1262 # Waveshare SX126X XXXM
|
ls -lah /etc/meshtasticd/available.d
|
||||||
DIO2_AS_RF_SWITCH: true
|
# Ex: display-waveshare-2.8.yaml lora-MeshAdv-900M30S.yaml lora-meshstick-1262.yaml
|
||||||
CS: 21
|
|
||||||
IRQ: 16
|
# Then, copy desired config to `config.d`
|
||||||
Busy: 20
|
# Example:
|
||||||
Reset: 18
|
cp /etc/meshtasticd/available.d/lora-MeshAdv-900M30S.yaml /etc/meshtasticd/config.d/
|
||||||
```
|
```
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
|
|
Loading…
Reference in a new issue