Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Hardware Support for the 9XR Pro
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by Geofrancis »

Mike what would be ideal is a Mavlink to frsky adapter that puts out framed frsky like a djt, so it can sit between the openlrs and any frsky capable handset either opentx or er9x.


this is the only project i have seen that puts frsky telemetry directly into the handset, if that could be grafted onto an existing mavlink-frsky converter it would fix a lot of problems.

viewtopic.php?f=96&t=7275&start=120

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

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

I think the following will work (almost).
I have code for an Arduino Pro Mini that is normally fitted on the model. This handles the MavLink data and converts it to FrSky, either HUB or SPort. This data is then sent to a FrSky receiver and is processed by ersky9x.
If the Arduino is fitted at the Tx end, then you can have the FrSky HUB data sent from it.
Ersky9x can handle this "RAW" hub data, but won't be in MavLink mode.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by Geofrancis »

i have been trying to do that your way for years now but i have just never found a way of getting it to accept raw frsky (untill now)
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

In very recent test versions of ersky9x, there is an option for "Usr Proto" of "HUBRAW".
I may need to add some extra configuration option to separate the physical (SPort/Hub/Raw) from the logical content (FrSky/MavLink etc.)

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: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

After a few false starts, I have something working, although Mission Planner seems to require everything to be powered on in the correct order and at the right time.
I'm using a 9XR-PRO with the single mod of "the wire from J8 pin TX1 to the 'C' pad on the RF board".
My 9XR-PRO already has a bluetooth module installed (HC-05 in my case). I have the BT module configured as a SLAVE (done in the "Bluetooth" menu of the radio setup).
I've enhanced the "BT Telemetry" option from "OFF and ON" to "Off, Rx and Tx/Rx". I selected Tx/Rx, also COM1 as telemetry and Invert COM1 ON. I also set the COM1 baudrate to 57600 (another new telemetry option).
I've connected the pin 2 in the module bay to the Rx of an APM and pin 5 in the module bay to the Tx of the APM.
I have the "UsrProto" set to "Mavlk".
If I run Mission Planner (Windows 7 PC) and ask it to connect to the BT module, then power on the radio, it connects to the BT module and looks for the APM. If I then power on the APM, Mission Planner then fully connects, retrieves parameters then shows flight data on the display. At the same time, the flight data is showing on the 9XR-PRO display.

I'll post a test version of ersky9x with all this in a bit later.

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

pyr8
Posts: 53
Joined: Sun Apr 13, 2014 4:43 pm
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by pyr8 »

MikeB wrote:After a few false starts, I have something working, although Mission Planner seems to require everything to be powered on in the correct order and at the right time.
I'm using a 9XR-PRO with the single mod of "the wire from J8 pin TX1 to the 'C' pad on the RF board".
My 9XR-PRO already has a bluetooth module installed (HC-05 in my case). I have the BT module configured as a SLAVE (done in the "Bluetooth" menu of the radio setup).
I've enhanced the "BT Telemetry" option from "OFF and ON" to "Off, Rx and Tx/Rx". I selected Tx/Rx, also COM1 as telemetry and Invert COM1 ON. I also set the COM1 baudrate to 57600 (another new telemetry option).
I've connected the pin 2 in the module bay to the Rx of an APM and pin 5 in the module bay to the Tx of the APM.
I have the "UsrProto" set to "Mavlk".
If I run Mission Planner (Windows 7 PC) and ask it to connect to the BT module, then power on the radio, it connects to the BT module and looks for the APM. If I then power on the APM, Mission Planner then fully connects, retrieves parameters then shows flight data on the display. At the same time, the flight data is showing on the 9XR-PRO display.

I'll post a test version of ersky9x with all this in a bit later.

Mike.

<screaming like a little girl>
pyr8
Posts: 53
Joined: Sun Apr 13, 2014 4:43 pm
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by pyr8 »

