Linux docs overhaul

This commit is contained in:
vidplace7 2025-01-09 22:46:28 -05:00
parent 83213a62ef
commit 7468056800

View file

@ -53,7 +53,7 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
<!-- markdownlint-disable no-inline-html -->
<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).
Supported: `bookworm`
@ -79,7 +79,7 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
</details>
</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).
Supported: `bookworm`
@ -89,7 +89,7 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
```
</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).
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>
</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.
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 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).
**Pull:**
@ -158,77 +158,96 @@ UART HATs and SX1302/SX1303 chip-based HATs are not supported. Only hats that us
### 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
sudo raspi-config nonint set_config_var dtparam=spi on /boot/firmware/config.txt # Enable SPI
sudo raspi-config nonint set_config_var dtparam=i2c_arm on /boot/firmware/config.txt # Enable i2c_arm
</TabItem>
<TabItem value="rpi_spi" label={<><Icon icon="cib:raspberry-pi" style={{ marginRight: "0.25rem" }} height="1.5rem" /> Raspberry Pi Hat (SPI)</>}>
**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
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
- This can be done by running the below commands on a Raspberry Pi (2-5)
# Insert dtoverlay=spi0-0cs after dtparam=spi=on if not already present
if ! sudo grep -q '^\s*dtoverlay=spi0-0cs' /boot/firmware/config.txt; then
```shell
sudo raspi-config nonint set_config_var dtparam=spi on /boot/firmware/config.txt # Enable SPI
# 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
# Insert dtoverlay=spi0-0cs after dtparam=spi=on if not already present
if ! sudo grep -q '^\s*dtoverlay=spi0-0cs' /boot/firmware/config.txt; then
sudo sed -i '/^\s*dtparam=spi=on/a dtoverlay=spi0-0cs' /boot/firmware/config.txt
fi
```
fi
```
- Or this can be accomplished by manually enabling SPI support in `/boot/firmware/config.txt`:
- Or this can be accomplished by manually enabling SPI support in `/boot/firmware/config.txt`:
```plaintext
dtparam=spi=on
dtoverlay=spi0-0cs
```
```plaintext
dtparam=spi=on
dtoverlay=spi0-0cs
```
- I2C support is enabled with:
**Enable I2C support**
```plaintext
dtparam=i2c_arm=on
```
Enabled with:
### GPS Support
```shell
sudo raspi-config nonint set_config_var dtparam=i2c_arm on /boot/firmware/config.txt # Enable i2c_arm
```
- You can enable UART by running the below commands (which additionally will disable serial console tty)
Or manually enabled in `/boot/firmware/config.txt`:
```shell
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
```
```plaintext
dtparam=i2c_arm=on
```
- Or you can manually enable UART for GPS hats by making modifications in `/boot/firmware/config.txt`:
**Enable UART support for GPS**
```plaintext
# Needed for all Pi device.
enable_uart=1
- You can enable UART by running the below commands (which additionally will disable serial console tty)
# Needed for the Pi 5 only.
dtoverlay=uart0
```
```shell
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
```
- 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
- Or you can manually enable UART for GPS hats by making modifications in `/boot/firmware/config.txt`:
```shell
sudo raspi-config nonint do_serial_cons 1 # Disable Serial Console
```
```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
- 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
Lora:
Module: sx1262 # Waveshare SX126X XXXM
DIO2_AS_RF_SWITCH: true
CS: 21
IRQ: 16
Busy: 20
Reset: 18
```shell
# First, locate your radio hardware
ls -lah /etc/meshtasticd/available.d
# Ex: display-waveshare-2.8.yaml lora-MeshAdv-900M30S.yaml lora-meshstick-1262.yaml
# Then, copy desired config to `config.d`
# Example:
cp /etc/meshtasticd/available.d/lora-MeshAdv-900M30S.yaml /etc/meshtasticd/config.d/
```
:::info