Page 1 of 2

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

Posted: Fri Jul 01, 2016 4:29 pm
by pyr8
I have been trying to figure out how to get Mavlink Telemetry working on the "9XR Pro" for some time now.

I managed to track down the gentleman that posted photos of it working on Google+: https://goo.gl/Dd54sT

I have not tested it yet, however, apparently you need a modified branch of opentx: https://github.com/adriano65/opentx-2.0.14

A modified OrangeRX as per: http://goo.gl/2cmfUT

Gitsly Branch of OpenLRS

Rewiring the module bay of the 9XR Pro to "non inverted Com1"

I have not been able to get clarification however on the "non inverted Com1" mod!

Any help from #MikeB and or João would be appreciated.

Once I get it up and running I will post a full how-to for others looking to do the same.

Thanks in advance guys! :)

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

Posted: Fri Jul 01, 2016 4:32 pm
by pyr8
P.S., MikeB, is it possible to add the modified code to the regular releases of OpenLRS and or ERSKY9X?

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

Posted: Fri Jul 01, 2016 6:38 pm
by MikeB
The 9XR-PRO has a programmable inverter on the received telemetry signal, no mods are needed to handle inverted or non-inverted telemetry. On ersky9x, just set the option in the telemetry menu.
At the moment the only support for MavLink telemetry in ersky9x is via an Arduino that converts the mavLink datastream to FrSky telemetry for input to a FrSky receiver.
I haven't had time to add native MavLink telemetry yet.
I don't have any OpenLRS hardware either so I won't be able to test this when I do get time.

Mike.

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

Posted: Fri Jul 01, 2016 8:17 pm
by pyr8
MikeB wrote:The 9XR-PRO has a programmable inverter on the received telemetry signal, no mods are needed to handle inverted or non-inverted telemetry. On ersky9x, just set the option in the telemetry menu.
At the moment the only support for MavLink telemetry in ersky9x is via an Arduino that converts the mavLink datastream to FrSky telemetry for input to a FrSky receiver.
I haven't had time to add native MavLink telemetry yet.
I don't have any OpenLRS hardware either so I won't be able to test this when I do get time.

Mike.

Mike, any idea why he would state that an internal mod would need to be done if the inverted functionality is built in...or is it a case of his modified code not supporting it?

I would like to try this out on my own gear, but I'm stumped when it comes to this "Mod" he referred to!

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

Posted: Fri Jul 01, 2016 8:26 pm
by pyr8
His response: "Er9x won't read native mavlink, I had it working on a 9xr but the mavlink code was very out of date"

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

Posted: Sat Jul 02, 2016 5:45 am
by pyr8
Apparently these are the connection modifications needed to the actual 9XR Pro:

COM 1 TX to RF Deck RX
COM 1 RX to RF Deck TX

Bluetooth is an option if you want to be able to connect/control Mission Planner via tablet or other Bluetooth enabled device.

Now I'm not clear and have not gotten any confirmation on whether it is necessary to "Remove Wire 2" as stated in the original schematic, or whether "Wire 2" can be left in place???

Mike, does this look correct to you and or make sense?

Image


TX Modification (Same as 9XR Mavlink telemetry mod)

Image

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

Posted: Sat Jul 02, 2016 9:22 am
by MikeB
I'll need time to check this, but It looks to me the mods are far more than might be needed. I think all that is needed is to add a non-inverted Tx signal to the pad marked 'C', the wire to pin 2 remains, and the received signal may be inverted (back to non-inverted!) using the firmware option.

The 9XR-PRO with ersky9x, has some support for bluetooth on COM3 (bottom right), with firmware options to route received telemetry data to it.

Mike.

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

Posted: Sat Jul 02, 2016 10:53 am
by Geofrancis
I have been through er9x and and mavlink and it just doesn't work I don't think the mavlink code had been changed in years so it showed very little info and none of the flight modes were accurate.

I used to use opentx-mavlink on my 9x and 9xr bit it was limited to mavlink only.

The version I'm using now on the 9xr-pro has native mavlink and frsky telemetry. That I use with the openlrs module in the back and an internal dht module.

I know there is a Bluetooth port and ways of sending telemetry to it but it would not work so wiring the Bluetooth directly to the module was the best way to go since it had always worked on my 9x and 9xr.

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

Posted: Sat Jul 02, 2016 12:24 pm
by MikeB
Pyr8: I would NOT recommend the mod as described. It actually uses COM2 being wired to where COM1 is normally connected, and then prevents the correct use of COM1 for (e.g.) FrSky SPort operation. I'm not even certain the diagram is correct either, it looks like the COM2 Tx and Rx signals are shown connected crossed.