Mike, send me the firmware and ill test it out once you are done....CANT WAIT!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

OK, I've posted a test version in the usual place (viewtopic.php?f=7&t=4676&p=65894#p65894).
On testing, I found a few small bugs to do with scaling, mapping the MavLink values to the correct place and layout.
I'm sure there will be more to find.
Mission Planner seems to connect more reliably now, although I haven't changed anything on the 'PRO for that. I was running 1.33 of MP but updated to 1.38 to get it to connect at all.

Mike.

Edit: When I added the wire for the Tx signal I also included a 220 ohm resistor in series in the wire to protect the Tx signal for the case of using a FrSky XJT module that sends a "heartbeat" signal in on the pin of the module connector.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
pyr8
Posts: 53
Joined: Sun Apr 13, 2014 4:43 pm
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by pyr8 »

Looks great Mike, I have it working on my unit without Bluetooth at this point. One thing I noticed is the lack of RX/TX info across the bottom of the telemetry screen under Rssi & Rcq respectively.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

I haven't got processing in for all messages/telemetry values yet.
Note that I don't use MavLink for anything myself, so I'm still learning what everything is, e.g. I can't remember what Rcq is!
I'll need to check where RSSI comes from, with FrSky modules and receivers it comes from them, not the Mavlink data. With something like OpenLrs I don't know where RSSI originates.

Also note that the APM needs to be 'told' what data to send. Mission Planner does this for itself, and the Arduino that converts the Mavlink data to FrSky also sends the required requests. At the moment, ersky9x does NOT send any "Rate Requests", so only a few of the possible mavlink messages are sent by the APM, resulting in some data not appearing (yet).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by Geofrancis »

to get ardupilot to spew data all the time you have to click the enable osd button in mission planner.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

Yes, but if you don't have Mission Planner connected, just the radio, the radio needs to send the rate requests I believe.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by Geofrancis »

no you missunderstand, you only click it once and it will always put out telemetry without having mission planner connected, its the same procedure if your using a minimosd.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

Well, when I was testing my Arduino code, I only got heartbeat messages, even after connecting with Mission Planner, although Mission Planner was on a different port (the USB not the serial).
So, are you saying, if Mission Planner connects through the same serial port, the APM remembers to send all the requested messages?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by Kilrah »

I believe he means you have to turn on the option he mentioned in mission planner, which configures the board to always send data without request.
pyr8
Posts: 53
Joined: Sun Apr 13, 2014 4:43 pm
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by pyr8 »

Mike, just noticed there is no GPS data displaying!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

Not yet, I was getting the data transfer all working so only some of the MavLink messages are processed. I'll look to get the GPS ones processed next.

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: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

I've posted a new test version that does process GPS Lat. and Long. I can't test it though as I don't have GPS on my APM!
I've also tested using COM2 (fixed a bug) and this is now also working. I tested this on another 'PRO that has a HC-06 bluetooth module.
Mission planner connected properly via bluetooth and COM2, with the 'PRO also displaying telemetry data.

If you need to use COM2 non-inverted, then you need to move the plug that goes into J7 on the main board. Simply rotate it 180 degrees and plug it in to the other end of J7. So the black wire that went to pin 1 goes to pin 5 and the red wire that went to pin 2 goes to pin 4:
Com2nonInv.jpg
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
pyr8
Posts: 53
Joined: Sun Apr 13, 2014 4:43 pm
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by pyr8 »

MikeB wrote:I've posted a new test version that does process GPS Lat. and Long. I can't test it though as I don't have GPS on my APM!
I've also tested using COM2 (fixed a bug) and this is now also working. I tested this on another 'PRO that has a HC-06 bluetooth module.
Mission planner connected properly via bluetooth and COM2, with the 'PRO also displaying telemetry data.

