CRSF protocol for TBS Crossfire?

ersky9xr is the port of the er9x firmware to the 9XRPRO radio.
User avatar
DeVere
Posts: 14
Joined: Mon Oct 24, 2016 7:52 am
Country: United States
Contact:

Re: CRSF protocol for TBS Crossfire?

Post by DeVere »

Please I didn't mean that in a "need it now hurry up" kind of way .
It should be the lowest priority as far as it concerns my needs.
I just wanted to emphasize my desire to help in any manner I'm able.

Is there some software/hardware setup available (or maybe not too difficult to develop) that would let people test their code on remote RC hardware for scenarios just like this?

Thank you
John

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

No problem, just letting everyone know what is being requested.
I have used an Arduino when I was developing the code for the Multi module when I didn't have a real module for the testing.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

Hi Mike,

Any luck with integrating the bi-directional communication you mentioned for the 9XR Pro and TBS Crossfire to get RSSI? I think RSSI would be most helpful right now to get warnings or call outs. Another person mentioned they would be willing to send you a TBS Crossfire for testing. I noticed some build instructions for Ubuntu. If it makes sense, do you have a local branch you could push? I might be able to help test, build, contribute, etc..
Thank you.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

Currently, I haven't had enough time to progress this, it is quite high in priority in my "to do" list!
I think the master branch on Github does have the CRSF protocol code in it, but I hope to push the sources of where I'm at in the next few days. I've been porting the code to the Horus, and I've got some updates from someone else (for the ARUNI board) I need to merge in before I do the push.

I've also actually been flying a bit and I have two model builds in progress!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

If you have the CRSF working for control OK, please go to the "DEBUG" menu (UP LONG, then LEFT a few times), and look at the bottom line with "TelRxCount" on it. Is the first number counting up? What value is the second number?

If the first number is counting then the telemetry data is being received and just needs parsing.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
DeVere
Posts: 14
Joined: Mon Oct 24, 2016 7:52 am
Country: United States
Contact:

Re: CRSF protocol for TBS Crossfire?

Post by DeVere »

Yes it is. I will check the second number.

From my previous post "One of the status pages on the 9xr, I think it's "telemetry," shows data RX and the 16-bit value (that's displayed in hex) is updating rapidly.. so, i just assume it's receiving data over com1. (I didn't spend much more time to check that assumption)"
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

Mike,

On ersky9x-r220 debug menu TelRxCount increments up, but the second number remains at 0904 (with receiver on and off). No information on telemetry screens (all zeroed out). I'll try the build instructions when I get some time to setup (let me know if you push changes to a branch and any other debug info that will help). I'm sure someone would be happy to loan their crossfire. Mine is currently being used at the moment with your firmware! Awesome right?

Thank you.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I've just posted a test version of ersky9x for the 'PRO that might display RSSI and Battery voltage (as FasV). The scaling of the battery voltage may be wrong, but I need to know what it does display to be able to correct this.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

Mike,

Great! I'm seeing the RSSI now on the bar graph (fyi no TSSI). I don't have a way to test battery right now. Someone else may be able to test Battery.

After reviewing RSSI while not flying, I can see the RSSI getting lower and higher as I walk around (it seems to represent what is going on).

I found out how to set up voice audio warnings for RSSI under a certain value to get the RSSI value, haptic and a chirp. Very nice.

Also, when I unplug the battery on my receiver I do get an audio warning that their is no telemetry but the 9xr pro still reports 100%.

I don't see a way that I can verify that RSSI is accurate. For example, with the Crossfire, you can control power output manually or have it on dynamic power. You can also review rssi and snr for uplink and downlink on Crossfire screen (these numbers would be difficult to interpret to a percentage). A Find Mode also exists with a percentage (even in off mode / haven't turned it on yet / percentage appears to be implement completely different). Do you get a percentage from the crossfire or do you figure out max based on highest received reading? If the latter, I would probably need to turn off dynamic power. BTW, dynamic power works well for me for control so far. I'll be turning it off sometime in the future if it ever proves that doesn't work well.