Mike.

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

Posted: Sat Jul 02, 2016 3:10 pm
by pyr8
Mike, more clarification. He modified the schematic I sent him slightly:

As far as crossing the TX & RX wires (Red & Yellow lines) in the schematic, that was me just trying to visualize the wiring.

So it looks like:

RF Board TX to COM1 RX
RF Board RX to Bluetooth TX (No COM1 connection)

I'm thinking I could always add a switch in order to disconnect the connection to COM1 when wanting to use a FrSky module?!

Image

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

Posted: Sat Jul 02, 2016 3:13 pm
by Geofrancis
you are correct in that it would stop operation with sport xjt, i use a modified djt with ttl mod so that i can swap between openlrs and frsky telemetry by just changing modules since both are on ttl levels.

this could be improved by connecting the openlrs mod to com2 but i could never it it to work using the com2 pins next to the com1 i am using.

there are pads on the board for com 2 tx rx that might work but i never tried them.

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

Posted: Sat Jul 02, 2016 3:32 pm
by pyr8
Geofrancis wrote:you are correct in that it would stop operation with sport xjt, i use a modified djt with ttl mod so that i can swap between openlrs and frsky telemetry by just changing modules since both are on ttl levels.

this could be improved by connecting the openlrs mod to com2 but i could never it it to work using the com2 pins next to the com1 i am using.

there are pads on the board for com 2 tx rx that might work but i never tried them.

What about adding a switch to disconnect COM1 as stated above?

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

Posted: Sat Jul 02, 2016 3:51 pm
by MikeB
Geofrancis wrote:you are correct in that it would stop operation with sport xjt, i use a modified djt with ttl mod so that i can swap between openlrs and frsky telemetry by just changing modules since both are on ttl levels.
The 9XR-PRO was designed to support both inverted RS2323 levels and inverted or non-inverted ttl levels on the bottom pin of the module connector for receiving telemetry. The signal input tolerates RS232 levels as well as ttl levels and includes a firmware controlled hardware inverter to select the required sense. As such, a DJT may be used just by wiring the Tx output to the bottom pin of the module connector, no need to do the ttl mod.
This bottom pin, on the 'PRO, also supports transmission for the FrSky SPort (XJT module).

Pin 2 of the module connector (counting from the top), is just brought out to the pad labelled 'C'. This connection has been used on the 9X and 9XR to provide a RS232 signal to allow programming of the alarms in a DJT. Since er9x/ersky9x/openTx support providing alarms in the radio firmware, this is not really required, which is why the connection is built in.
You may use a ttl level, non-inverted signal on COM1 on this connection to send serial data. Just below and to the left of the COM1 connector (J18) is the ttl level versions of the COM1 signal. Just wire from J8 pin TX1 to the 'C' pad to get ttl, non-inverted serial data from COM1 on pin 2 of the module connector.

Mike.

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

Posted: Sun Jul 03, 2016 12:32 am
by pyr8
MikeB wrote:
Geofrancis wrote:you are correct in that it would stop operation with sport xjt, i use a modified djt with ttl mod so that i can swap between openlrs and frsky telemetry by just changing modules since both are on ttl levels.
The 9XR-PRO was designed to support both inverted RS2323 levels and inverted or non-inverted ttl levels on the bottom pin of the module connector for receiving telemetry. The signal input tolerates RS232 levels as well as ttl levels and includes a firmware controlled hardware inverter to select the required sense. As such, a DJT may be used just by wiring the Tx output to the bottom pin of the module connector, no need to do the ttl mod.
This bottom pin, on the 'PRO, also supports transmission for the FrSky SPort (XJT module).

Pin 2 of the module connector (counting from the top), is just brought out to the pad labelled 'C'. This connection has been used on the 9X and 9XR to provide a RS232 signal to allow programming of the alarms in a DJT. Since er9x/ersky9x/openTx support providing alarms in the radio firmware, this is not really required, which is why the connection is built in.
You may use a ttl level, non-inverted signal on COM1 on this connection to send serial data. Just below and to the left of the COM1 connector (J18) is the ttl level versions of the COM1 signal. Just wire from J8 pin TX1 to the 'C' pad to get ttl, non-inverted serial data from COM1 on pin 2 of the module connector.

Mike.
Mike, by doing the Mod mentioned above, will this allow me to display Mavlink telemetry using the OpenLRS module, and not effect the functionality of my XJT module once I swap?

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

Posted: Sun Jul 03, 2016 8:44 am
by MikeB
It should do so, as long as the radio firmware sets the hardware inverter correctly, and is able to decode the Mavlink data.
I am looking to get the Mavlink decode into ersky9x.

