This is to track development and testing of a custom telemetry implementation over CRSF, the goal is to have something equivalent to the frsky passthrough protocol.
The CRSF protocol has been added recently (as of Oct 2020) to ArduPilot by @andyp1per.
Like fport CRSF can carry both RC and bidirectional telemetry.
The CRSF receiver can be wired to an ArduPilot FC in 2 ways, by using RCIN or by using a serial port (SERIAL_PROTOCOL=23).
For telemetry support it requires the usage of a serial port, again just like fport.
CRSF native telemetry is supported by OpenTX as sensors, so users would normally have to discover and display them on widgets or telemetry pages.
This works really well but unfortunately CRSF native telemetry does not support all the telemetry data that passthrough offers.
Some further notes:
- passthrough over frsky has a limit of 8 bytes per frame so there is no way of sending large text strings as a single frame whereas CRSF has a limit of 64bytes per frame.
- gps telemetry is already supported by CRSF native telemetry so no need to duplicate the functionality
- CRSF has 2 telemetry rates: mode 1 @50Hz and mode 2 @150Hz. The problem is @50Hz, bandwidth is limited and the RX will discard frames. With native CRSF telemetry you get a slow down of sensor refresh, with custom telemetry weāll loose some status text messages and we get a slower refresh as well.
My proposed solution
I created 2 custom CRSF telemetry frames, one to carry the very same passthrough payload used by frsky in order to maximize code reuse both in ArduPilot and in OpenTX and another one to carry status text messages as a single big frame.
Having a dedicated frame for status text has the added benefit that when the CRSF link switches from high data rate to low data rate we do not get status text corruption (we might miss a whole status text message if the frame is dropped but at least itās not corrupted).
Since GPS and status text have their own frames we never send them as passthrough data.
When we detect a switch to slow data rate we dynamically adjust message rates to cope with the slower link, we can for instance lower passthrough attitude rate which is usually quite high.
Notes
- CRSF native telemetry always enabled
- CRSF custom telemetry uses frame ID 0x7F as suggested by TBS
- CRSF custom telemetry in RF mode 1 uses a single big frame every couple seconds to pack all passthrough frames as an array. This leaves enough bandwidth for native CRSF telemetry, status text messages and passtrough, the only side effect is the artificial horizon is unusable while in RF mode 1 but everything else is updated every 3 seconds on average.
Rates in RF Mode 2:
- native GPS 3Hz
- native BATTERY 1Hz
- native ATTITUDE 1Hz
- native FLIGHT_MODE 0.5Hz
- native HEARTBEAT 0.2Hz
- custom STATUSTEXT 2Hz
- custom PASSTHROUGH 20 Hz
Rates in RF mode 1:
- native GPS 1Hz
- native BATTERY 1Hz
- native ATTITUDE 1Hz
- native FLIGHT_MODE 0.5Hz
- native HEARTBEAT 0.2Hz
- custom STATUS_TEXT 0.5Hz
- custom PASSTHROUGH 0.5Hz (1 frame with all passthrough packets as an array)
On the OpenTX side Iāve added support for the new message types to my widgets and customized the rssi view to include rssi, link quality (rx/tx) and rf mode (fast/slow data rate)
Overall the look and feel of the widget is the usual one except for the extended rssi info (RQly, TQly, RSSI/RFMD)
Open issues:
- better handling of rf mode 1 (done in dev branch, needs testing)
Ardupilot setup:
- SERIALn_PROTOCOL = 23
- RC_OPTIONS bit 8 set at 1, i.e. add 256 to your current RC_OPTIONS value (enables custom CRSF telemetry)
Widget setup:
- enter the config menu, long press SYS, browse to tools, launch āYaapu Configā and enable CRSF, long press RTN to exit and save, should be ok, if not simply power cycle.
Downloading and testing (latest ardupilot version 0.8, widget and script 0.7)
- you can compile it yourself using my test branch (flash cost right now is around 1KB)
- prebuilt ardupilot binaries are here
- Yaapu Telemetry Widget with crossfire for Horus class radios is here
- Yaapu Telemetry Script with crossfire for Taranis radios is here
Note: I really need to thank TBS for supporting this with a micro TX V2 and a nano receiver!
Alex