Servers by jDrones

Question regarding Crossfire/Mavlink for RC control

Hi all,

So, I have a “working” setup with an older pixhack (will upgrade soon) and crossfire.

The only way I could get RC control to “show up” on MP was if I set the crossfire RC control to MAVLINK and NOT crsf. When set to crsf, telemetry was rock solid, but no RC control.

My understanding was that using crsf for RC control not only worked but was a more robust setup.

Would appreciate any and all suggestions on this.

Thanks!

Did you set SERIALn_PROTOCOL,23 ? By “setting the crossfire RC control to MAVLINK and NOT crsf” you mean assigning the RX output pins? I don’t have any experience with Pixhawk, but on F4 and F7 CRSF only worked for me when connected to a UART that is meant for telemetry - NOT the UART meant for RCIN.

I have CRSF running now on 4 crafts (2 not yet flying), and both RC and telemetry work for me. With Mavlink I got only half of the sensors, so I’m really happy CRSF is now in latest/dev for both plane and copter.

I will have to research “SERIALn_PROTOCOL,23” because I just don’t know what that is. Is that a setting in MP?

Setting the crossfire RC control is done in the menu of the “big” crossfire transmitter OR can be done through the X9D+. On the pixhack there is a telemetry port I am connecting to. I’m getting all sensors and RC with Mavlink but I just need to figure out how to get RC working with CRSF. When I choose CRSF in the menu, I get no RC.

I’m pretty sure your telemetry port protocol is incorrect for CRSF. Mavlink doesn’t need any settings changed as it is default, so it works immediately. For CRSF you need the option “RCin” which is 23. Without that setting, you get only telemetry.

Ok, thanks. I will read up on this. I’m pretty new to all of this and there is a substantial amount of information to understand…but that keeps it all very interesting…

There are not many Crossfire users here yet, so I had to figure out a lot of it myself. Happy to help and save you some time. :wink:

Thanks again. I will report back tomorrow on how this goes.

Hi, I found the documentation on this setting. I see there is also a crossfire option (29) by the way.

But here is my question. If I change this protocol from Mavlink to RCin, do I lose telemetry as I gain RC?

I’m going to test this as soon as I figure out which SERIALn corresponds to the Radio port on the Pixhack. The port is labeled as Radio/Telem1 and I’m making the assumption this is the primary port for this data.

Ok, so, I changed serial port 1 to 23 and then in the Diversity Receiver I set “RC by MAVlink” to OFF.

This resulted in no RC but I still received telemetry. The good news is this seems to be confirmation that Serial1 is the correct setting to change.

So, the only setup that gives me everything is setting the protocol to 1 and setting “RC by MAVlink” to ON.

I have a growing feeling that I’m just missing something very simple here…

By the way, I’m doing pretty much what the guy is doing in this video:

[quote=“vronp, post:8, topic:62242”]If I change this protocol from Mavlink to RCin, do I lose telemetry as I gain RC?

I’m going to test this as soon as I figure out which SERIALn corresponds to the Radio port on the Pixhack. The port is labeled as Radio/Telem1 and I’m making the assumption this is the primary port for this data.[/quote]

AP appears to be always looking for telemetry data on SERIAL1 (and 2 as well I believe). Any OPTIONS set are merely “on top” of that. At least this seems to be the case with CRSF.

I left “RC by MAVlink” on as it didn’t seem to matter. Maybe that’s the setting to change?

By the way, you are using the 4.1.0 development (“latest”) version of AP?

If I am looking at the right thing, ArduCopter 4.0.4

I’ll try leaving “RC by MAVlink” on…

there’s multiple ways to combine your crossfire with your FC, as the crossfire supports various protocols. using bidirectional crsf or mavlink protocol will likely be the most attractive options. mind that crsf protocol as for now is supported in ardupilot latest (=master) firmware only.

1.: to use crsf as your RC and telemetry protocol

  • in your crossfire Rx, set the pins you use to connect to your FC to CRSF_TX and CRSF_RX
  • in MP set the serial port you use to connect your crossfire Rx to SERIALn_PROTOCOL = 23 (RCIn)
  • your crossfire’s RC by mavlink setting will have no effect in this scenario, as mavlink is not used
  • this will bring up crossfire telemetry sensors in your transmitter and, if using the fullsize crossfire transmitter, allow to pass on emulated mavlink downlink telemetry of the most vital avionics (one way only) via the TX’es serial port or bluetooth module

2.: to use mavlink as your RC and telemetry protocol

  • set your crossfire receiver’s pin functions to MAVLINK_TX and MAVLINK_RX
  • in MP, set your FC’s respective SERIALn_PROTOCOL to 2 (mavlink2 = default), and the corresponding SERIALn_BAUD to 57
  • in your crossfire RX, set RC by mavlink “ON”. mavlink2 supports the 12 channel option, while mavlink1 will allow 8 channels only
  • if using the fullsize crossfire TX, this will allow to pass on full bidirectional mavlink telemetry to your ground control software of choice (serial port or bluetooth)

mind that current crossfire firmware does not fully support mavlink bridging via wifi / udp on the crossfire microTX V2 yet.

CRSF is not available in 4.0.4, you need to download 4.1.0 from “latest” folder. I already mentioned that 2 days ago but maybe not clearly enough. :wink:

Yes you did and I lost track of that somewhere along the way.

Well, I might have a new problem now but I’m not sure. I think this PixHack has the flash error and I can only flash 1 MB on it. I’m not positive yet and I’m still researching. Regardless, I apparently found 4.0.4 that fit so fingers crossed that 4.1.0 will fit otherwise I am ordering a new flight controller.

Still not working. If I don’t have “RC by MAVlink” set on the receiver, it will not work.

10/3/2020 8:37:02 AM : RCOut: PWM:1-12
10/3/2020 8:37:02 AM : Pixhawk1-1M 00290028 3034510A 30363239
10/3/2020 8:37:02 AM : ChibiOS: 331fe75d
10/3/2020 8:37:02 AM : ArduCopter V4.1.0-dev (13e5e03a)
10/3/2020 8:37:00 AM : Frame: QUAD
10/3/2020 8:37:00 AM : IMU0: fast sampling enabled 8.0kHz/1.0kHz
10/3/2020 8:37:00 AM : RCOut: PWM:1-12

So MAVlink is still being used, not CRSF. Are you sure you set the right serial port to 23? “Decoding CRSF” should appear among the first messages.

I think you are onto something. I changed each serial in turn and never saw that message. Then, I went back and disabled the Serial1 line and yet I still get RC via MAVlink. I was sure this would break RC but it did not. I’m assuming this means I am changing the wrong parameters or there is something else I am not doing correctly.

http://doc.cuav.net/flight-controller/pixhack/en/pixhack-v3.html

That is a picture of the FC. I have the previous version but the ports are nearly identical. I am connected to the RADIO port. I suppose I could try a connection to Serial 4/5???

Servers by jDrones