Mike.

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

Posted: Sun Jul 03, 2016 12:44 pm
by Geofrancis
MikeB wrote:
Geofrancis wrote:you are correct in that it would stop operation with sport xjt, i use a modified djt with ttl mod so that i can swap between openlrs and frsky telemetry by just changing modules since both are on ttl levels.
The 9XR-PRO was designed to support both inverted RS2323 levels and inverted or non-inverted ttl levels on the bottom pin of the module connector for receiving telemetry. The signal input tolerates RS232 levels as well as ttl levels and includes a firmware controlled hardware inverter to select the required sense. As such, a DJT may be used just by wiring the Tx output to the bottom pin of the module connector, no need to do the ttl mod.
This bottom pin, on the 'PRO, also supports transmission for the FrSky SPort (XJT module).

Pin 2 of the module connector (counting from the top), is just brought out to the pad labelled 'C'. This connection has been used on the 9X and 9XR to provide a RS232 signal to allow programming of the alarms in a DJT. Since er9x/ersky9x/openTx support providing alarms in the radio firmware, this is not really required, which is why the connection is built in.
You may use a ttl level, non-inverted signal on COM1 on this connection to send serial data. Just below and to the left of the COM1 connector (J18) is the ttl level versions of the COM1 signal. Just wire from J8 pin TX1 to the 'C' pad to get ttl, non-inverted serial data from COM1 on pin 2 of the module connector.

Mike.
I have done these almost identical mods to 9x and 9xr so the djt was already modified as was the openlrs module.

Since I was familiar with those handsets I just done the mods like I would have done with one of those.

My original idea was to have everything on different com ports but lack of documentation and support with the 9xr pro made that very difficult. The mavlink 9xr pro firmware I'm using did not originally work with 9xr pro but had to be ported from sky9x board.

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

Posted: Sun Jul 03, 2016 3:56 pm
by MikeB
What firmware are you using (or what firmware did you port fro the SKY board)? Mavlink isn't supported directly on ersky9x at present so I'm very curious about this.

Even using a ttl level modified DJT, the only hardware change needed on the 9XR-PRO is the wire from J8 pin TX1 to the 'C' pad to get ttl, non-inverted serial data from COM1 on pin 2 of the module connector. The serial data input on pin 5 is already TTL, non-inverted compatible.

Mike.

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

Posted: Sun Jul 03, 2016 4:18 pm
by pyr8
MikeB wrote:It should do so, as long as the radio firmware sets the hardware inverter correctly, and is able to decode the Mavlink data.
I am looking to get the Mavlink decode into ersky9x.

Mike.
Thanks allot Mike...I (and others) have been waiting for this for some time now...awesome!

A few more questions for the sake of clarification.

1. Based on what you said in your previous post, about connecting the "C" pad to J18, does this schematic look correct for once you have finished compiling the code? The reason I ask is that you mentioned "J18" and "J8", or was the "J8" reference a type O?
Image

2. As it stands now, is it possible to pass bidirectional mavlink data from the TX module on COM3 to a tablet/phone/computer via bluetooth adapter, or do I need to wait for you to add the functionality to the new code?

If not, I will connect the bluetooth TX/RX directly to the RF Deck B & C pads for the interim?!

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

Posted: Sun Jul 03, 2016 4:34 pm
by MikeB
NOT a typo, I really do mean J8 that is below and to the left of J18. J8 has the non-inverted COM1 TXD signal on it.

At present, you may use COM2 for bi-directional communication to bluetooth on COM3, but not COM1.
You may route COM1 received data to bluetooth on COM3.
Allowing both bluetooth and the radio to transmit serial data on COM1 to the Tx module will always be a problem as you can't have TWO transmit sources connected together.

Mike.

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

Posted: Mon Jul 04, 2016 5:48 am
by pyr8
MikeB wrote:NOT a typo, I really do mean J8 that is below and to the left of J18. J8 has the non-inverted COM1 TXD signal on it.
My mistake...I went back and reread what you stated. :oops:
MikeB wrote: At present, you may use COM2 for bi-directional communication to bluetooth on COM3, but not COM1.
You may route COM1 received data to bluetooth on COM3.
Allowing both bluetooth and the radio to transmit serial data on COM1 to the Tx module will always be a problem as you can't have TWO transmit sources connected together.

Does this look correct for TX/RX of Mavlink data via bluetooth to tablet?

I think I have just totally confused myself if this is not correct! :?

Image

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

