CRSF protocol for TBS Crossfire?

ersky9xr is the port of the er9x firmware to the 9XRPRO radio.
oo20
Posts: 19
Joined: Sun Apr 16, 2017 1:52 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by oo20 »

Through experimenting I found within the firmware version 9xr Pro version ersky9x-pf8r221 date 20.12.2017 that Full Size Crossfire reports transmitting modes through 9xr Pro Telemetry custom field "Cus6" (a value of 2 or 1 for Crossfire Op-Mode "Normal", and 1 or 0 for Crossfire Op-Mode "Forced Telemetry"). Confirmed while having someone read values as I drive away at 10mw / non dynamic. I'm thinking that Cus6 can be renamed to RFMD. In a FAQ / Support page I found that RFMD 2 = 150Hz Mode, RFMD 1 = 50Hz Mode, and RFMD 0 = 4Hz Mode (forced telemetry). http://team-blacksheep.freshdesk.com/su ... for-opentx I'll try a later 9xr Pro version when I upgrade my full size Crossfire (which is at V 2.31 which allows higher transmit power). Thank you!

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

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I don't have (or therefor use) any TBS crossfire hardware. When I receive a LINK telemetry frame, I store the TX_QUALITY in TSSI, the RX_QUALITY in RSSI and the first 6 items in the frame in Cus1 to Cus6 (Custom telemetry values).

Cus1: RX_RSSI1
Cus2: RX_RSSI2
Cus3: RX_QUALITY
Cus4: RX_SNR
Cus5: RX_ANTENNA
Cus6: RF_MODE

I may be able to do a bit better if I know what people want, creating new telemetry items. I had reached a limit where it wasn't easy to add more items, but I recently fixed that problem.

Since, with other telemetry protocols, Cus1 to Cus6 may be used for other things, I can't just rename Cus6. What you could do, for now, is use a scaler with source Cus6, and apply a new name in the scaler.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
nrw505
Posts: 11
Joined: Mon Mar 28, 2016 11:19 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by nrw505 »

I've been working on getting Hertz's crossfire script extended, and I've finally discovered that sending a packet with crossfiresend() in basic usually doesn't send what's asked for over the wire.

e.g.

Code: Select all

    transmitBuffer[0] = deviceIds[deviceIndex]
    transmitBuffer[1] = DEVICE_ID_RADIO_TX
    transmitBuffer[2] = requestParameter
    transmitBuffer[3] = requestChunk
    crossfiresend(FRAME_POLL_PARAMETERS, 4, transmitBuffer)
usually results in a packet of

Code: Select all

[238, 6, 44, 238, 0, 0, 0, 38]
going out to the module instead of the expected

Code: Select all

[238, 6, 44, 238, 234, 1, 0, 134]
I think I've fixed it in https://github.com/MikeBland/mbtx/pull/40 , if you could take a look that'd be ace.
nrw505
Posts: 11
Joined: Mon Mar 28, 2016 11:19 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by nrw505 »

And now there's a mostly-working crossfire script at https://github.com/nrw505/ersky9x-crossfire-script

Note - only does enough to change power settings and enter binding mode on the Micro TX module so far
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I've done a change a bit differently (to minimise RAM usage, see comment on Github), pushed my changes and posted a new test version of ersky9x (on the test versions thread as usual). I've included your other changes, except indentation ones.

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

nrw505
Posts: 11
Joined: Mon Mar 28, 2016 11:19 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by nrw505 »

Confirmed that 222c5 fixes the crossfiresend() issue.

Though now it gives me an "RX was still powered" warning when powering down while the crossfire module isn't connected to any receiver, just FYI :)
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

The feature uses the RSSI value (being non-zero) to detect if the Rx was still powered.
What value do you have for RSSI with no Rx connected?
Please confirm you are using a 9XR-PRO? The "RX was still powered" is handled slightly differently on different radios.

Thanks for testing and spotting the crossfiresend() problem. I don't have any crossfire hardware!

Mike

Edit: I think I have the fix for that showing on the 'PRO when it shouldn't.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
nrw505
Posts: 11
Joined: Mon Mar 28, 2016 11:19 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by nrw505 »

Yes, 9XR-PRO. RSSI being reported is 0.
nrw505
Posts: 11
Joined: Mon Mar 28, 2016 11:19 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by nrw505 »

On the plus side, it does still give the "still powered" warning when the RX is powered and RSSI is non-zero :)
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

If you compile the firmware yourself, change line 3693 in ersky9x.cpp to:
if ( FrskyHubData[FR_RXRSI_COPY] )

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
sircrashalot
Posts: 19
Joined: Thu Mar 26, 2015 2:14 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by sircrashalot »

