Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to mav in prep for 3.5 #414

Merged
merged 3 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ TitanDynamics
Tlm
UART
UARTs
UDP
UFL
UI
UID
Expand Down
8 changes: 3 additions & 5 deletions docs/software/backpack-telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ Ensure both your transmitter and receiver are running the latest firmware. Follo
- Select the "Telemetry" option.

3. **Enable Backpack Telemetry:**
- Set the "Telemetry" option to `On`.
- Set the "Telemetry" option to `ESPNOW`.
- Exit the script.

4. **Disabling Backpack Telemetry:**

Backpack telemetry is transmitted on the 2.4G WiFi band, via ESPNOW (this should have a very limited impact on any LoRa signals, as it is modulated via OFDM like a normal WiFi hotspot). Every telemetry message that your transmitter receives from the craft will be re-transmitted via ESPNOW. You may want to disable Backpack Telemetry to reduce your footprint on the RF noise floor when you aren't using it, especially if you are at something like a race day, where there is often contention on the RF spectrum. To disable Backpack Telemetry:
**NOTE:** Backpack telemetry is transmitted on the 2.4G WiFi band, via ESPNOW (this should have a very limited impact on any LoRa signals, as it is modulated via OFDM like a normal WiFi hotspot). Every telemetry message that your transmitter receives from the craft will be re-transmitted via ESPNOW. You may want to disable Backpack Telemetry to reduce your footprint on the RF noise floor when you aren't using it, especially if you are at something like a race day, where there is often contention on the RF spectrum. To disable Backpack Telemetry:

