Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crossfire native telemetry support, CRSF relay to u360gts tracker #47

Closed
Saxin opened this issue Jun 18, 2019 · 53 comments
Closed

Crossfire native telemetry support, CRSF relay to u360gts tracker #47

Saxin opened this issue Jun 18, 2019 · 53 comments
Milestone

Comments

@Saxin
Copy link

Saxin commented Jun 18, 2019

1. Backgorund
Crossfire by TBS is advanced UHF Lora modulation based RC link + telemetry system operating on 915 / 868 Mhz bands.
2 variants of TX currently available - full TX (2W capable) and micro TX (250mW), while the larger crossfire TX (in it's full version) having builtin Bluetooth module and is able to relay out Mavlink telemetry - today many users report disconnects and unstable operation of the internall BT module hence rendering this option a no go for relaying to antenna tracker.

Crossfire system RX connection to FC dictates the telemetry method used -
Method 1, considered preferred is native CRSF protocol, the RX is connected to FC via. signle UART and the later is utilized for both RC link and telemetry, this method is supported by the following FC FW: Kiss / Cleanflight / Inav / Betaflight / dRonin and maybe more.... (connection to RX requires x4 cables - RX / TX / VCC / GND).
CRSF protocol specification file -
[CRSF Rev07 (1).pdf] Removed per TBS request.

Method 2, crossfire RX is connected and configured to use x2 uarts - one is used for SBUS and a second one for Mavlink protocol transport, this method is mainly supported on Ardupilot FW and Inav to some extent, I've never used this method and I don't know how the telemetry is presented to OpenTX.

2. OpenTX
OpenTX supported for a while S. Port mirror option and recently added support for outputting the native CRSF stream "as is". (IMO the name "S. Port Mirror" after this change is confusing.
Battery compartment serial port is used: serial RX --> Inverter --> BT module.
Related issue: opentx/opentx#5357
Related PR: opentx/opentx#6326
Baudrate is set to 115200 in openTX and BT module accordingly.

3. CRSF implementation examples
a. RavenLRS (made by few Inav devs) https://github.com/RavenLRS/raven ,
Relevant files: crsf.c / crsf.h
https://github.com/RavenLRS/raven/tree/master/main/protocols

b. OpenTX https://github.com/opentx/opentx/tree/2.3/radio/src/telemetry
crossfire.cpp / crossfire.h

c. Inav https://github.com/iNavFlight/inav/tree/master/src/main/telemetry
crsf.c / crsf.h

d. Betaflight https://github.com/betaflight/betaflight/tree/master/src/main/telemetry
crsf.c / crsf.h

Hardware schematic:
CRSF Mirror Sceme R0.pdf

@Saxin
Copy link
Author

Saxin commented Jun 19, 2019

Captured data using Realterm,

Capture1

capture1.txt

@Saxin
Copy link
Author

Saxin commented Jul 15, 2019

Adding Inav BB log files and captured CRSF mirror log, captured via. bluetooth (app on phone)
The btlog file contains both flights in sequence.

btlog (2).log
LOG00001.TXT
LOG00002.TXT

@raul-ortega
Copy link
Owner

I'm working on this. Please, could you give to me some reference about lat/lon/altitude where data were captured?

@raul-ortega
Copy link
Owner

raul-ortega commented Aug 6, 2019

Frame types and values parsed:

GPS 31914328
GPS 34971280
GSpd 1
Hdg 0
Alt 0
Sats 19
GPS 31914328
GPS 34971280
GSpd 1
Hdg 0
Alt 0
Sats 19
GPS 31914328
GPS 34971279
GSpd 1
Hdg 0
Alt 0
Sats 19
...

@shannonbaker
Copy link

shannonbaker commented Aug 6, 2019

Saxin is from Israel.
Jerusalem GPS coordinates are:
Latitude: 31° 46' 8.54" N
Longitude: 35° 12' 58.79" E

This may assist you Raúl.

@raul-ortega
Copy link
Owner

latlon

@Saxin
Copy link
Author

Saxin commented Aug 6, 2019

@raul the location is pin point accurate

@raul-ortega
Copy link
Owner

Please provide a new capture, I need altitude values greater than 0

@raul-ortega
Copy link
Owner

@Saxin please attach a jpg/png file with a schema about hardware used. Are you using tarnis sport connecto, with orel without inverted?

@shannonbaker
Copy link

@raul, altitude from a flight controller sets the zero from takeoff point usually at arming. I suspect this is what is captured in the data you demonstrated above. Saxin would need to provide full logs of a flight from takeoff to see altitude change.

@Saxin
Copy link
Author

Saxin commented Aug 6, 2019

@raul-ortega Hi and many thanks for pushing this, I'm sure many will much appreciate your work on this.

  1. Scheme - will do.
  2. Taranis - battery bay UART port (right connector), UART TX -> Inverter -> BL Adapter RX.
  3. Set BL baud to 115200.
  4. Opentx 2.2.4 (must), Enable smart port mirror in global menu (despite the confusing name CRSF is being mirrored).

The flight was long, but somehow telemetry link was lost / disconnect hence the short log captured.
Due to recent addition to our family I'm won't be able to provide new capture in the upcoming few weeks.

@raul-ortega
Copy link
Owner

raul-ortega commented Aug 6, 2019

@Saxin Congratulations!
Thanks for the information, I'll tell a friend to capture more data.

@sniperxnl
Copy link

Guys my Horus x10s have also build in Bluetooth, possible to use this one to connect to the tracker?

Or is it possible to transmit data from crsf >ble>433 and build a 433 on the tracker to get more distance between tracker and crossfire

@raul-ortega
Copy link
Owner

Crossfire protocol auto detection

@Saxin
Copy link
Author

Saxin commented Aug 10, 2019

@raul-ortega - schematic added to #47 (comment) head.

@putimir
Copy link

putimir commented Aug 19, 2019

Guys my Horus x10s have also build in Bluetooth, possible to use this one to connect to the tracker?

I'm also interested in this solution - is it possible? Thanks for your time and efforts!

@raul-ortega
Copy link
Owner

raul-ortega commented Aug 19, 2019

@putimir in order to be able to display crossfire telemetry in your Horus x10s, it is needed the TBS inverter mod.

Once this telemetry is well received and displayed on screen, you have to figure out the way to relay it out from your Taranis. For Taranis X9D, when is upgraded to opentx 2.2.4, it allows to mirror telemetry throught S.port connector. I don't now if Horus X10S uses the bluetooth as S.Port mirroring, or you have to add extra mod bluetooth for your taranis.

@putimir
Copy link

putimir commented Aug 19, 2019

Yes of course, I have telemetry well working, fortunately I'm one of the few lucky ones with very early units, that don't need the mod :D. I get all telemetry perfect @ 400000 baud...
The X10 has a module installed:

image

, but I don't know how to work it, there is nothing in the openTX tha relates to Bluetooth

@raul-ortega
Copy link
Owner

raul-ortega commented Aug 19, 2019

@putimir So, if you can see crossfire telemetry on your display and your radio is updated with opentx 2.2.4, try changing bauds to 115200 and try to capture a log file from android with Blueterm, for example, and please, attach the file to a anew post.

@putimir
Copy link

putimir commented Aug 19, 2019

@raul-ortega: thanks, will try. I however doubt it, I think the BT is there for the wireless trainer feature...

Is there anybody from devs that has in-depth knowledge on this?

@AnyBody using X10: are there any settings regarding bluetooth in OpenTX? I suppose help from Frsky is out of the question haha

EDIT: sorry, been long since I was in system menu hehe: so you can set the Bluetooth either to "telemetry" or "trainer", great.

image

This is just in simulator, I'm @work and I can't wait to see what's in the stream...

@raul-ortega
Copy link
Owner

@putimir unfortunately no developer in this project owns a X10, what we know about it is what I have mentioned before, the "inverter mod" might be necessary depending on your radio, and opentx 2.2.4 allows mirroring on aux s.port, and 115200 bauds are needed. We do not know if the bluetooth of your x10 is capable of mirroring crossfire telemetry or you need some extra hardware mod. I think that the hardware topic is better to be treatted in specific forum for Horux X10 and/or Crossfire, others users might help you to solve it.

I have been investigating in others github threads and tested several log files, some of then from Horux x10 users, and the parser I'm developing did not found GPS frames whithin the data.

@putimir
Copy link

putimir commented Aug 19, 2019

Sorry, it seems we were typing at the same time, take a look at my edit post above...I will try to capture the stream and report.

@raul-ortega
Copy link
Owner

@putimir those are good news! Please attach anything you can capture, I'll parse it in a few minutes...

@raul-ortega
Copy link
Owner

@putimir remember to change bauds to 115200

@putimir
Copy link

putimir commented Aug 19, 2019

Yes, did notice that, thanks (@admins: feel free to delete the unnnecesary posts. sorry)

@raul-ortega
Copy link
Owner

Do not worry about it, the information you are posting might be interesting for other users.

@putimir
Copy link

putimir commented Aug 19, 2019

Hello, I now updated the radio to 2.2.4, enabled BT in Telemetry mode, but I just cannot pair my smartphone (Pocophone F1, Pie)...it always gives me "incorrect pin" (which is 0000, and cannot be changed)...Ideas?

@putimir
Copy link

putimir commented Aug 19, 2019

@Saxin

4. Enable smart port mirror in global menu

Hi, do you know, is this setting also present in Horus radios? I swear I can't find it :|

@Saxin
Copy link
Author

Saxin commented Aug 19, 2019

@putimir - this is located in radio menu (global) of taranis X9D+, I don't have a Horus so can't confirm for you.

https://opentx.gitbooks.io/opentx-taranis-manual/radio_menus.html
"Hardware" section

I suggest you slowly read this thread - CrazyDude1994/android-taranis-smartport-telemetry#4

Here may help, it seems working for others - CrazyDude1994/android-taranis-smartport-telemetry#4 (comment)

@putimir
Copy link

putimir commented Sep 5, 2019

Hello, just to follow up:

To recap: I was trying to capture data from my Android device, via BT link, on Horus X10S with a Crossfire Micro TX module. After turning on the built-in BT module on the Horus, and setting it to telemetry, although the TX was seen while scanning, none of the apps/debug tools captured anything; I first thought it was me having BT connectivity issues. I found some conversations staating, that only s.port/fport telemetry is being pushed to the Horus BT adapter.

So I setup a s.port test rig and behold, the telemetry is pouring in via BT (i'm using the bt_debug-debug.apk.zip from CrazyDude1994/android-taranis-smartport-telemetry#4 (comment)), but not if I'm connected to a XF rig.

So, I think I can confirm, that the OpenTX (probably?) is not pushing the XF telemetry to the BT...

If I want to do this, what should I do? Do I file a feature request/issue on the OpenTX git? Is there a person I can talk to directly?

Thanks a lot for all your former and future efforts. Thank you!

@Saxin
Copy link
Author

Saxin commented Sep 5, 2019

@putimir This limitation is brobably sw related on Opentx side, I suggest opening an issue on opentx github and hopefully they will agree to update

@putimir
Copy link

putimir commented Sep 5, 2019

Ok, thanks, filed an issue here: opentx/opentx#6712 (comment), in case anyone else is interested in this.

@putimir
Copy link

putimir commented Sep 5, 2019

Wow, SPEEDY GONZALES :D

opentx/opentx#6713

@raul-ortega
Copy link
Owner

Yeah, quite fast!

@putimir
Copy link

putimir commented Sep 6, 2019

YESS! Getting data via internal BT on the Horus X10, with TBS Crossfire Micro module, OpentTX, nightly build 2.3.0N80!

I'm using 115200 baud on the XF module. Will try later with 400000 baud.

Here is the captured data, @raul-ortega, if you will take a look if it is sane....there should be a fixed position in there, 46...., 14....

Thanks!
btlog.log

@raul-ortega
Copy link
Owner

@putimir That log has more than 2800 records (see attached). The log starts with 7 sats and good gps position. Then sats and position go to 0, it seems like a restart. And finally sats and fix get new values (sats value goes from 4 to 9):

putimir_btlog.txt

imagen

@raul-ortega
Copy link
Owner

YESS! Getting data via internal BT on the Horus X10, with TBS Crossfire Micro module, OpentTX, nightly build 2.3.0N80!

I'm using 115200 baud on the XF module. Will try later with 400000 baud.

Here is the captured data, @raul-ortega, if you will take a look if it is sane....there should be a fixed position in there, 46...., 14....

Thanks!
btlog.log

400000 is not supported. Max baud supported is 250000.

@putimir
Copy link

putimir commented Sep 6, 2019

@putimir That log has more than 2800 records (see attached).

Wow! It was running only a minute or two, I think ... That is quite a rate...

@putimir
Copy link

putimir commented Sep 19, 2019

Happy to report, that I have a functioning system, telemetry pouring in @10-15Hz rate; Frsky X10S, OpenTX 2.3RC1, TBS Crossfire Micro TX and a HM-10 module:

image

@raul-ortega
Copy link
Owner

raul-ortega commented Sep 19, 2019 via email

@putimir
Copy link

putimir commented Sep 19, 2019

:D no no! Bravo and kudos to YOU and the other guys here at GH!

@raul-ortega
Copy link
Owner

Related mods for Taranis QX7 users:

Taranis QX7 Bluetooth mod with OpenTX

How to Convert QX7 to QX7S

@redjacketKR
Copy link

Thank you for the mod for QX7 and Taranis users. I am using Jumper T16 and I saw a guy attached X10S BT module to Jumper T16. Let's say X10S BT and X12S BT is same and I can attach it to Jumper. Then will it work like QX7?

So I have to prepare following hardware

  1. X12S BT for Jumper T16
  2. HM-10 module for U360GTS

If we're gonna use the same openTX 2.3.1~ then it supposed to be working right?
(I think I will asked the same question to JUMPER T16 community)

@skaman82
Copy link
Contributor

@Saxin I have made a PCB based on you shematic for everyone to order: https://oshpark.com/shared_projects/V3HPfIeN

@edugit
Copy link

edugit commented Feb 22, 2020

@Saxin @skaman82
Hi Saxin,
I am trying to recopilate all the components to make the inverter with the schematic you kindly posted.
I can't find the regulator with the reference that appears in the schematic.
Could it be a typo error and it is "ams 1117" instead of "ams 1177"?
Thanks

@skaman82
Copy link
Contributor

skaman82 commented Feb 23, 2020 via email

@edugit
Copy link

edugit commented Feb 23, 2020

Yes it is ams1117:https://m.reichelt.de/ldo-regler-fest-5-v-sot-223-lm-1117-mp5-0-p109330.html?PROVID=2788&gclid=Cj0KCQiA4sjyBRC5ARIsAEHsELEySpSHrokl2LqXw4gx0twhpQh3vJKs-tlqNSDpQBe0i-dqD__-kVQaAi74EALw_wcB&&r=1Von meinem Huawei-Telefon gesendet-------- Ursprüngliche Nachricht --------Von: edugit [email protected]Datum: Sa., 22. Feb. 2020, 18:04An: raul-ortega/u360gts [email protected]Cc: Albert Kravcov [email protected], Mention [email protected]Betreff: Re: [raul-ortega/u360gts] Crossfire native telemetry support, CRSF relay to u360gts tracker (#47)@Saxin @skaman82 Hi Saxin, I am trying to recopilate all the components to make the inverter with the schematic you kindly posted. I can't find the regulator with the reference that appears in the schematic. Could it be a typo error and it is "ams 1117" instead of "ams 1177"? Thanks —You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

Thank you very much!!!!!!

@Fpv4tw
Copy link

Fpv4tw commented May 22, 2020

Though not reliable to some users, can you still make the crossfire module bluetooth connection available as well? Thank you.

@skaman82
Copy link
Contributor

@Fpv4tw it is available already (MAVLINK)

@Fpv4tw
Copy link

Fpv4tw commented May 26, 2020

@skaman82 Cool! So I just need to select MAVLINK Telemetry and pair a bluetooth module (connected to UART1) to the crossfire bluetooth, that's all? AWESOME!

@skaman82
Copy link
Contributor

skaman82 commented May 26, 2020

@Fpv4tv yes, also set your CRSF build-in module to Mavlink Emu

@Fpv4tw
Copy link

Fpv4tw commented Jun 5, 2020

@skaman82 Thank you very much!

@raul-ortega
Copy link
Owner

I close this issue because CRSF protocol is already implemented and working since release 11.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants