|
| 1 | +--- |
| 2 | +title: "Installing Adaptive Link" |
| 3 | +description: "Install and configure Adaptive-Link for OpenIPC to optimize your wireless connection" |
| 4 | +--- |
| 5 | +--- |
| 6 | + |
| 7 | +## How Adaptive-Link Works |
| 8 | + |
| 9 | +Wireless communication can transmit data at high speeds over short distances with a strong signal, or slowly but over longer distances with a weaker signal. |
| 10 | + |
| 11 | +OpenIPC allows you to choose one fixed link speed and video bitrate. Default: |
| 12 | +- **Bitrate:** 4 Mbps |
| 13 | +- **Channel Width:** 20 MHz |
| 14 | +- **MCS:** 1 |
| 15 | +- **FEC:** 8/12 |
| 16 | +- **Guard Interval:** long |
| 17 | + |
| 18 | +This is a "universal" profile — moderate quality and average range. |
| 19 | + |
| 20 | +**Adaptive-Link** solves this by automatically selecting the best link and video profile based on signal quality (RSSI and SNR). |
| 21 | + |
| 22 | +Strong signal = high speed and quality |
| 23 | +Weak signal = long-range profile and lower bitrate |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +## How It Works |
| 28 | + |
| 29 | +- **On the Ground Station**, `alink_gs` monitors RSSI and SNR, calculates a final "score" (1000–2000), and sends it to the drone. |
| 30 | +- **On the drone**, `alink_drone` receives the score and selects the appropriate profile from `/etc/txprofiles.conf`. |
| 31 | +- Profile transitions are controlled via `/etc/alink.conf`. |
| 32 | + |
| 33 | +### Example: |
| 34 | +```ini |
| 35 | +rssi_min = -80 |
| 36 | +rssi_max = -40 |
| 37 | +snr_min = 12 |
| 38 | +snr_max = 36 |
| 39 | +``` |
| 40 | + |
| 41 | +If RSSI = -60 and SNR = 20: |
| 42 | +- RSSI score = 1500 |
| 43 | +- SNR score = 1333 |
| 44 | +- Final score (with 0.5/0.5 weights) ≈ 1416 |
| 45 | +- `alink` selects profile: `1051 - 1500` |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## Example Configurations |
| 50 | + |
| 51 | +### `/etc/txprofiles.conf` |
| 52 | +```bash |
| 53 | +999 - 999 long 0 8 12 1999 10 30 0,0,0,0 20 -12 |
| 54 | +1000 - 1050 long 0 8 12 2000 10 30 0,0,0,0 20 -12 |
| 55 | +1051 - 1500 long 1 8 12 4000 10 25 0,0,0,0 20 -12 |
| 56 | +1501 - 1950 long 2 8 12 8000 10 20 12,6,6,12 20 -12 |
| 57 | +1951 - 2001 short 2 8 12 9000 10 20 12,6,6,12 20 -12 |
| 58 | +``` |
| 59 | +:::tip |
| 60 | +Safe TX profiles can be found [here](https://github.com/OpenIPC/adaptive-link/tree/main/txprofiles) |
| 61 | +::: |
| 62 | + |
| 63 | + :::caution |
| 64 | + Set the transmission power levels in `/etc/txprofiles.conf` carefully. The default is `30`, which is safe for most adapters but may be too low for some. Adjust the power accordingly to ensure optimal performance. |
| 65 | +::: |
| 66 | +### `/etc/alink.conf` |
| 67 | +```ini |
| 68 | +rssi_weight=0.3 |
| 69 | +snr_weight=0.7 |
| 70 | +fallback_ms=1000 |
| 71 | +hold_fallback_mode_s=3 |
| 72 | +min_between_changes_ms=150 |
| 73 | +hold_modes_down_s=4 |
| 74 | +hysteresis_percent=15 |
| 75 | +``` |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +## Installation |
| 80 | + |
| 81 | +:::tip |
| 82 | +**An internet connection is required.** |
| 83 | +::: |
| 84 | +### On Drone (OpenIPC) |
| 85 | +```bash |
| 86 | +cd /etc |
| 87 | +curl -L -o alink_install.sh https://raw.githubusercontent.com/OpenIPC/adaptive-link/refs/heads/main/alink_install.sh |
| 88 | +chmod +x alink_install.sh |
| 89 | +./alink_install.sh drone install |
| 90 | +reboot |
| 91 | +``` |
| 92 | + |
| 93 | +Add to autostart: |
| 94 | +```bash |
| 95 | +/etc/rc.local >> alink_drone & |
| 96 | +``` |
| 97 | + |
| 98 | +### On Ground Station (Radxa / Android / PC) |
| 99 | +```bash |
| 100 | +sudo curl -L -o alink_install.sh https://raw.githubusercontent.com/OpenIPC/adaptive-link/refs/heads/main/alink_install.sh |
| 101 | +sudo chmod +x alink_install.sh |
| 102 | +sudo ./alink_install.sh gs install |
| 103 | +``` |
| 104 | + |
| 105 | +**Config will be located at:** |
| 106 | +- `/config/alink_gs.conf`, or |
| 107 | +- `/home/radxa/alink_gs.conf`, or |
| 108 | +- `/etc/alink_gs.conf` |
| 109 | + |
| 110 | +--- |
| 111 | +:::tip |
| 112 | +**Alternative installation method using SCP to install Adaptive Link - [here](/hardware/runcam/vtx/installing-alink-runcam/)** |
| 113 | +::: |
| 114 | + |
| 115 | +## Troubleshooting |
| 116 | + |
| 117 | +### If the drone stays in long-range mode (profile 999), check: |
| 118 | + |
| 119 | +- Ground station transmitter power |
| 120 | +- Antenna connections |
| 121 | +- `/etc/txprofiles.conf` settings |
| 122 | + |
| 123 | +### If the video quality is poor despite a strong signal: |
| 124 | + |
| 125 | +- Check bitrate settings in `/etc/txprofiles.conf` |
| 126 | +- Ensure RSSI and SNR weights in `/etc/alink.conf` are set correctly |
| 127 | + |
| 128 | +### If the system frequently changes settings: |
| 129 | + |
| 130 | +- Increase `min_between_changes_ms` value in `/etc/alink.conf` |
| 131 | +- Increase `hysteresis_percent` value in `/etc/alink.conf` |
| 132 | + |
| 133 | +## Parameters |
| 134 | + |
| 135 | +| Parameter | Full Name | Description | |
| 136 | +|-----------|-----------|-------------| |
| 137 | +| **RSSI** | Received Signal Strength Indicator | The power level of the received wireless signal. Measured in dBm, with values closer to 0 indicating a stronger signal. | |
| 138 | +| **SNR** | Signal-to-Noise Ratio | The ratio of signal power to noise power. Higher values indicate better signal quality and cleaner transmission. | |
| 139 | +| **MCS** | Modulation and Coding Scheme | Determines the data transfer rate by defining how information is encoded for transmission over the wireless medium. | |
| 140 | +| **FEC** | Forward Error Correction | A technique that adds redundant data to transmissions, allowing the receiver to detect and correct errors without retransmission. | |
| 141 | +| **GOP** | Group of Pictures | Defines the sequence and organization of video frames between keyframes. Affects video compression efficiency and stream responsiveness. | |
| 142 | +| **Bitrate** | Amount of video data per second | The quantity of data used per second of video, typically measured in Mbps. Higher bitrates generally provide better image quality at the cost of increased bandwidth usage. | |
| 143 | +--- |
| 144 | + |
| 145 | +## Recommendations |
| 146 | + |
| 147 | +- Don’t choose profiles with high bitrate if your system can’t handle the traffic. |
| 148 | +- Always tailor `txprofiles.conf` to your adapter — especially **power levels**. |
| 149 | + |
0 commit comments