CRSF protocol for TBS Crossfire?
Re: CRSF protocol for TBS Crossfire?
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!
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
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
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!
The difficult we do immediately,
The impossible takes a little longer!
Re: CRSF protocol for TBS Crossfire?
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.
usually results in a packet of
going out to the module instead of the expected
I think I've fixed it in https://github.com/MikeBland/mbtx/pull/40 , if you could take a look that'd be ace.
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)
Code: Select all
[238, 6, 44, 238, 0, 0, 0, 38]
Code: Select all
[238, 6, 44, 238, 234, 1, 0, 134]
Re: CRSF protocol for TBS Crossfire?
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
Note - only does enough to change power settings and enter binding mode on the Micro TX module so far
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
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
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: CRSF protocol for TBS Crossfire?
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
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
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
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.
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!
The difficult we do immediately,
The impossible takes a little longer!
Re: CRSF protocol for TBS Crossfire?
Yes, 9XR-PRO. RSSI being reported is 0.
Re: CRSF protocol for TBS Crossfire?
On the plus side, it does still give the "still powered" warning when the RX is powered and RSSI is non-zero
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
If you compile the firmware yourself, change line 3693 in ersky9x.cpp to:
if ( FrskyHubData[FR_RXRSI_COPY] )
Mike
if ( FrskyHubData[FR_RXRSI_COPY] )
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
-
- Posts: 19
- Joined: Thu Mar 26, 2015 2:14 am
- Country: -
Re: CRSF protocol for TBS Crossfire?
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.
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
Yes, crossfire protocol is supported by erskyTx on most radios, including the 9XR-PRO.
Mike
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
-
- Posts: 19
- Joined: Thu Mar 26, 2015 2:14 am
- Country: -
Re: CRSF protocol for TBS Crossfire?
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.
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
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
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!
The difficult we do immediately,
The impossible takes a little longer!
-
- Posts: 19
- Joined: Thu Mar 26, 2015 2:14 am
- Country: -
Re: CRSF protocol for TBS Crossfire?
What is the correct firmware that I should be on? I have been pulling from the test version page.
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
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
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!
The difficult we do immediately,
The impossible takes a little longer!
-
- Posts: 19
- Joined: Thu Mar 26, 2015 2:14 am
- Country: -
Re: CRSF protocol for TBS Crossfire?
I went through and remapped the mixer channels for the switches and they seem to be working now
-
- Posts: 1
- Joined: Tue Dec 08, 2020 8:58 pm
- Country: -
Re: CRSF protocol for TBS Crossfire?
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:
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".
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:
which indeed leads to the 200k baud rate said here, but in this issue from TBS branch, it appears to be a lot less:16 channels sent every 2.5ms now @ 200KBauds with CRC
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.data is only being transmitted from FreedomTX to the external module at 50Hz
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.
Re: CRSF protocol for TBS Crossfire?
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.
Re: CRSF protocol for TBS Crossfire?
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.
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.
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
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
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: CRSF protocol for TBS Crossfire?
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
my github email: [email protected]
Matevz
Re: CRSF protocol for TBS Crossfire?
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
TBS Crossfire Micro TX V2 what do I need? thanks in advance but i don't have much experience with this radio
Re: CRSF protocol for TBS Crossfire?
Sourcecode of the CRSF firmware for 64M posted above is forked at https://github.com/ZupinM/mbtx.git
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
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
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!
The difficult we do immediately,
The impossible takes a little longer!
Re: CRSF protocol for TBS Crossfire?
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?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
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
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
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!
The difficult we do immediately,
The impossible takes a little longer!
Re: CRSF protocol for TBS Crossfire?
Thank you! I think I can handle building erskyTX from source.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
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.
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: CRSF protocol for TBS Crossfire?
That only changes eepskye, not the radio itself.
In menus.cpp find:
and change to:
(don't miss the subscript size change from 5 to 6!).
Mike
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
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
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!