I have been reading through this and are my assumptions correct that crossfire is working on the 9XR PRO? I am about to order the micro module for long range flying. I have updated to the latest firmware ersky9x-A4r223.
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

Yes, crossfire protocol is supported by erskyTx on most radios, including the 9XR-PRO.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
sircrashalot
Posts: 19
Joined: Thu Mar 26, 2015 2:14 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by sircrashalot »

I got the Crossfire Micro module finally and all i can get working are the first 4 channels. its not seeing any of my switches. all i did was change the protocol in the protocol menu to crsf from dsm. What am i missing. For the time being i flashed my 9xr pro over to the opentx version that supports the 9xr pro. Its quite a bit buggy but it works.
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I'm not aware of any problems, in erskyTx, with the CRSF protocol, it always sends 16 channels, so if 4 work the next 12 should also work.
What do you have in the mixer lines for channels 5 to 16?

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
sircrashalot
Posts: 19
Joined: Thu Mar 26, 2015 2:14 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by sircrashalot »

What is the correct firmware that I should be on? I have been pulling from the test version page.
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

Unless noted in the description under the test versions, they are the "latest", fully functioning versions, so you should be fine.

What do you have in the mixer lines for channels 5 to 16?

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
sircrashalot
Posts: 19
Joined: Thu Mar 26, 2015 2:14 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by sircrashalot »

I went through and remapped the mixer channels for the switches and they seem to be working now
juliannojungle
Posts: 1
Joined: Tue Dec 08, 2020 8:58 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by juliannojungle »

Hi! Sorry to get into the middle of the conversation, but I need some direction.
Is it possible to have CRSF protocol on the Turnigy9x with stock board m128 and telemetry mod? Or there's some processing power limitation? I'm using the full crossfire TX (the one with oled screen on it).

I've read most of this thread and got some info, but couldn't get to a conclusion.
- It uses bi-directional serial on pin 5. That's just firmware or do I need any other mod to have that? I did the telemetry mod with JR pin 2 with 470R to processor pin 2 and JR pin 5 to processor pin 3.
- It the processor talks to the module at 400k baud, but some radios uses 200k.
- Mike implemented CRSF on erskyTx, but I can't tell the difference from er9x. Is that the one for arm processors like Taranis?

I've read on github the following:
16 channels sent every 2.5ms now @ 200KBauds with CRC
which indeed leads to the 200k baud rate said here, but in this issue from TBS branch, it appears to be a lot less:
data is only being transmitted from FreedomTX to the external module at 50Hz
As far as I know, that 50Hz is the link between TX and RX, but they stated that being the rate between radio and module, which got me confused. If that's true, there should be no reasons for Turnigy9x not be able to run that.

I installed the "er9x-128.hex" and the module recognized as being "PPM 8Ch". Changing the protocol to SBUS on model menu, the module displays "FUT 12Ch".
Last edited by juliannojungle on Wed Dec 09, 2020 1:47 am, edited 1 time in total.
User avatar
Kilrah
Posts: 11107
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: CRSF protocol for TBS Crossfire?

Post by Kilrah »

The "data is only being transmitted from FreedomTX to the external module at 50Hz" is about controlling an external third party module on the Tango2 radio, so not related to crossfire at all.
tezo123
Posts: 3
Joined: Sun Feb 07, 2021 9:04 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by tezo123 »

I have made er9x firmware supporting 400 kbit/s CRSF protocol for M64 microcontroller. I am using it with ELRS, but it should probably also work with Crossfire. That processor is too slow to support that speed at any conventional method, so some serious modifications are done in the code and other protocols are probably now not working, except for ppm.

So if anyone still needs 9xM64 with CRSF and ppm, you can get firmware here: https://mega.nz/file/TDoASTrJ#zPS2Awna0 ... F3kBNp8ywY

Note if you use it: -in r9m module, the pin that receives PPM signal is different than serial pin which can receive CRSF, so that pin has to be rerouted.
-To achive low latency (in CRSF protocol only), first 4 chanels are transmitted without any mixers. Mixes for those channels must also be deleted.
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

Just a note, er9x is released under a GNU licence. This requires that you publish your source code changes as well as the hex file.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
tezo123
Posts: 3
Joined: Sun Feb 07, 2021 9:04 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by tezo123 »

Thanks for notice. I have never done this before, but I was using your git tree, so i guess the best way would be to push my branch on it?
my github email: [email protected]

Matevz
quality09
Posts: 9
Joined: Mon Jul 04, 2016 8:02 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by quality09 »

