Page 2 of 2

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

Posted: Thu Jul 07, 2016 1:28 am
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

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

Posted: Thu Jul 07, 2016 9:13 am
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.

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

Posted: Thu Jul 07, 2016 9:27 am
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)

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

Posted: Thu Jul 07, 2016 11:04 am
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.

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

Posted: Thu Jul 07, 2016 4:48 pm
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.

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

Posted: Thu Jul 07, 2016 7:43 pm
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>

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

Posted: Thu Jul 07, 2016 7:49 pm
by pyr8
Mike, send me the firmware and ill test it out once you are done....CANT WAIT!

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

Posted: Thu Jul 07, 2016 10:01 pm
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.

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

Posted: Fri Jul 08, 2016 7:26 am
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.

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

Posted: Fri Jul 08, 2016 9:06 am
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.

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

Posted: Fri Jul 08, 2016 11:58 am
by Geofrancis
to get ardupilot to spew data all the time you have to click the enable osd button in mission planner.

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

Posted: Fri Jul 08, 2016 12:12 pm
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.

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

Posted: Sat Jul 09, 2016 12:36 am
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.

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

Posted: Sat Jul 09, 2016 9:15 am
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.

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

Posted: Sat Jul 09, 2016 10:33 am
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.

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

Posted: Wed Jul 13, 2016 4:23 am
by pyr8
Mike, just noticed there is no GPS data displaying!

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

Posted: Wed Jul 13, 2016 8:16 am
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.

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

Posted: Thu Jul 14, 2016 10:04 pm
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.

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

Posted: Fri Jul 15, 2016 6:21 pm
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).

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

Posted: Fri Jul 15, 2016 7:09 pm
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.

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

Posted: Fri Jul 15, 2016 9:23 pm
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.

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

Posted: Sat Jul 16, 2016 6:23 pm
by thartenstein
How do you connect APM to the frsky receiver ?

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

Posted: Sat Jul 16, 2016 7:11 pm
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.

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

Posted: Sun Jul 17, 2016 5:29 pm
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?

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

Posted: Mon Nov 07, 2016 9:42 am
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

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

Posted: Mon Nov 07, 2016 10:28 am
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.

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

Posted: Mon Nov 07, 2016 11:39 am
by 007trains
I hadn't set Frsky Com Port to 2. Fixed that and now everything is working beautifully! Thanks for your help