Skip to content

Update APFPV.md #76

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

Merged
merged 3 commits into from
Jul 8, 2025
Merged
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
106 changes: 58 additions & 48 deletions src/content/docs/use-cases/fpv/APFPV.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,58 +389,68 @@ nmcli device disconnect wlan0

Thats all, now put the SD card in your vrx and turn it ON, you will get 2 wifi interfaces connected to APFPV credentials, and with ip route it will pick the best wifi card every time, the range should increase significantly.

### Using APAlink
APAlink will modify the bitrate on the fly to keep link alive, it still on exprimental stage, use on your own risk!
1. Download it from [GitHub](https://github.com/carabidulebabat/CaraSandbox/blob/main/ap_alink.sh).
2. Modify rc.local in /etc/ folder and add before exit 0 and save the file.
```bash
/etc/ap_alink.sh &
````

3. SSH into it(putty can be used) and type:
Using APALink

```bash
chmod +x /etc/ap_alink.sh
```
APALINK is a C program designed to keep your video link alive. It uses fallback logic to switch to a lower bitrate (e.g., 2 Mbps) when the signal is weak.

Now lets see the different setting, cause its experimental we can play with various parametrer
Installation

bitrate=30 is the default bitrate, when its boot it will start at 30mbps
bitratemax is the max bitrate allowed, majestic will not go higher than this value
default value is bitrate 30 and max 40, its good if you have a radxa gs with good wifi card, if your on android try lower value like
To install it is easy:

```bash
bitrate=4
bitratemax=10
````
1. Go to https://github.com/carabidulebabat/CaraSandbox
2. Follow the steps in the README.md.

Power output is not adaptive yet.
```bash
get_dynamic_interval() {
dbm=$(get_dbm)
echo $(awk -v d="$dbm" 'BEGIN {
if (d > -40) print 8;
else if (d > -65) print 6;
else if (d > -75) print 4;
else if (d > -85) print 2;
else print 1;
}')
}
```
This function allows to increase the bitrate faster or lower depends on link quality in dbm. You can modify the d value to set the sensitivity of APAlink.
```bash
get_dynamic_decrease() {
dbm=$(get_dbm)
echo $(awk -v d="$dbm" 'BEGIN {
if (d > -60) print 2;
else if (d > -75) print 5;
else if (d > -85) print 15;
else print 20;
}')
}
```
Same thing as get dynamic interval, but it will lower bitrate faster or lower depends of link quality.
3. Copy the ap_alink binary to /usr/bin:

'''bash
chmod 777 +x /usr/bin
'''

4. Copy the ap_alink.conf file to the /etc/ folder.

5. (Optional) Copy vtxmenu.ini to /etc/ as well to enable the APFPV menu.

6. Go fly!

Settings

You can edit the ap_alink.conf file:

'''bash
bitrate_max=22 ## its the bitrate when good signal
bitrate_min=2 ## its the fallback bitrate
dbm_threshold=-47 ## this value is the threshold of when fallback mode needs to kick in. WARNING: set this value as your Wi-Fi RF sensitivity
'''

- A lower threshold = better image quality for longer, but video may lag or freeze under weak signal.
- A higher threshold = fallback triggers faster, possibly reducing lag but also image quality.

Recommended Settings

EU2:
'''bash
bitrate_max=12
bitrate_min=2
dbm_threshold=-52
'''

8812AU AF1:
'''bash
bitrate_max=10
bitrate_min=2
dbm_threshold=-48
'''

MSP Menu

Navigate to the MSP menu just like in HDZero or WFB-NG.

Inside the "BASIC SETTING" submenu, you have:

- Tx Power: 1500 or 2000 (representing MIN/MAX power). 25mw or 100mw.
- Channel: Every 5GHz Wi-Fi channel is listed.
- AutoPower 0 or 1 enable set tx power auto of iw

I suggest to try different value for d > dbm and see in flight.
You can killall ap_alink.sh and type sh /etc/ap_alink.sh to execute script with log, log will show current bitrate, interval and dbm. Thats all for APAlink at the moment
That’s All

Straightforward, easy to understand — just plug and fly without overthinking.