i have 9xr pro i would like to install the module
TBS Crossfire Micro TX V2 what do I need? thanks in advance but i don't have much experience with this radio
tezo123
Posts: 3
Joined: Sun Feb 07, 2021 9:04 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by tezo123 »

Sourcecode of the CRSF firmware for 64M posted above is forked at https://github.com/ZupinM/mbtx.git
quality09
Posts: 9
Joined: Mon Jul 04, 2016 8:02 am
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by quality09 »

quality09 wrote: Thu Feb 11, 2021 3:07 pm i have 9xr pro i would like to install the module
TBS Crossfire Micro TX V2 what do I need? thanks in advance but i don't have much experience with this radio
Can anyone help me? thank you
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

What firmware version do you have on your Tx?
Looking at the module, I think you just plug it in and select "XFIRE" as the protocol for the external module.

MIke
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
grifild
Posts: 22
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by grifild »

MikeB wrote: Tue Feb 27, 2018 7:15 pm Crossfire uses what is normally the telemetry signal (bottom pin of the module connector) in a bi-directional mode at 400Kbaud.
The AR9X board doesn't directly support bi-directional operation on this signal. It is possible to combine the Tx signal with the Rx signal, by using a diode, and this works OK for bi-directional operation at 57600 baud when using the FrSky SPort.
Due to the AR9X using a transistor inverter on the output, I'm not sure that this method will work at 400Kbaud. I believe the FrSky QX7 has a problem running at 400Kbaud, and so operates at 200Kbaud. Some testing would need to be done on an AR9X board to see if this could work.
At present, I haven't implemented the Crossfire protocol on the AR9X (or original SKY) board.
I do have it working on the 9XR-PRO (same processor), but that has a "real" SPort driver in hardware.

Mike
Hi Mike! I am using Turnigy 9x with AR9X board, external XJT module and latest erskyTx. Telemetry works fine with an installed diode and is even transmitted via bluetooth module to the Android smartphone. But I want to try Express lrs or Crossfire to increase the range and for that I need the CRSF protocol. I can take the Crossfire module for tests. And I'm ready to make modification in ar9x, to work with crossfire, but I don't know where to start. Can you help me?
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

Can you build erskyTx from the sources?
What test equipment do you have (an oscilloscope for example)?

All the Crossfire code is in erskyTx, on the AR9X board, it is just the menu that doesn't let you select it.

The AR9X board needs testing to see if the hardware will work with Crossfire or whether a hardware mod need to be done.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
grifild
Posts: 22
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by grifild »

MikeB wrote: Tue May 25, 2021 2:07 pm Can you build erskyTx from the sources?
What test equipment do you have (an oscilloscope for example)?

All the Crossfire code is in erskyTx, on the AR9X board, it is just the menu that doesn't let you select it.

The AR9X board needs testing to see if the hardware will work with Crossfire or whether a hardware mod need to be done.

Mike
Thank you! I think I can handle building erskyTX from source.
As I understand it, I need to add one line "ui-> ProtocolCB-> addItem (" CRSF ");" to the ProtocolDialog.cpp file for RADIO_BITTYPE_AR9X

As for the equipment, now I only have a multimeter with frequency measurement, but I think it won't help. I will try to build the firmware and test it with Crossfire in 50hz mode.
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

That only changes eepskye, not the radio itself.
In menus.cpp find:

Code: Select all

#ifdef PCBSKY
 #ifdef REVX
const uint8_t ProtocolOptions[2][7] = { {3,PROTO_PPM,PROTO_DSM2,PROTO_MULTI}, {6,PROTO_PPM,PROTO_PXX,PROTO_DSM2,PROTO_MULTI,PROTO_XFIRE,PROTO_SBUS} };
 #else
const uint8_t ProtocolOptions[2][5] = { {3,PROTO_PPM,PROTO_DSM2,PROTO_MULTI}, {4,PROTO_PPM,PROTO_PXX,PROTO_DSM2,PROTO_MULTI} };
 #endif
#endif
and change to:

Code: Select all

#ifdef PCBSKY
 #ifdef REVX
const uint8_t ProtocolOptions[2][7] = { {3,PROTO_PPM,PROTO_DSM2,PROTO_MULTI}, {6,PROTO_PPM,PROTO_PXX,PROTO_DSM2,PROTO_MULTI,PROTO_XFIRE,PROTO_SBUS} };
 #else
const uint8_t ProtocolOptions[2][6] = { {3,PROTO_PPM,PROTO_DSM2,PROTO_MULTI}, {5,PROTO_PPM,PROTO_PXX,PROTO_DSM2,PROTO_MULTI,PROTO_XFIRE} };
 #endif
#endif
(don't miss the subscript size change from 5 to 6!).

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

Post Reply

Return to “ersky9xr”