- Execute the ELRS LUA script.
- Scroll to find the "Backpack" section within the LUA script.
Expand Down Expand Up @@ -68,7 +66,7 @@ An Espressif ESP-based microcontroller, like the ESP32 or ESP8266 (and many vari
## Troubleshooting
If you encounter issues:

- **No Telemetry Data:** Ensure the "Telemetry" option is enabled in the Backpack section of the LUA script and that the firmware is up to date. Also check that your Telemetry Ratio is set to a value that is able to provide frequent telemetry packets. As a rule of thumb, a ratio somewhere between 1:2 to about 1:16 (depending on your packet rate) will suffice. See [Packet Rate and Telemetry Ratio](https://www.expresslrs.org/quick-start/transmitters/lua-howto/#packet-rate-and-telemetry-ratio) and [Telemetry](https://www.expresslrs.org/quick-start/pre-1stflight/#telemetry)
- **No Telemetry Data:** Ensure the "Telemetry" option is set to `ESPNOW` in the Backpack section of the LUA script and that the firmware is up to date. Also check that your Telemetry Ratio is set to a value that is able to provide frequent telemetry packets. As a rule of thumb, a ratio somewhere between 1:2 to about 1:16 (depending on your packet rate) will suffice. See [Packet Rate and Telemetry Ratio](https://www.expresslrs.org/quick-start/transmitters/lua-howto/#packet-rate-and-telemetry-ratio) and [Telemetry](https://www.expresslrs.org/quick-start/pre-1stflight/#telemetry)

- **Binding Issues:** Verify that the bind phrase is correctly set and matches between the Backpack on your transmitter and the Sentinel receiver.

Expand Down
47 changes: 37 additions & 10 deletions docs/software/mavlink.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ description: ExpressLRS Bi-directional MAVLink support

!!! note "NOTE"
Enabling MAVLink forces the use of Hybrid or 16ch/2 switch mode. Wide switch mode is not supported.
Enabling MAVLink forces a telemetry ratio of 1:2

## Description

Expand All @@ -19,33 +20,43 @@ ExpressLRS now has full bi-directional [MAVLink](https://mavlink.io/en/) support

Unlike airport, you do **NOT** need a second RX/TX pair for RC control, since ELRS' implementation allows you to do BOTH telemetry and RC control over **one** link.

To start using MAVLink, you just need one ESP ELRS transmitter, and one ESP ELRS receiver. The majority of recent ELRS hardware is ESP based, and will be compatible with MAVLink. An easy way to check is, if the RX/TX have WiFi, then it is ESP based.
To start using MAVLink, you just need one ESP ELRS transmitter, and one ESP ELRS receiver. The majority of recent ELRS hardware is ESP based, and will be compatible with MAVLink. An easy way to check is, if the RX/TX have WiFi, then it is ESP based.

!!! note "NOTE"
If you are planning to use 915/868MHz, note that the data rate will be significantly slower than on 2.4GHz. This will result in especially slow parameter downloading, and with 200Hz packet rate at 915MHz, it takes about 2.5 minutes to pull parameters.
If you are using an internal TX module (e.g. a TX16S with internal ELRS), you will be required to use the TX Backpack to connect to you GCS via WiFi (USB cable between the TX and the PC is not an option for internal modules). See WiFi Connectivity below.

## Flashing and Configuring the MAVLink branch
!!! note "NOTE"
If you are planning to use 915/868MHz, note that the data rate will be significantly slower than on 2.4GHz. This will result in especially slow parameter downloading, and with 200Hz packet rate at 915MHz, it takes 2+ minutes to pull parameters.

## Flashing and Configuring MAVLink-RC

Ensure both your transmitter module, the embedded TX-Backpack (if using WiFi forwarding), and your receiver are up to date with the latest release versions:

1. At the top of the ExpressLRS configurator, select "GIT BRANCH"
- For the main ELRS firmware, follow the [Firmware Update Guide](https://www.expresslrs.org/quick-start/getting-started/) for detailed instructions.
- For the TX-Backpack, follow the [Transmitter Backpack Firmware Guide](https://www.expresslrs.org/hardware/backpack/backpack-tx-setup/) for detailed instructions.

1. Select the `master` branch, and flash it to both the RX and TX
The minimum versions to use this feature are:
- Transmitter / receiver firmware: `3.5.0`
- TX Backpack firmware: `1.5.0`

1. Using the guides above, flash both the RX and TX

1. Turn on both the RX and TX, and ensure they connect properly

1. In ELRS LUA script, select `Other Devices`, select your receiver, and set the `serial protocol` to MAVLink
1. In ELRS LUA script, select `Other Devices`, select your receiver, and set the `serial protocol` to `MAVLink`. This configures the RX to output MAVLink protocol on the UART.

1. Back out to the LUA scripts main menu, and select the new `Link Mode` option. Change it from `Normal` to `MAVLink`
1. Back out to the LUA scripts main menu, and select the new `Link Mode` option. Change it from `Normal` to `MAVLink`. This configures the TX module to send / receive MAVLink.

1. Configure your usual power, packet rate, etc. Use 1:2 for telemetry ratio (it will be auto-set)
1. Configure your usual power, packet rate, etc. The telemetry ratio will be preset to 1:2 (and cannot be changed while in MAVLink mode).

1. Wire the RX to a free UART that is suitable for TLM + RC
1. Wire the RX to a free UART on your flight controller that is suitable for TLM + RC. A DMA-capable UART is recommended.


=== "ArduPilot"
For the below steps, when a UART connection is mentioned, it will be written as `SERIALx`. Replace `x` with the UART number you are using.

1. Configure `SERIALx_PROTOCOL=2`, `SERIALx_BAUD=460`, and `RSSI_TYPE=5`
1. Connect the TX module to the computer running the Ground Control Station via a USB cable
1. Connect the TX module to the computer running the Ground Control Station via a USB cable (or alternatively via WiFi - See WiFi Connectivity below)
1. Select the COM port on the GCS, and connect using `460800` baud

=== "PX4"
Expand All @@ -69,6 +80,22 @@ To start using MAVLink, you just need one ESP ELRS transmitter, and one ESP ELRS
Betaflight contains an incomplete implementation of the MAVLink protocol standard (lacking RADIO_STATUS flow control). This causes an Betaflight aircraft to saturate the bandwidth of a telemetry link using soft flow control, and renders it unusable, ergo breaking support with ExpressLRS MAVLink.


## WiFi Connectivity

For TX modules that have an onboard Backpack, the MAVLink data can be sent / received via WiFi to a PC or tablet etc. that is running the GCS software. This provides for a cable-free solution on your handset, as it removes the need for a USB cable between the TX and the GCS device.

To setup WiFi forwarding for MAVLink:

1. Ensure the TX Backpack is running version `1.5.0` or later

1. In the ELRS LUA script, select `Backpack`, scroll to the `Telemetry` option, and change the value to `WiFi`

1. If you are NOT using Home WiFi on the Backpack, a new WiFi access point will be available to connect to. Use your PC or tablet etc. to search for and connect to a WiFi network with SSID of `ExpressLRS TX Backpack xxx` (where `xxx` will be part of your UID). The WiFi password is `expresslrs`. Alternatively, if you ARE using Home WiFi on the Backpack, the Backpack will automatically start WiFi and connect to your router.

1. Power on the craft, so that the TX and RX have an active link.

1. On your PC or other GCS device, open your GCS software (e.g. Mission Planner) and set the connection type to `UDP`. Click connect, and use the default UDP port of `14550`. The GCS should successfully connect to the craft and start downloading params.

## Implementation Details

### RC Interleaving
Expand Down
9 changes: 5 additions & 4 deletions docs/software/mfd-crossbow.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Once you have chosen a receiver to use, you need to determine the MCU type that
If you are using an ELRS receiver, you can look this up (for supported hardware) in the [targets.json](https://github.com/ExpressLRS/targets/blob/master/targets.json) file. Click the [targets.json](https://github.com/ExpressLRS/targets/blob/master/targets.json) link, and then search for your receiver (e.g. `RadioMaster RP1`) and note the `platform` that it uses:

<figure markdown>
![RP1Platform](../assets/images/esp32-dev-board.png)
![RP1Platform](../assets/images/find-platform.png)
<figcaption>Platform for the RadioMaster RP1</figcaption>
</figure>

Expand Down Expand Up @@ -122,7 +122,7 @@ The receiver communicates via UART with the Crossbow, using the MAVLink protocol
We need to wire the `tx` pad on the receiver to one of the `rx` pins on the Crossbow:

<figure markdown>
![CrossbowWiringDiagram](../../assets/images/rx-to-crossbow-wiring-diagram.png)
![CrossbowWiringDiagram](../../assets/images/rx-to-crossbow-wiring-diagram.jpg)
<figcaption>Crossbow Wiring Diagram</figcaption>
</figure>

Expand All @@ -144,6 +144,7 @@ If you use the L-Port on the mini, you also get a +5V and GND source for the rec
Refer to the respective user manual for your model of Crossbow in order to change the UART to MAVLink protocol, at a baud rate of 115200.

For example, on the Crossbow mini, assuming you are using the L-Port:

- Long press the left button to enter the menu
- Short press the left button until you get to `L-Baudrate` and short press the right button to enter
- Short press the left button until `115200` is highlighted, and short press the right button to confirm
Expand All @@ -166,7 +167,7 @@ For example, on the Crossbow mini, assuming you are using the L-Port:
- Exit the script.
- Your TX module is now configured to broadcast telemetry to the Backpack receiver.

**NOTE** Backpack telemetry is transmitted on the 2.4G WiFi band, via ESPNOW (this should have a very limited impact on any LoRa signals, as it is modulated via OFDM like a normal WiFi hotspot). Every telemetry message that your transmitter receives from the craft will be re-transmitted via ESPNOW. You may want to disable Backpack Telemetry to reduce your footprint on the RF noise floor when you aren't using it, especially if you are at something like a race day, where there is often contention on the RF spectrum. Disabling Backpack Telemetry will cause the Crossbow integration to stop working.
**NOTE:** Backpack telemetry is transmitted on the 2.4G WiFi band, via ESPNOW (this should have a very limited impact on any LoRa signals, as it is modulated via OFDM like a normal WiFi hotspot). Every telemetry message that your transmitter receives from the craft will be re-transmitted via ESPNOW. You may want to disable Backpack Telemetry to reduce your footprint on the RF noise floor when you aren't using it, especially if you are at something like a race day, where there is often contention on the RF spectrum. Disabling Backpack Telemetry will cause the Crossbow integration to stop working.

To disable Backpack Telemetry (only do this if you are NOT using the Crossbow integration):

Expand Down Expand Up @@ -199,7 +200,7 @@ The Crossbow status screen should now be showing `DLink:100%` and `GPS:` should
## Troubleshooting
If you encounter issues:

- **No Telemetry Data / DLink:0%:** Ensure the "Telemetry" option is enabled in the Backpack section of the LUA script and that the firmware is up to date. Also check that your Telemetry Ratio is set to a value that is able to provide frequent telemetry packets. As a rule of thumb, a ratio somewhere between 1:2 to about 1:16 (depending on your packet rate) will suffice. As a troubleshooting step, try 1:2 to guarantee that the tracker is getting regular updates. For more info, see [Packet Rate and Telemetry Ratio](https://www.expresslrs.org/quick-start/transmitters/lua-howto/#packet-rate-and-telemetry-ratio) and [Telemetry](https://www.expresslrs.org/quick-start/pre-1stflight/#telemetry)
- **No Telemetry Data / DLink:0%:** Ensure the "Telemetry" option is set to `ESPNOW` in the Backpack section of the LUA script and that the firmware is up to date. Also check that your Telemetry Ratio is set to a value that is able to provide frequent telemetry packets. As a rule of thumb, a ratio somewhere between 1:2 to about 1:16 (depending on your packet rate) will suffice. As a troubleshooting step, try 1:2 to guarantee that the tracker is getting regular updates. For more info, see [Packet Rate and Telemetry Ratio](https://www.expresslrs.org/quick-start/transmitters/lua-howto/#packet-rate-and-telemetry-ratio) and [Telemetry](https://www.expresslrs.org/quick-start/pre-1stflight/#telemetry)

- **Binding Issues:** Verify that the bind phrase is correctly set and matches between the Backpack on your transmitter and the Backpack receiver. This should also match the bind phrase that you use for regular ELRS receivers.

Expand Down