Posted: Mon Jul 04, 2016 7:28 am
by MikeB
You are using the INVERTED COM2 connections in that diagram (pins 1 and 2 of J7, pin 1 is the square pad).
The non-inverted connections are those on pins 4 and 5 of J7 (labelled TX and RX).

Mike.

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

Posted: Mon Jul 04, 2016 8:54 am
by Geofrancis
MikeB wrote:What firmware are you using (or what firmware did you port fro the SKY board)? Mavlink isn't supported directly on ersky9x at present so I'm very curious about this.

Even using a ttl level modified DJT, the only hardware change needed on the 9XR-PRO is the wire from J8 pin TX1 to the 'C' pad to get ttl, non-inverted serial data from COM1 on pin 2 of the module connector. The serial data input on pin 5 is already TTL, non-inverted compatible.

Mike.

This is the conversation I had with the guy who wrote the firmware for his sky9x https://github.com/adriano65/opentx-2.0.14/issues/1

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

Posted: Mon Jul 04, 2016 2:33 pm
by MikeB
I've got something beginning to work on ersky9x on the 9XR-PRO. Using COM1, receive only, I've connected the output from a FC directly to the radio, pin 5 of the module connector (a limited FC, no GPS).
I'm receiving and decoding MavLink packets, and displaying some values, although the scaling may be incorrect on some items.

If anyone is interested in helping test this, and has suitable hardware, please let me know.

Mike.

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

Posted: Mon Jul 04, 2016 9:04 pm
by pyr8
MikeB wrote:I've got something beginning to work on ersky9x on the 9XR-PRO. Using COM1, receive only, I've connected the output from a FC directly to the radio, pin 5 of the module connector (a limited FC, no GPS).
I'm receiving and decoding MavLink packets, and displaying some values, although the scaling may be incorrect on some items.

If anyone is interested in helping test this, and has suitable hardware, please let me know.

Mike.

I have all the necessary gear!

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

Posted: Mon Jul 04, 2016 9:07 pm
by pyr8
MikeB wrote:You are using the INVERTED COM2 connections in that diagram (pins 1 and 2 of J7, pin 1 is the square pad).
The non-inverted connections are those on pins 4 and 5 of J7 (labelled TX and RX).

Mike.

Got ya...so is it TX to TX or RX to TX and is it necessary to remove "wire 2" as per the "Internal RS232 Telemetry Mod", or can it stay in place?

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

Posted: Mon Jul 04, 2016 9:43 pm
by MikeB
The only hardware change needed on the 9XR-PRO to use COM1 non-inverted, in both directions, is the wire from J8 pin TX1 to the 'C' pad to get ttl, non-inverted serial data from COM1 on pin 2 of the module connector. Leave the "wire 2" in place as that provides the receive data.

What bluetooth module will you be using. Ersky9x supports the HC-05 and the HC-06. The HC-05 is better as it operates as both master and slave, but you will need an extra wire to it to enable the commands to make it swap roles. The HC-06 is slave only, but should 'talk' to a tablet etc., although I don't have a tablet to test it!

Mike.

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

Posted: Tue Jul 05, 2016 12:25 am
by Geofrancis
on a side note, I have been looking to replicate this setup on 2.4ghz for a long time now and recently came across these FrSky S.Port to UART converters.
http://www.frsky-rc.com/download/view.p ... 0Converter


from what I can work out it should allow for a transparent bidirectional RS232 link via S.port from receiver to module, with that in place all it should need are some level converters and it should work the same as the openlrs system

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

Posted: Tue Jul 05, 2016 2:19 am
by pyr8
MikeB wrote:The only hardware change needed on the 9XR-PRO to use COM1 non-inverted, in both directions, is the wire from J8 pin TX1 to the 'C' pad to get ttl, non-inverted serial data from COM1 on pin 2 of the module connector. Leave the "wire 2" in place as that provides the receive data.

What bluetooth module will you be using. Ersky9x supports the HC-05 and the HC-06. The HC-05 is better as it operates as both master and slave, but you will need an extra wire to it to enable the commands to make it swap roles. The HC-06 is slave only, but should 'talk' to a tablet etc., although I don't have a tablet to test it!

Mike.
HC-06

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

Posted: Tue Jul 05, 2016 8:34 am
by MikeB
The FrSky SPort to UART units have a limited transfer rate. When operating in bi-directional mode the maximum is 90 bytes/second.

Mike.

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

Posted: Tue Jul 05, 2016 12:13 pm
by Geofrancis
MikeB wrote:The FrSky SPort to UART units have a limited transfer rate. When operating in bi-directional mode the maximum is 90 bytes/second.

Mike.
yea i seen that, i ordered a pair anyway for testing,