mLRS Documentation: Logging
March 30, 2025 ยท View on GitHub
Logging radio link statistics can be helpful to understand performance and potentially debug any problems you are having. Two logging methods are described below:
- EdgeTx/OpenTx Logging
- ArduPilot Lua
EdgeTx/OpenTx Logging
Setup & Validation
- Ensure that you have the link setup correctly and have completed the step to discover telemetry sensors.
- Go to go to MDL->SPECIAL FUNCTIONS, click '+'.
- Select the special function to assign, for example SF1.
- For Trigger, it is typical to have the same switch used for arming, although any switch can be chosen.
- For Function, select 'SD Logs'.
- For Interval, 1.0 seconds is fine, this can be increased or decreased based on your preference.
- Enable the special function.
- To validate, enable logging using the switch previously assigned. Wait a few seconds, then turn use the switch again to disable.
- Navigate to SYS->SD CARD, then choose the 'LOGS' folder. If working as expected, you will see a CSV file with the model name and timestamp.
Analysis
The logs are stored as CSV files on the SD card in the 'LOGS' folder, they can be extracted and and analyzed using your preferred tool - Excel, Python, Sheets, etc.
A good option is to use this browser based solution here.
ArduPilot Logging
An ArduPilot Lua script has been developed which records link statistics as part of the flight controller log. This requires a flight controller with Lua Scripting and MAVLink RC features enabled. These are only enabled by default on 2 MB flight controllers. For other flight controllers, you will have to create a custom build which includes both of these features. This can be done using the Ardupilot Custom Firmware Builder.
Setup & Validation
- Download the Lua script from here and place in the /APM/SCRIPTS/ folder on the SD Card of your flight controller. If the /APM/SCRIPTS/ folder doesn't exist, you will need to create it.
- On your flight controller, enable scripting by setting the parameter
SCR_ENABLEto1and then reboot the flight controller. - Set the following two parameters in mLRS:
Rx Ser Link Mode=mavlinkormavlinkX(mavlinkXshould be preferred)Rx Snd RcChannel=rc channels(NOTrc override!)
- To validate, arm your flight controller for a few seconds, then disarm.
- Check the /APM/LOGS/ folder on the SD Card of your flight controller, you should see a BIN file.
Analysis
Analysis can be done in Mission Planner by following the steps here. mLRS specific logging can be found under MLR1, MLR2, MLR3, MLR4 and MLR5 entries.