If you need to use COM2 non-inverted, then you need to move the plug that goes into J7 on the main board. Simply rotate it 180 degrees and plug it in to the other end of J7. So the black wire that went to pin 1 goes to pin 5 and the red wire that went to pin 2 goes to pin 4:
Com2nonInv.jpg
Mike.
I will test with GPS this weekend!

In what scenario would you need to use COM2 as opposed to COM1?

I want to be able to use a XJT as well as the OrangeLRS module (switch back and forth).

Scenario 1: OrangeLRS with telemetry display on 9XR Pro, and, bi-directional Bluetooth to tablet.
Scenario 2: XJT telemetry data display on 9XR Pro only (no Bluetooth).
User avatar
bob195558
Posts: 2377
Joined: Sun Dec 16, 2012 7:24 pm
Country: United States
Location: New England, Vermont
Contact:

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by bob195558 »

I believe with 9x radio's, only one telemetry input can be received and used by the radio at a time.
Some 9x radios can do telemetry using com2 like the Taranis and the Sky9x radios.
The 9Xtreme and some other 9x radios would need a modification first and I think no one has done this yet for com2 telemetry.
Taranis Com2 Telemetry Cable: (viewtopic.php?f=96&t=4393&start=60#p79427).
Find more here: (viewtopic.php?f=126&t=8226&start=30#p110125).

Bob B.
Er9x on 9x radio, with Smartieparts Programmer and TelemetrEZ Board.
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

If you modify the LRS module to put the serial Tx and Rx on the module pins, and add the Tx wire (with resistor) from the non-inverted COM1 to pin 2 of the module bay, then you may simply plug in whichever module you need and it it should work correctly.
You might want to use COM2 if you don't want to modify the LRS module, simply connect the Tx and Rx to the Futaba socket on the 'PRO.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
thartenstein
Posts: 10
Joined: Sun Jul 03, 2016 7:26 am
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by thartenstein »

How do you connect APM to the frsky receiver ?
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

What is your radio configuration and what do you want?
This implementation is for when you have a bi-directional serial connection to your APM (at reasonable speed), which is not available on a FrSky module and receiver.

To support FrSky telemetry, I have written code for an Arduino Pro Mini that connects to the APM and translates the MavLink telemetry to FrSky telemetry, see this thread: viewtopic.php?f=7&t=8396.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
pyr8
Posts: 53
Joined: Sun Apr 13, 2014 4:43 pm
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by pyr8 »

MikeB wrote:I've posted a new test version that does process GPS Lat. and Long. I can't test it though as I don't have GPS on my APM! Mike.

Tested with GPS and it seems to work. HDOP and # of SAT's display!

Whats next Mike?
007trains
Posts: 3
Joined: Sun Oct 23, 2016 12:23 pm
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by 007trains »

Hey i'm trying to run mavlink telemetry to my 9xr pro, I've uploaded the ersky9xr_rom_mavlink2 version but i'm stuck getting no data. First i tried connecting my ULRS module through the futaba port at 115200 baud, i've set com2 func to telemetry. I tried J7 in both inverted and non-inverted positions and tried setting usrproto to mavlink and arduc. Then i tried connected directly to pixhawk this time at 19200 baud. Same result, is there some setting i'm missing or running the wrong version? Also when i connected to my ULRS module i realised that the serial on that unit operates at 5v could this have damaged my com2 rx?
Any help would be appreciated, i can't figure out what i'm doing wrong.
Thanks
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by MikeB »

1. Did you set the Com2 baudrate to 115200?
2. You also need to set the "FrSky Com Port" to 2 (I need to rename this the "Telemetry Com Port").

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
007trains
Posts: 3
Joined: Sun Oct 23, 2016 12:23 pm
Country: -

Re: Mavlink Telemetry on 9XR Pro Apparently Works - But Need Some Clarification!

Post by 007trains »

I hadn't set Frsky Com Port to 2. Fixed that and now everything is working beautifully! Thanks for your help

Post Reply

Return to “Turnigy 9XR PRO radio”