Looks like it's moving forward! RSSI % warnings or callouts would be extremely helpful (especially if they are accurate).

Thank you.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I'll add the TSSI value, I think I can see what is needed, and I'll also add current to the voltage.
With the basics working, other things should follow, although the GPS values may need translating into the the values currently used for display.

On the telemetry menu, there are entries for RSSI low and RSSI critical, you should be able to adjust these to get the built in warnings.

I may need to look at the RSSI display. Many items flash when they are not being received, I'll need to see if RSSI can do that as well.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

Mike,

Great work for not having a Crossfire!

Thank you for pointing out the additional menu items of RSSI warnings (I'm looking for the visual arrow in the menu now). I suggest that you allow the warnings to be set higher than 75 for testing reasons (for example, 100 for warning and 99 for critical).

I don't know if you caught this, but if I unplug my battery the RSSI remains at 100%. Not sure if 100% was intentional or not. It's nice the audio RSSI callouts are gone after you get audio warning of telemetry lost.

I bet tons of features can be implemented with Crossfire (looking forward to more telemetry and SmartAudio menu Lua control, etc..). I currently don't have GPS, battery, OSD, or SmartAudio setup. Hopefully someone else can check GPS and Battery before I can ever get to them. My current FC doesn't report GPS and battery monitoring through thin wires seems sketchy to me for some reason. I use 5S.

Thank you.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I'll look into why the RSSI doesn't drop to 0, it does when using a FrSky XJT/X8R pair!

I'll need to try some changes as I don't know, exactly, the meaning of some of the values in the telemetry packet. I copied some code from openTx where they use the "RX_QUALITY" as the RSSI value.
There are two values for RSSI specifically:
RX_RSSI1
RX_RSSI2

so I probably need to look at these as well.

Give me a day or so to come up with something.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

The manual might give some interpretation as to what they are. See the telemetry section on pg 40 if you haven't seen it. http://www.team-blacksheep.com/tbs-crossfire-manual.pdf Not sure if any other info available.
User avatar
DeVere
Posts: 14
Joined: Mon Oct 24, 2016 7:52 am
Country: United States
Contact:

Re: CRSF protocol for TBS Crossfire?

Post by DeVere »

@mikeb
I'm using mavlink, I don't think I mentioned that.
All telemetry values remain zero.
Using test version from May 23.

I enabled "raw logging" which I'm assuming dumps all the data to the SD card.
Should I post that file?
Thank you,
John
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

Please detail exactly what your setup is. Are you using CRSF telemetry to carry Mavlink data, or are you using CRSF for control and the Mavlink telemetry is arriving via a different RF carrier?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
DeVere
Posts: 14
Joined: Mon Oct 24, 2016 7:52 am
Country: United States
Contact:

Re: CRSF protocol for TBS Crossfire?

Post by DeVere »

I'm using crsf to provide the mavlink and control. (No separate radio modem)
I had a dragonlink system set up the same way, the telemetry was displaying on the 9xr.

I decided to switch to the crossfire to see how it compared.

So I have it set up the same way, the only change on the 9xr is I selected the crossfire protocol.
In the 9xr telemetry settings, "mavlink" is selected. Com1 is receiving data. Mission planner is working fine through a Bluetooth connection to the crossfire.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I see (I think). I thought CRSF sent it's own telemetry, which is what I'm decoding currently. If you have a "raw telemetry" log, then posting this for me to inspect would be useful. Please make sure it is "raw", the setting in the menu to select "raw logging" is not saved through a power cycle.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

I've been doing some more testing. I'm flying successfully with Crossfire. The Crossfire reports CRSF V2 and 9xr Pro reports RSSI. The hardware protocol is working also through SBUS and CRSF options between the TBS Micro Receiver V2 and flight controller. That's all positive.

I was able to get battery voltage into my flight controller now which reports fine on my flight controller, but not sure how to get the battery voltage from the Flight Controller to eventually back to the 9XR Pro. The Crossfire menu reports that the RX Micro V2 Output Map has CRSF TX for Channel 1 and CRSF RX for Channel 2 which is soldered respectively to rx3 and tx3 (both are UART3) on the Flight Controller. I enabled Telemetry feature and enabled MAVLink through the Telemetry feature (and tried others) on the same port UART3. I enabled logging within the 9XR Pro with the Arm switch, plugged in a battery and reviewed the data in the CSV format that it generated. The voltage of the radio and RSSI is showing. However, no telemetry data is showing.

In the debugging menu of the 9xr Pro, the up and down buttons can not get me to the raw debugging option to enable it. Is there any way to enable raw raw debugging to see if the telemetry data is making it in to the radio?

I'm still hunting down anything I might be missing in the setup.

Thank you.
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

After reviewing voltage reporting in 9xr Pro, I found in the custom Telemetry section FasV reports 2.0 and the flight controller is reporting 20.6v. 1.2 will show for 12.1v. Briefly I may see 0.0 on the 9xr Pro. If I pull the battery you can see both lower to 0 and when I connect the battery you can see both raise. Hope this helps. This is definitely more progress than my last email. It's going to be great to set warnings for low voltage if possible. The fuel gauge and % is 0.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I'll sort that scaling by 10 for the voltage.
Do you see a value for the Current (Amps)?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

My flight controller also reports capacity drawn and current draw. I didn't see anything related to mah or current that you asked about. I was testing with the firmware in ersky9xr_romD1xfire.zip. Let me know when you want me to try a new version to test the scaled adjustment and I can check the telemetry custom fields again. I tried new versions ersky9xProvR221d4.zip and ersky9xProvR221d2.zip bins and these must be on a different code base because I see no value for FasV or anything in the custom fields starting with Cus#. I see mentions of Lua... is this ground work for getting into SmartAudio control?
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

"d2" and "d4" should work, I didn't think I'd changed anything to stop FasV from working.

Please try "d4", and generate a "raw log" of the telemetry, and post it here for me to investigate.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

d2 and d4 doesn't report FasV. In the 9xr Pro I can't select Raw Logging in the debug menu. For other menus, I can easily check the checkbox.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: CRSF protocol for TBS Crossfire?

Post by jhsa »

I have just tried and I can check the raw logging box. you have to press the MENU key long. This was on my 9XR-PRO with d4 installed..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

The long menu press worked on the debug menu. Here is log output for 3s battery that I plugged into the sensor. You can see FasV is 0. Typically I would see 1.2 for 12.1 two test versions back. It looks like RSSI isn't reporting like it use to also. However, I still can control the receiver.
Attachments
cfr_log_with_3s_battery_for_sensor.zip
(2.9 KiB) Downloaded 242 times
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: CRSF protocol for TBS Crossfire?

Post by jhsa »

Check you have the correct telemetry COM Port selected..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

With the 9xr pro you can only select the com port of 1.

The d1 firmware works reporting RSSI and FasV for voltage (needs * 10), but not d2 and d4 (zeros). Control is fine.

My telemetry settings for the Crossfire are on d1, d2 and d4 seems consistent:
UsrProto Mavlk Met
....
BT Telemetry Off
Telem. Com Port 1
Com Port Invert None
FAS Offset 0.0
COM2 Func. Telemetry
COM2 Baudrate Auto
COM1 Baudrate Auto
Current Source ----
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

At first glance, the raw telemetry is OK. I'll need to check in the code to see what might have changed. If I don't see something obvious, I'll post a test version that should locate where the problem is, but may need a day or so to do that.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

Thank you. Looking forward to a build. I'm getting general warnings about 1.8v. It would be great to have one more digit and scaled up for more resolution. Hopefully you have it in source control. Again, thank you.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I've posted "d5", which may fix the problem.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “ersky9xr”